Appearance
Setup
Prerequisites
- Docker and Docker Compose
- Python 3.11+ for local backend work
- Node.js 20+ for local frontend work
- PostgreSQL 16 if you want to run outside Docker
Docker Setup
- Copy
.env.exampleto.envif needed. - Start the stack:
bash
docker compose up --build- Open the login page in the frontend. If the database is empty, create the first admin account there.
Run Backend
Backend service:
bash
cd backend
uvicorn app.main:app --reloadRun Frontend
Frontend service:
bash
cd frontend
npm install
npm run devMigrations
Run Alembic:
bash
cd backend
alembic upgrade headSeeding Data
Generate realistic data:
bash
cd backend
python -m app.scripts.seedSeeded users share the password defined by SEED_USER_PASSWORD in .env and the first seeded user is an admin.
Reset Database
Reset from code:
bash
cd backend
python -m app.scripts.reset_dbOr with Compose:
bash
docker compose down -vTroubleshooting
- If the backend cannot connect to PostgreSQL, check
DATABASE_URL. - If the frontend cannot reach the API, check
VITE_API_BASE_URLand CORS settings. - If migrations fail, confirm the database container is healthy.
- If the UI shows empty tables, run the seed script.