Daniil 4b90925c2a docs: fix spec issues from review
- Remove contradictory tasks/artifacts.py (artifacts go to owning modules)
- Distinguish simple (5) vs complex (3) actors for _run_actor() pattern
- Make apply_partial_update sync (no I/O)
- Remove soft_delete helper (one-liner, confusing with dual patterns)
- Fix false dead code claim about media/service.py json import
- Add all project_pct → progress_pct reference locations
- Add broker import order risk and worker command change
- Add _run_async() and _parse_frame_rate() placement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 23:13:25 +03:00
2026-02-27 23:33:56 +03:00
2026-02-27 23:33:56 +03:00
2026-03-15 23:13:25 +03:00
2026-02-04 02:19:50 +03:00
2026-02-27 23:33:56 +03:00
2026-02-04 02:19:50 +03:00
2026-02-27 23:33:56 +03:00

Documentation

This folder contains documentation and references for the Coffee Project Backend API.

Project Structure

cpv3/
├── api/                    # Versioned API routers
│   └── v1/
│       └── router.py       # Aggregates all module routers
├── common/                 # Cross-cutting concerns and utilities
│   └── schemas.py          # Base Pydantic schema
├── db/                     # Database configuration
│   ├── base.py             # SQLAlchemy base classes
│   ├── models.py           # All ORM models (optional central import)
│   └── session.py          # Database session management
├── infrastructure/         # App bootstrapping, config, security, external integrations
│   ├── settings.py         # Application settings (Pydantic)
│   ├── security.py         # Password hashing, JWT tokens
│   ├── auth.py             # Authentication dependencies
│   ├── deps.py             # Infrastructure-level dependencies
│   └── storage/            # Storage backends
│       ├── base.py         # StorageService and protocol
│       ├── local.py        # Local filesystem backend
│       ├── s3.py           # S3/MinIO backend
│       └── types.py        # Storage types
├── modules/                # Feature modules
│   ├── captions/
│   ├── files/              # File management (renamed from storage)
│   ├── jobs/
│   ├── media/
│   ├── projects/
│   ├── system/
│   ├── transcription/
│   ├── users/
│   └── webhooks/
└── main.py                 # FastAPI application entry point

Module Structure

Each module follows this structure:

  • router.py - HTTP concerns only (request/response, status codes, dependencies)
  • schemas.py - Pydantic DTOs only
  • service.py - Business logic + orchestration (calls repositories + other services)
  • repository.py - All DB queries (SQLAlchemy session usage)
  • models.py - ORM models only

API Versioning

The API uses URL-based versioning. All routes are mounted under /api/ prefix.

S
Description
No description provided
Readme 384 KiB
Languages
Python 99.2%
Dockerfile 0.7%
Mako 0.1%