Repository navigation
API Development
English · 한국어
Applies to Miroven-API 0.1.0, independently of client v1.0.0. Paths/commands on this page are relative to the API checkout unless stated otherwise. Requires Python 3.12, PostgreSQL, SMTP, Node.js/npm for contract tooling, and Docker Compose with a Linux engine for container development.
Copy .env.example to .env only if no .env exists, then:
docker compose up -d --build --waitAPI: http://localhost:8000, interactive reference: /docs, Mailpit: http://localhost:8025. Migrations precede API/worker startup. Stop with docker compose down, preserving volumes. The default Compose/Mailpit stack is development-only.
For the client too, place Miroven/ beside Miroven-API/ and run:
docker compose -f compose.yaml -f compose.web.yaml up -d --build --waitApp: http://localhost:8080. See client development for browser integration checks.
uv sync --locked
uv run pytest -q
uv run ruff check app scripts tests migrations
uv run ruff format --check app scripts tests migrations
uv run python scripts/export_openapi.py --check
npm ci
npm run typecheckDatabase tests clear tables. Set TEST_DATABASE_URL to a dedicated database ending in _test; without it, database tests are skipped. Never point it at production or ordinary development data. CI is .github/workflows/ci.yml.
When the contract changes, export it with uv run python scripts/export_openapi.py, run npm run generate, then copy/check it from Miroven/web/ with npm run api:generate and npm run api:check. The API checkout's contracts/openapi.json defines exact request/response types; contracts/api.d.ts and the client's copied types are generated artifacts.
For direct Python execution, configure DB/SMTP in .env, then run migrations, the API, and the worker (the worker in a separate terminal):
uv run alembic upgrade head
uv run python -m app.serveruv run python -m app.workerSee deployment, operations, and validation boundaries. Keep API and client format versions distinct.
- Client development · 클라이언트 개발
- Self-hosting · 자체 호스팅
- PWA, offline use, and updates · PWA·오프라인·업데이트
- Client performance · 클라이언트 성능
- Architecture · 아키텍처
- Cryptographic format · 암호화 형식
- Image processing · 사진 처리
- Security model · 보안 경계
- Product principles · 제품 원칙
- Dependency licenses · 의존성 라이선스
- Account and sync · 계정과 동기화
- Backup and recovery · 백업과 복구
- Entry quotes · 기록 인용
- Profile document · 프로필 문서