How The Code Is Organized
The app keeps route files thin and puts real product work inside feature folders.
On this page
| Folder | What belongs there |
|---|---|
| app | Next.js route entrypoints, layouts, loading states, error states, and API route files. |
| features | Product areas such as billing, posts, team, notifications, analytics, customers, and waitlist. |
| components/ui | Reusable design-system primitives used across public and dashboard pages. |
| components | Shared presentation components that are not owned by one product area. |
| lib | Shared infrastructure for auth, Supabase, logging, SEO, security, dates, and utilities. |
| supabase/migrations | The database baseline and durable schema rules. |
| docs | Developer-facing setup, launch, billing, cron, CI, and module-removal docs. |
| test | Shared test utilities, fixtures, and top-level test guidance. |
Working rules
- Keep route files small.
- Put business rules in feature server files.
- Use feature UI files for product screens.
- Keep shared helpers close to the product area until more than one area needs them.
- Do not add folder-level re-export files.
- Do not import from app routes outside the app folder.