- Introduction
- Pitch
- Hogwarts
- Live Demo
- MVP
- Roadmap
- Launch Sprint
- PRD
- Get Started
- Localhost
- Architecture
- Structure
- Pattern
- Page
- Layout
- Content
- Types
- Config
- Actions
- Queries
- Authorization
- Validation
- Form
- Table
- Detail
- Card
- Util
- Hooks
- List Params
- Views
- README.md
- ISSUE.md
- Technology Stack
- Database
- File
- CDN Assets
- Entry Points
- Dashboard
- Authentication
- Credentials
- OAuth
- Flow Diagrams
- Multi-Tenancy
- Offline
- Onboarding
- Onboarding Videos
- Add Values
- Admission
- Application
- Attendance
- Compliance
- Profile
- Exams
- Exam Wizard
- Timetable
- Classrooms
- Notifications
- Conference
- LMS (Lumos)
Finance
- Finance
- Fee Management
- Invoice
- Wallet
- Salary
- Payroll
- Timesheet
- Expenses
- Budget
- Receipt
- Accounts
- Banking
- Reports
- Dashboard
- Permissions
- Messages
- Integration Flow
- Provision
- AI Document Processing
- Document Intelligence
- Internationalization
- Translation
- Translation Guide
- Icons
- Docs Factory
- Inspiration
- Listings
- Teachers
- Students
- Catalog
- Library
- Contributing
- Code of conduct
- GitHub Workflow
- Database Seeds
- Database Safety
- Test Accounts
- Playwright
- Prettier
- Block Rebound
Sales & GTM
Principles
- Component-driven — Radix primitives at the base, shadcn/ui atoms above, feature blocks at the top.
- Feature-based — every feature is a self-contained directory; routes mirror components 1:1.
- Serverless-first — Vercel + Neon Postgres, Edge runtime where Prisma isn't needed.
- Type-safe end-to-end — Prisma → Zod → TypeScript with no manual handoffs.
- Async-first — small PRs, documented decisions, steady progress.
Composition layers
- Foundation: Radix UI → shadcn/ui → shadcn ecosystem.
- Building blocks: UI → atoms → templates → blocks → micros → apps.
Mirror pattern
Every URL route produces two directories — one in app/ for routing and layouts, one in components/ for all feature logic. The 1:1 mapping means if you know the URL, you know where the code lives.
For route /abc:
app/[lang]/abc/—page.tsx,layout.tsxcomponents/abc/—content.tsx,actions.ts,form.tsx,validation.ts,types.ts,use-abc.ts,README.md
src/— Source code directoryapp/— Next.js App Router (Routing & Layouts)[lang]/— i18n supportabc/— URL route: /abcpage.tsx— Route entry pointlayout.tsx— Route layoutcomponents/— Component Logic (Mirrors app structure)abc/— Mirrors app/[lang]/abc/content.tsx— Page UI: headings, sections, layoutactions.ts— Server actions: validate, mutateconfig.ts— Enums, option lists, defaultsvalidation.ts— Zod schemas & refinementstypes.ts— Domain and UI typesform.tsx— Typed forms (RHF)card.tsx— KPIs, summaries, quick actionsall.tsx— List view with table, filtersdetail.tsx— Detail view with sectionscolumn.tsx— Table column buildersuse-abc.ts— Feature hooksREADME.md— Feature purpose, APIs, decisionsISSUE.md— Known issues and follow-upsatom/— Atomic UI componentstemplate/— Reusable layout templatesui/— Base UI components (shadcn/ui)Tech Stack
See /docs/stack for the canonical version table.
Standardized File Patterns
See /docs/pattern for the per-file canonical contract.
Decision Framework
- Mirror-Pattern First: Every new route in
app/[lang]/must have a mirrored directory incomponents/ - Component Reusability: Start with shadcn/ui components, extend only when necessary
- File Pattern Adherence: Use standardized file names (content.tsx, action.ts, etc.)
- Type-Safety Chain: Zod schemas → TypeScript types → Prisma models
- Serverless Compatibility: Default to Edge runtime unless Prisma/bcrypt required
- Feature Isolation: Each feature should be independently deployable and testable
- Progressive Enhancement: UI → Atoms → Templates → Blocks → Micro → Apps
- Developer Experience: Predictable structure, clear naming, documented decisions
Naming Conventions
See /docs/pattern for the canonical naming reference.
Critical Files Reference
| File | Purpose |
|---|---|
src/proxy.ts | Edge middleware: subdomain detection, RBAC, URL rewriting, custom domains |
src/auth.ts | NextAuth: JWT callbacks, session management, redirect logic |
src/auth.config.ts | OAuth providers: Google, Facebook, Credentials |
src/routes.ts | RBAC matrix: role-based route protection |
src/lib/rate-limit.ts | Rate limiting configs across routes |
src/lib/tenant-context.ts | Tenant resolution with two-tier cache (Redis 5 min → in-memory Map 1 min) |
src/components/catalog/setup.ts | Catalog bridge: academic structure provisioning |
src/lib/dns-service.ts | DNS verification: multi-provider custom domains |
src/lib/security-headers.ts | CSP, HSTS, XSS protection |
prisma/models/ | Prisma multi-file schema (see /docs/database) |
CLAUDE.md | Project-wide architectural guidelines |
Anti-patterns
- Components not following mirror-pattern structure.
- Monolithic components that should be decomposed.
- Missing type-safety chain (Zod → TypeScript → Prisma).
- Files not following standardized naming conventions.
- Tight coupling between features.
- Hardcoded values that belong in
config.ts. - Direct database queries outside
actions.ts/queries.ts.
Request lifecycle
- User interacts with
form.tsx; submit triggers a server action fromactions.ts. - Payload is validated by the Zod schema in
validation.ts. - The action calls
queries.tsoractions.ts, which use Prisma against Neon with the types fromtypes.ts. - Result streams back; a hook from
use-abc.tsupdates the UI.