This is a Next.js project bootstrapped with create-next-app.
The codebase uses route-level collocation for UI and route-only logic, with shared logic organized by domain.
src/app/...contains route segments, layouts, and page components.- Each route can include:
_components/for route-only UI pieces_hooks/for route-only hooks_context/for route-only context_types/ortypes.tsfor route-only typesactions.tsfor route-scoped server actions
src/app/api/- Organized by role/domain:
admin/,coach/,parent/,user/,profiles/. webhooks/contains handlers for external provider callbacks
src/components/holds reusable UI used across multiple routes.src/lib/holds shared, app-specific domain logic grouped by feature.- Example domains:
lessons/,messaging/,scheduling/,profiles/,users/,payments/,rewards/,auth/. - A domain folder is organized into subfolders:
actions/- named server action files (e.g.signOut.ts,sendMessage.ts)server/- server-only helpers that aren't actions (e.g.getActiveProfile.ts,availability.ts)types.ts,schemas.ts- top-level files for shared types and validation
- Example domains:
src/services/is for third-party SDK clients and adapters (Supabase, Stripe, etc). Keep app logic out of this layer.servicesshould be adapter-only:- Allowed: SDK setup, HTTP request/response mapping, provider-specific payload formatting.
- Not allowed: setting profile cookies, database reads/writes, business workflow orchestration.
- Put business workflows in
src/lib/<domain>/server/and callsrc/services/*from there.
src/utils/is for cross-domain helpers that are not tied to a single featuresrc/types/is only for cross-domain primitives shared widely; keep domain types with their domain
- Collocate schemas with a route when only used there.
- Move schemas into the domain folder in
src/lib/<domain>/when reused across routes or APIs. - Use a top-level
src/validations/only if a schema is shared across many domains.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.