Docs
Codebase Map

Codebase Map

Where things live in the repository, how a feature is laid out, and the files to read first.

The repository is shaun-mo/impacthub on GitHub. The application is the repository root. This docs site is the docs-site folder inside it.

Top Level

PathWhat it holds
app/Pages and routes (Next.js App Router)
components/React components; components/ui is the design system
lib/Server logic, one folder per domain, plus the tests beside the code they test
supabase/migrations/Database migrations from 18 Aug 2026 onward
scripts/One-off and maintenance scripts, run with tsx
docs/HANDBOOK.md, LAYOUT.md, COPY.md, calendar-handoff.md
specs/The build specifications, 00 to 20
docs-site/This site
proxy.tsThe edge route gate
vercel.jsonThe daily cron schedule
.env.exampleEvery environment variable by name

Route Groups

  • app/(public)/: sign-in, sign-up, the intake at /apply, feedback and RSVP links, legal pages.
  • app/(dashboard)/: everything inside the app shell: Overview, calendar, directory, matches, office hours, events, resources, organization, and admin/ for applications, matching, announcements and resources.
  • app/(settings)/: Settings, with its own rail.
  • app/api/: the Clerk webhook, cron routes, calendar OAuth, media and download routes, the OS Agent chat.

Domains Under lib

FolderOwns
lib/apply/The intake questions, vocabulary, step logic
lib/applications/Accepting, inviting, seeding profiles from answers, adopting names and organizations
lib/assessment/The scored questionnaire and stage bands
lib/content/The form registry (the editable versions of intake and assessment)
lib/profile/Profile fields, readiness and completeness
lib/business/, lib/orgs/Founder businesses, partner organizations, tiers, invitations, listings
lib/members/The Members table actions
lib/matching/Engine, eligibility, gates, notices, check-ins
lib/nexus/The Nexus client, sync, outcome reporting
lib/office-hours/, lib/availability/, lib/calendar/Booking, sessions, calendars, video
lib/events/, lib/volunteers/Events, RSVPs, staffing, requests, debrief
lib/docs/, lib/partners/Resources library and partner listings
lib/email/Sending, the template registry, rendering edited wording
lib/announcements/, lib/engagement/, lib/activity/Broadcasts, nudges, dormancy
lib/settings/, lib/fields/, lib/tags/App settings, member and company fields, tag lists
lib/tour/The first-run tour script
lib/support/The Report a Problem dialog's action
lib/agent/, lib/dashboard/The OS Agent and the Overview's For You and insights
lib/audiences.ts, lib/auth-server.ts, lib/authz.tsRoles, capabilities, identity, guards
lib/nav-config.ts, lib/settings-nav.ts, lib/page-tabs.tsThe navigation registries that also drive route access

How a Feature Is Laid Out

A page under app/ reads data through functions in lib/<domain>/queries.ts, renders components from components/<domain>/, and writes through server actions in lib/<domain>/actions.ts. Pure logic (anything that can be tested without a database) sits in its own file next to a .test.ts. Comments in the code say why, not what; read them.

Read These First

  1. README.md: the architecture and the spec index.
  2. docs/HANDBOOK.md: the operations handbook, the long form of this site's Tech Stack and Operations sections.
  3. docs/LAYOUT.md and docs/COPY.md: the page contract and the copy rules.
  4. lib/audiences.ts and proxy.ts: how roles and access work.
  5. lib/apply/questions.ts and lib/applications/seed-profile.ts: how an answer becomes a profile.

What Is Deliberately Not There

No ORM; queries are written against the Supabase client. No client-side database access. No Radix; the UI is shadcn on Base UI. No sonner; the toast is components/ui/toast.tsx. No second typeface.