HCTHE HCLAB

Development workflow

Scripts

Command Description
npm run dev Start Next.js dev server (Turbopack)
npm run build Production build + typecheck
npm run start Serve production build
npm run lint ESLint
npm run db:push Sync Prisma schema
npm run db:seed Run seed script
npm run db:studio Open Prisma Studio

Typical loop

  1. Pull latest and run npm install if dependencies changed
  2. Run npx prisma db push if schema.prisma changed
  3. npm run dev and edit under src/
  4. CMS changes appear immediately via revalidatePath after server actions

Documentation

Platform docs live in content/docs/ as Markdown. Edit a file and refresh /docs/... — no rebuild required in dev.

Navigation structure is defined in src/lib/docs-nav.ts.

Testing flows manually

See the full Local E2E testing plan for a phased runbook. Quick entry points:

Flow Entry point
Public site /
Member account /signup/account
CMS /admin (staff roles)
Research ops /admin/research
Study participation /studies
Docs /docs

Code conventions

  • Server mutations → React Server Actions in actions.ts files
  • Data fetching → src/lib/queries.ts and domain-specific *-queries.ts
  • Role checks → src/lib/auth.ts and src/lib/roles.ts
  • Marketing pages → src/app/(marketing)/
  • Admin panel → src/app/admin/(panel)/