client/srccontains the React front end (components, pages, hooks, contexts) wired through Vite aliases such as@/components.serverhosts the Express API, session/email integrations, and__tests__;server/routes.tsis the central entry point.shared/schema.tsdefines Drizzle ORM tables shared by both runtimes; keep DTO changes there.migrationsstores SQL artifacts generated by Drizzle, whiledocsholds product-facing documentation for reference.
npm installinstalls both client and server dependencies in the monorepo workspace.npm run devboots the API (viatsx server/index.ts) and proxies the Vite client athttp://localhost:3000.npm run buildoutputs the Vite bundle and bundles the API with esbuild intodist/.npm run startserves the production build fromdist/index.js.npm run db:pushsyncs Drizzle schema updates to the configured database.
- TypeScript is required; use ES modules and 2-space indentation to match the existing codebase.
- React components live in PascalCase files/directories (
client/src/components/ProfileCard.tsx); hooks use theuseThingprefix. - Tailwind utility classes drive styling; prefer composing via
class-variance-authorityhelpers instead of inline strings where available. - Run
npm run checkbefore submitting to ensure the TypeScript compiler stays clean.
- Vitest is the test runner; place unit tests beside the runtime they exercise (
server/__tests__/feature.test.ts). - Use the
.test.tssuffix and mirror the module name (storage.test.tscoversstorage.ts). npm run testexecutes the suite headlessly;npm run test:watchsupports TDD cycles.- Track coverage with
npm run test:coverage, aiming to cover new API branches and critical UI interactions.
- Follow the short, descriptive style seen in history (
Fix analytics route guard,Add Vitest infrastructure); prefer imperative mood and keep subjects under ~72 characters. - PRs should include a concise summary, testing evidence (
npm run test,npm run devsmoke checks), and screenshots for UI-facing changes. - Highlight schema or migration changes and call out environment variables new contributors must set.
- Copy
.env.exampleto.envand setDATABASE_URL; local Postgres or Neon works. - After schema edits run
npm run db:push, then seed development data withNODE_ENV=development tsx server/seed.ts. - Keep secrets out of commits and document any required third-party credentials in the PR description.