How designdotdevanshu/aurthafi works
Project type and purpose
• This is a full-stack Next.js application for personal finance management (accounts, budgets, transactions, dashboard).
• The README confirms it was bootstrapped with Create-Next-App and deployed on Vercel, using next/font and standard Next.js conventions.
File structure
• Top layers:
• app/ – Next.js App Router pages and layouts (protected routes under app/(protected), public/auth flows under app/auth)
• app/api/ – Next.js API routes (cron jobs, auth callbacks)
• components/ – React UI components (shared layout bits, auth, drawer, header, reusable forms)
• components/ui/ – design-system primitives (buttons, cards, table, chart, etc.)
• actions/ – server-side action functions handling auth, account, budget, transaction logic
• lib/ – Prisma setup (schema, client), shared constants, utils
• prisma/ – database migrations and schema.prisma
• utils/supabase/ – Supabase client, middleware, server helpers
• hooks/use-fetch – custom data-fetching hook
• data/ – static seed or landing data
• Key patterns:
• App Router with nested layouts for public vs protected.
• Server Actions (in actions/) invoked from server components.
• API routes used for scheduled tasks (cron/recurring-transactions) and OAuth callbacks.
• Prisma ORM talking to a relational database (likely PostgreSQL).
• Supabase as an external auth and realtime service.
• UI toolkit under components/ui for consistency.
README for additional insights
• Technology stack: Next.js, Vercel, Prisma, Supabase, Tailwind CSS (tailwind.config.ts), PostCSS.
Detailed breakdown
1. Client Layer (Browser)
• Pages: /, /auth/signin, /(protected)/dashboard, /(protected)/account/[id], /(protected)/transaction/create
• Components: header, footer, UI primitives
2. Next.js Server Layer
• App Router: layouts and pages under app/
• Server Actions: actions/*.ts (auth.ts, account.ts, transaction.ts, budget.ts, dashboard.ts)
• API Routes:
• /api/auth/* (callback, confirm)
• /api/cron/recurring-transactions
• Middleware: middleware.ts (route protection, supabase middleware)
3. Data & Integration Layer
• Prisma Client (lib/prisma.ts) → PostgreSQL (prisma/schema.prisma)
• Supabase Client (utils/supabase/client.ts) → Supabase Auth + DB (optional if using Supabase DB)
4. Infrastructure
• Vercel: Hosts Next.js, runs serverless functions, schedules cron jobs
• Prisma Migrations: prisma/migrations