LCO DMA — Quick Start Guide¶
Get the LCO Data Management Application running on your local machine in under 10 minutes.
New here? Start with GETTING_STARTED.md for the full first-day checklist and ARCHITECTURE_PRIMER.md for the mental model. This page is the fast path to a running app.
Prerequisites¶
Install these tools before starting:
-
Node.js 20.19+ (22.x recommended)
Download from https://nodejs.org/. -
uv — Python package & environment manager (we do not use
pipor rawpython)uvprovisions and pins the project's Python 3.12 automatically — you don't need a system Python 3.12. -
just — command runner (the single entry point for every workflow)
-
Azure Cosmos DB access — local dev connects to the shared dev Cosmos DB, not a local emulator. Ask a teammate for the
COSMOS_ENDPOINT/COSMOS_KEYfor the dev account (see Step 2). -
(Optional) Docker — only needed for
just test-backend-integration, which spins up the Cosmos emulator.
Quick Setup (5 Steps)¶
Step 1: Clone the Repository¶
Step 2: Configure Backend Environment¶
Edit backend/.env with the dev Cosmos DB credentials (get them from a teammate):
COSMOS_ENDPOINT=https://<dev-account>.documents.azure.com:443/
COSMOS_KEY=<dev-primary-key>
DATABASE_NAME=lco-construction
backend/.env.example documents every variable (Blob Storage and Service Bus are only needed if you
work on the async import pipeline). The frontend works with defaults; create frontend/.env.local
from frontend/.env.example only if you need to override the API URL or auth settings.
Step 3: Install Dependencies¶
From the project root:
This runs npm install for the frontend and uv sync for the backend. To do one side only:
Step 4: Start Both Servers¶
This launches the backend (FastAPI on :8000) and frontend (Vite on :5173) in parallel. To run them separately in two terminals:
just dev-backend # FastAPI @ http://localhost:8000 (runs backend/start-dev.sh)
just dev-frontend # Vite @ http://localhost:5173
Both reload on save (Uvicorn watch mode + Vite HMR) — no restarts needed during development.
To stop servers and free their ports:
Step 5: Verify Everything Works¶
- Frontend loads — open http://localhost:5173, you should see the LCO DMA app.
- Backend health — http://localhost:8000/api/v1/health returns:
- API docs — interactive Swagger at http://localhost:8000/api/docs.
Common Issues & Solutions¶
Backend won't start¶
command not found: uv — install uv (Prerequisites step 2), then just install-backend.
Failed to initialize database — check backend/.env:
- COSMOS_ENDPOINT starts with https:// and ends with :443/
- COSMOS_KEY is the full primary key
- You're pointed at the dev account you were given (not a placeholder)
Port 8000 already in use — just stop, or lsof -i :8000 then kill -9 <PID>.
Frontend won't start¶
Dependency / lockfile errors — clean install:
Port 5173 in use — Vite auto-increments to 5174, 5175, … (CORS origins for these are pre-configured).
API calls fail¶
CORS errors — confirm the backend is running on :8000. BACKEND_CORS_ORIGINS in backend/.env
already allows localhost:5173/5174.
404 on API calls — the frontend calls the /api/v1 prefix; confirm the backend is up.
Tests fail locally¶
Backend integration tests need Docker (just test-backend-integration starts the Cosmos emulator).
Plain just test-backend runs the unit suite. If an integration test fails because it can't reach a DB,
that's expected without Docker — verify behavior against the running app instead.
Quality & Tests (before you commit)¶
just check # lint + typecheck everything (fast, no tests)
just quality # frontend + backend lint/format/types
just test # backend + frontend test suites
just ci # full gate: quality + tests + build
just build # production frontend build
Run just --list to see every recipe. All workflows go through just — don't hand-roll npm/uv
pipelines when a recipe exists.
Next Steps¶
- Mental model: ARCHITECTURE_PRIMER.md — understand the whole app in 10 minutes
- First day: GETTING_STARTED.md — full onboarding checklist
- Using Claude Code here: CLAUDE_CODE_GUIDE.md and SKILLS_MATRIX.md
- Deep docs: ARCHITECTURE.md, backend/, frontend/, database/INDEX.md
- Conventions:
.agent-context/conventions.md(the team's hard rules)
Production Deployment¶
See backend/README.md for Azure deployment, and the deploy
recipes (just deploy-containers, just deploy-flex, just deploy-import-processor).