-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Setup
Oliver Hennhöfer edited this page Apr 7, 2026
·
1 revision
This page documents supported contributor setup and advanced debug workflows.
Use this page when you need to set up a contributor environment, choose a run mode, or extend backend integration behavior.
- Contributors working on
project-code/backendorproject-code/frontend. - Maintainers validating local developer environments before CI.
From repository root:
cd project-code- Open in VS Code.
- Reopen in container.
- Wait for post-create setup to finish.
Expected post-create behavior:
- Backend dependencies via
uv sync --all-packages --all-groups --frozen - Frontend dependencies via package manager install
- Tooling availability for lint/test workflows
From project-code/backend:
uv sync --all-packages --all-groupsFrom project-code/frontend:
npm installIf your lockfile policy is yarn-based:
yarn installFrom project-code/:
docker compose up -d --buildUse this mode for parity with documented local operations.
- Start backend stack from
project-code/. - Start frontend from
project-code/frontend:
npm run dev- Ensure frontend points to host-reachable gateway (
VITE_API_URL=http://localhost:8000for host runtime).
From project-code/backend:
uv run python -m ruff check .
uv run python -m pytest -q| Concern | Host Runtime | Container Runtime |
|---|---|---|
| Gateway URL for frontend | Usually http://localhost:8000
|
Usually service DNS (http://api-gateway:8000) |
| DB host variables |
localhost style when services exposed to host |
service names like timescaledb
|
| Log access | host process stdout | docker compose logs -f <service> |
| Network assumptions | host ports must be open/mapped | compose service DNS available |
If requests fail after switching mode, re-check VITE_API_URL and CORS values first.
- Ensure stack is running.
- Open service logs in terminal:
docker compose logs -f api-gateway tactic-middleware- Run tests from integrated terminal for reproducible breakpoints:
cd project-code/backend
uv run python -m pytest -q- Use compose-based interpreter for backend module execution.
- Keep compose env parity with project
.env. - Prefer service log inspection over IDE-only stdout when investigating orchestration issues.
Use this path when adding a new upstream charger provider without changing business logic contracts.
- Implement provider client conforming to existing charger client protocol interface.
- Add provider config model with strict validation for provider-specific settings.
- Register provider in central dependency resolver switch.
- Add settings/env wiring for provider selection and credentials.
- Add tests:
- unit tests for provider client behavior
- integration test that injects provider into sync path
Minimum acceptance for provider extension:
- Existing provider still works unchanged.
- New provider selectable by environment variable.
- Sync services operate without service-layer refactor.
From project-code/:
pre-commit install
pre-commit run --all-filesFrom project-code/backend:
uv run python -m ruff check .
uv run python -m pytest -qFrom project-code/frontend:
npm run lint
npm run test| Symptom | Likely Cause | First Fix |
|---|---|---|
| Frontend cannot call API in host mode |
VITE_API_URL still container DNS |
set VITE_API_URL=http://localhost:8000
|
| Gateway restarts during boot | DB sync/schema not ready | wait, then inspect db-sync + gateway logs |
| Monitoring endpoints return upstream errors | TACTIC not ready or Docker API connectivity issue | check http://localhost:8001/ready and TACTIC logs |
| Pre-commit fails unexpectedly | local env drift vs lock state | rerun dependency sync and rerun hooks |