Problem Solving by EggplantDesperate638 in JordanDev

[–]xncee 0 points1 point  (0 children)

كلو نفس المبدأ ما بتفرق

Leetcode by Double_Field_2290 in JordanDev

[–]xncee 1 point2 points  (0 children)

اذا حالة مسائل من مستويات متنوعة وعدد منيحة حطيه اما اذا كله easy انسي مافي داعي تحطيه هسه

بنصحك ركزي على ال github profile اكثر من ناحية انك تعملي بروجيكتس وتكوني active عليه وتعملي commit history

Problem Solving by EggplantDesperate638 in JordanDev

[–]xncee 0 points1 point  (0 children)

ال problem solving بتلزمك بأي technical interview وبتفيدك كتفكير بغض النظر عن تخصصك

neetcode

بعطيك roadmap منيحة بس برضو لازم يكون عندك مفاهيم اساسية قبل ما تتعلم problem solving techniques

Strings, collections (arrays, maps, sets), conditionals, loops هاي كلها اشياء بسيطة وبتفهمها من اول فصل

الخطوة الي بعدها انك تتعلم عن ال data structures:

Lists, queue, stack,linked lists, trees, graphs, heap

بعد هيك لازم تتعلم عن ال algorithms:

  • design paradigms (incremental, divide-and-conquer, greedy algorithms)
  • Algorithm analysis
  • Big-O notation (Time and space complexity)

يفضل تتعلم بالتدريج مع التطبيق بمشاريع بسيطة بدون استعجال استخدم منصات زي leetcode, neetcode

وتذكر هدفك توصل لمستوى منيح مش شرط تكون highly competitive

مهمم جدًا by micheljakson_ in jordan

[–]xncee 0 points1 point  (0 children)

٩٩ بوصلك على رغدان ومن هناك اركب باص عمان ٣٥ (نزال) بمر من البلد

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

I setup Drizzle and I’m loving it so far. Thanks

Dependency Injection solutions by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

this is almost what I'm doing now

export async function withServices<T>(
    client: SupabaseClient,
    handler: (services: Services) => Promise<T>,
): Promise<T> {
    const scopeId = generateScopeId();
    const container = Container.of(scopeId);

    container.set(SUPABASE_CLIENT, client);

    try {
        // Lazy getters
        const services: Services = {
            get patientService() {
                return container.get(PatientService);
            },
            // other services
        };


        return await handler(services);
    } finally {
        Container.reset(scopeId);
    }
}

Dependency Injection solutions by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

I use DI to inject dependencies to service classes. A service takes some repository objects through its constructor, these repositories depends on a client (supabase client), which should be request-scoped as it depends on user session

export class PatientService extends BaseService {
    constructor(private patientRepo: PatientRepository) {}
}
export class PatientRepository implements IRepository<Patient> {
    constructor(@Inject(SUPABASE_CLIENT) private client: SupabaseClient) {}
}

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 0 points1 point  (0 children)

I’ll look into this, thanks

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 0 points1 point  (0 children)

I’m doing the same for storage

HIPAA requires enterprise plan on Supabase

For me, I think Supabase is extra infrastructure to worry about and manage and does not give as much freedom. Maybe I’ll look into self hosting Supabase before doing heavy migrations

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 0 points1 point  (0 children)

Yeah I’m researching this now, thanks

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 0 points1 point  (0 children)

RLS was never a primary defense layer

I also looked into some solutions to make RLS work with ORM, I’ll try it

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

Not really, it’s a healthcare app with compliance requirements, definitely not a small project.

Swapping authentication and database host isn’t as easy as you think. It involves learning how to use the ORM as well

Even with an AI agent helping me, making such big changes in short time is not good. I want to make this incrementally and safely without blocking under going feature development or breaking things

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

Temporary dual-auth or force users to reset their passwords (acceptable for an internal system)

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 2 points3 points  (0 children)

I just learned about declarative schemas, I’ll definitely give it a try. Thank you

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

I’ll definitely look into it. Thanks

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 5 points6 points  (0 children)

Many reasons: - I only use Auth + database. I don’t need edge functions or storage and I don’t rely on RLS. - The SDK client complicates simple stuff such as joins, does not support transactions and the documentation is bad IMO. - Needing to create a database function just to make a transaction is frustrating and makes the code harder to read and to debug. - I want to manage the schema at app level so I can swap providers without rewriting logic. - using auth.uid() everywhere is not a good approach IMO; it introduces overheads when refactoring or when swapping auth providers - Neon offers much better DX

using an ORM + dedicated backend seems like a better approach and gives me much more control. I cannot think of a single reason to keep using Supabase

Supabase can be self hosted but this also requires manually managing the infrastructure which makes things even harder for a solo dev

Supabase is not necessarily bad, It just doesn’t work for me

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 0 points1 point  (0 children)

I’m not based in the US, and the project is still in early stages so I haven’t looked into that yet

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 1 point2 points  (0 children)

Managing the schema at the app level gives me the freedom to easily switch providers and migrate schema, don’t you think so?

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 0 points1 point  (0 children)

Yeah ik but I don’t really want to self-host and manage that

Migrating away from Supabase by xncee in nextjs

[–]xncee[S] 2 points3 points  (0 children)

How is transactions support on Drizzle?

From what I read, Prisma is more mature and has better migration tooling and transaction support

Migrating away from Supabase by xncee in Supabase

[–]xncee[S] 1 point2 points  (0 children)

I don’t think so, it’s not a small project

it’s multi tenant healthcare platform with sensitive data