How vedantshuklaaa/fundora works
Project Type and Purpose
• This is a monolithic full-stack web application built with Next.js (App Router) and Prisma ORM.
• Purpose: a user-centric dashboard for signup/login, viewing balances, sending/receiving transactions, and other user-specific pages.
• Key indicators:
• app/ folder with React Server and Client Components
• app/api/ folder with route handlers (login, signup, transactions, dashboard/*)
• prisma/ folder and lib/generated/prisma for DB schema and migrations
High-Level Architecture Components
a. Client Browser (React Components)
• Code under app/ (pages and layouts) and components/ (UI primitives).
• Tailwind CSS + custom globals for styling.
• Interacts with Next.js Server via page requests and API calls (fetch).
b. Next.js Server
• Routes under app/page.tsx, app/auth/*, app/user/* serve Server/Client Components.
• API routes under app/api/* become serverless functions or Node handlers.
• Authentication logic in lib/auth.ts.
c. Business Logic & Utilities
• lib/utils.ts for shared helper functions.
d. ORM Layer & Database
• Prisma client in lib/generated/prisma abstracts SQL.
• prisma/schema.prisma defines data models; migrations under prisma/migrations/.
• Underlying relational database (e.g., PostgreSQL, MySQL).
e. Deployment & Infra
• Next.js + API routes deployed (e.g., Vercel serverless functions).
• Static assets in public/.
• Configs: next.config.ts, tailwind.config.ts, postcss.config.mjs.
Relationships and Data Flows
• Browser → Next.js Page Routes: SSR/SSG or RSC requests for UI.
• Browser → Next.js API Routes: fetch/POST for login, signup, transactions, user data.
• API Handlers → lib/auth.ts for JWT/session management.
• API Handlers → Prisma Client → Database for CRUD operations.
• Next.js Server → Static assets (CSS, fonts, images) from public/.
• Deployment platform (e.g., Vercel) orchestrates serverless functions and static hosting.
Architectural Patterns & Design Principles
• Separation of Concerns:
• UI (React/Server Components) vs. API (Route Handlers) vs. Data (ORM).
• Server Components (Next.js App Router) + Client Components for interactivity.
• API-centric design: each logical feature (signup, login, dashboard/balance) has its own route.
• Infrastructure as Code: Prisma migrations for evolving DB schema.
• Component-driven UI under components/ui for reusability.