You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Production mode requires a non-default `SECRET_KEY`, non-empty database and Redis URLs, JWT issuer and audience values, positive token lifetimes, and explicit CORS origins.
341
+
312
342
## Local Setup
313
343
314
-
Install dependencies:
344
+
The Makefile expects Poetry to create `.venv` inside the repository. Configure that once, then install dependencies:
315
345
316
346
```bash
347
+
poetry config virtualenvs.in-project true --local
317
348
poetry install
318
349
```
319
350
320
-
Activate the virtual environment if desired:
321
-
322
-
```bash
323
-
poetry shell
324
-
```
325
-
326
-
Or run commands through Poetry:
351
+
Run commands through Poetry directly:
327
352
328
353
```bash
329
354
poetry run pytest -q
@@ -351,6 +376,8 @@ Open:
351
376
http://localhost:8000/docs
352
377
```
353
378
379
+
This documentation endpoint is available only when `APP_ENV` is not `production`.
380
+
354
381
Health check:
355
382
356
383
```text
@@ -458,8 +485,11 @@ Current check set:
458
485
459
486
-`pytest -q`
460
487
-`ruff check src tests scripts`
488
+
- import boundary checks through `lint-imports`
461
489
- import check for `src.main`
462
490
491
+
The current pytest suite focuses on application-layer command and query validation. Broader middleware, API integration, and infrastructure regression coverage still needs to be added.
Before starting Docker Compose, set non-empty `POSTGRES_PASSWORD`, `REDIS_PASSWORD`, and `SECRET_KEY` in `.env`. Compose intentionally fails fast when database or Redis passwords are missing.
@@ -497,6 +532,8 @@ Run API, PostgreSQL, and Redis services:
497
532
make db-up
498
533
```
499
534
535
+
The API container applies Alembic migrations before starting Uvicorn. Database seeding remains an explicit `make seed` step.
536
+
500
537
Stop services:
501
538
502
539
```bash
@@ -635,11 +672,11 @@ Legend: `Implemented` means code exists in the repository. `Partial` means code
635
672
-[x] Add production config validation for secrets and unsafe defaults.
636
673
-[x] Harden CORS through environment-driven allowed origins, methods, and headers.
637
674
-[x] Review exception responses to avoid leaking token parsing details or internal exception messages.
638
-
-[x] Add automated tests for request size limits, rate limiting, auth failures, authorization failures, CORS, security headers, and request IDs.
675
+
-[] Add automated tests for request size limits, rate limiting, auth failures, authorization failures, CORS, security headers, and request IDs.
639
676
-[x] Add dependency vulnerability scanning to local or CI checks, for example `pip-audit` or an equivalent Poetry-compatible scanner.
640
677
641
678
## Known Notes
642
679
643
-
-`src/core/lifespan.py` still calls `Base.metadata.create_all`; with Alembic in place, production environments normally rely on migrations instead.
644
-
-The project has a Pydantic v2 deprecation warning for class-based settings config.
645
-
-The current architecture is clean enough for a learning modulith, but some flows can be made stricter by moving remaining business orchestration out of routers and into application handlers.
680
+
-The automated test suite currently covers application validation only; middleware, router, database, Redis, and authorization integration paths are not covered.
681
+
-Authorization persistence currently exists under both `src/core/authorization/infrastructure` and `src/modules/authorization/infrastructure`; new work should avoid increasing that duplication.
682
+
-Some authorization routes call the domain service directly while other modules use dedicated application handlers, so CQRS boundaries are not yet applied consistently.
0 commit comments