Loading...
Loading...
> A deep dive into Fabrk's enterprise-grade stack and design patterns.
Built on the T3 Stack philosophy but extended for enterprise SaaS. Next.js 15 (App Router) ensures type safety from database to frontend. Scales from 0 to 1M+ users.
Example of a typical server action flow
1// 1. Client invokes action2const { execute, status } = useAction(updateUserProfile);34// 2. Server Action (src/app/_actions/user.ts)5export const updateUserProfile = action(schema, async ({ input, ctx }) => {6 // 3. Authorization Check7 if (!ctx.session) throw new UnauthorizedError();89 // 4. Database Operation10 const user = await prisma.user.update({...});1112 // 5. Revalidation13 revalidatePath('/dashboard/settings');1415 return user;16});
Built on NextAuth.js v5. Sessions are stateless (JWT) by default for edge compatibility, but can be database-persisted for strict session management.
Prisma ORM provides a type-safe interface to PostgreSQL. We use a "Service Layer" pattern to abstract database logic from UI components.
We strictly follow unidirectional data flow. Server Actions are used for mutations, while React Server Components (RSC) handle data fetching.
Fabrk is designed to scale from 0 to 1M+ users without major refactoring.