a2dcf67396fa62c5d7e1f083f0604fddee0c6822
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
- Add PLAN.md and sync backend docs, .env.example, API doc (404 details) - Document mock DB and PORT/API_PORT in docs/backend.md; README monorepo + frontend/.env.example - Migration 002: finish_place column, status registered; mapper and mock DB updated - Frontend: registered status, finishPlace, calendar year/month filters, pace sparkline - Extract createApp for tests; supertest + tsx; GitHub Actions CI Made-with: Cursor
Calendar Run
Calendar Run is a races calendar project: a backend API (Express + PostgreSQL) and a React SPA for viewing and analyzing your race schedule.
Product scope and data model: PLAN.md.
Backend — quick start
-
Install dependencies:
cd backendnpm install
-
Configure environment variables. Copy the root template and edit:
cp .env.example .envUse the repository root
.env(the backend loads it viabackend/src/config.ts).DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORD— required unless mock mode is on.- API port:
PORT(takes precedence) orAPI_PORT(default3001). - No PostgreSQL (CI / local smoke): set
CALENDAR_RUN_MOCK_DB=1(ortrue). RealDB_*values are not required; the API uses in-memory stubs for SQL used by the HTTP routes. Do not use mock mode fornpm run db:migrateornpm run seed.
-
With a real database: from repo root,
docker-compose up -d, thencd backend && npm run db:migrate && npm run seed. -
Build and run API:
npm run build npm run dev
Frontend — quick start
-
Configure the API URL for Vite (file is read from
frontend/):cd frontend cp .env.example .envEdit
VITE_API_BASE_URLif the API is not onhttp://localhost:3001. -
Install and run:
npm install npm run devDefault app URL:
http://localhost:5173. The backendCORS_ORIGINmust match this origin (see root.env.example).
Docs
Description
Languages
TypeScript
82.7%
CSS
17.1%
HTML
0.1%