How norvinka306key/be_blizhe works
Riado is a FastAPI backend for a couples app. Its clearest evidenced workflow is a client request entering a registered API route, invoking authentication or calendar services, and accessing PostgreSQL through repositories managed by a per-request Unit of Work. Authentication validates credentials and issues cookie-carried JWTs; the README also documents refresh, logout, and profile retrieval. The tree and router registration establish additional product areas—spaces, ideas, diary, shared todos, tasks, uploads, and realtime—but their internal flows are not fully sampled, so those links are marked unverified where appropriate.
Main entry points: main.py FastAPI app · uow.py Unit of Work · auth_service.py Authentication · calendar_service.py Calendar logic
Components 23
API and access
- FastAPI app
main.py - Auth routes
src/api/v1/auth.py - Authentication
src/services/auth_service.py - JWT sessions
src/services/jwt_service.py
Couple features
- Calendar routes
src/api/v1/calendar.py - Calendar logic
src/services/calendar_service.py - Shared spaces
src/services/space_service.py - Ideas
src/services/ideas_service.py - Diary
src/services/diary_service.py - Relationship tasks
src/api/v1/relationship_tasks.py - Task logic
src/services/relationship_tasks_service.py - Shared todos
src/services/shared_todos_service.py - Media uploads
src/services/media_service.py
Persistence
- Account data
src/repositories/auth_repository.py - Refresh sessions
src/repositories/session_repository.py - Calendar data
src/repositories/calendar_repository.py - Unit of Work
src/repositories/uow.py - PostgreSQL
src/infrastructure/postgres/client.py - SQL executor
src/infrastructure/postgres/executor.py
Realtime
- Realtime middleware
src/middleware/realtime.py - Realtime service
src/services/realtime_service.py
Other components
- Client
- Redis
Connections 30
- Client → FastAPI app: sends requests
main.py - FastAPI app → Auth routes: registers routes
- FastAPI app → Calendar routes: registers routes
- FastAPI app → Relationship tasks: registers routes
- Auth routes → Authentication: calls
src/api/v1/auth.py - Authentication → JWT sessions: issues tokens
src/services/auth_service.py - Authentication → Account data: reads and creates users
src/services/auth_service.py - Authentication → Refresh sessions: uses sessions
src/services/auth_service.py - Calendar routes → Calendar logic: calls
src/api/v1/calendar.py - Calendar logic → Calendar data: reads and writes
src/services/calendar_service.py - Relationship tasks → Task logic: calls
src/api/v1/relationship_tasks.py - Authentication → Unit of Work: uses
src/services/auth_service.py - Calendar logic → Unit of Work: uses
src/services/calendar_service.py - Task logic → Unit of Work: uses
src/services/relationship_tasks_service.py - Unit of Work → Account data: constructs
src/repositories/uow.py - Unit of Work → Refresh sessions: constructs
src/repositories/uow.py - Unit of Work → Calendar data: constructs
src/repositories/uow.py - Unit of Work → PostgreSQL: acquires connection
src/repositories/uow.py - Unit of Work → SQL executor: creates
src/repositories/uow.py - SQL executor → PostgreSQL: executes queries
src/infrastructure/postgres/executor.py - FastAPI app → Realtime middleware: installs
main.py - Realtime middleware → Realtime service: dispatches events
src/middleware/realtime.py - FastAPI app → Realtime service: initializes
main.py - FastAPI app → Redis: connects
main.py - Realtime service → Redis: uses
- FastAPI app → Shared spaces: routes to
- FastAPI app → Ideas: routes to
- FastAPI app → Diary: routes to
- FastAPI app → Shared todos: routes to
- FastAPI app → Media uploads: routes to