Monorepo scaffold for the War Tracker platform, organized as a pnpm workspace.
- Node.js 20+
- pnpm 9+
-
Install dependencies:
pnpm install
-
Create required environment files (minimum):
apps/web/.env.localpackages/db/.envpackages/ingest/.env
You can create
.env.examplefiles in each package and copy from them. -
Start local development:
pnpm dev
apps/web— Next.js web application and UI shell.packages/db— Database access layer and schema-related utilities.packages/ingest— Data ingestion pipelines and source adapters.packages/types— Shared TypeScript domain and API types.packages/validation— Shared runtime validation schemas.packages/config— Shared configuration loaders and constants.
pnpm dev— Start the web app in development mode.pnpm build— Build all workspaces that implementbuild.pnpm lint— Run linting across all workspaces.pnpm typecheck— Run TypeScript checks across all workspaces.pnpm format— Format the repository with Prettier.pnpm test— Run tests across all workspaces (placeholder where not implemented).pnpm db:migrate— Apply SQL migrations inpackages/db/migrations.pnpm db:seed— Apply baseline seed SQL inpackages/db/seeds.
- ESLint (Next.js + TypeScript rules) configured at repo root.
- Prettier formatting configured at repo root.
- Optional git hooks via Husky + lint-staged (
.husky/pre-commit).
Database workflow docs: packages/db/README.md.
The repository CI workflow runs on pull requests and pushes to main with required checks for:
- dependency installation (
pnpm install --frozen-lockfile) - lint (
pnpm lint) - typecheck (
pnpm typecheck) - web build (
pnpm --filter @war-tracker/web build) - tests focused on validation + API utilities:
pnpm --filter @war-tracker/validation testpnpm --filter @war-tracker/web test
Branch protection for the default/protected branch should enforce:
- all CI checks are required before merge
- direct pushes are disabled (changes must land via pull request)
- pull requests use the repository PR template, including risk/safety checklist acknowledgement