How skydenqqq/hkust-maie6000c-skyden-qiu works
This starter demonstrates a case-triage workflow: a user submits a case through the API, which persists it and a pending job; the worker claims the job, calls the internal AI service, and saves the triage result for retrieval through the API. Shared schemas, configuration, and database-session code support the services. Health checks, structured logging, and metrics are exposed by the services. Worker-to-database and service-to-PostgreSQL links are based on the README workflow and database description; detailed deployment and migration wiring is outside this runtime view.
Main entry points: app/main.py Case API · db.py DB sessions · app/main.py Job worker · models.py Case and job models
Components 9
Runtime services
- Case API
services/api/app/main.py - Job worker
services/worker/app/main.py - AI triage
services/ai/app/main.py
Shared foundation
- Data schemas
services/common/schemas.py - Settings and logging
services/common/config.py
Persistence
- DB sessions
services/common/db.py - Case and job models
services/common/models.py
Other components
- User
- PostgreSQL
Connections 14
- User → Case API: submits cases
README.md - Case API → Case and job models: creates and queries
services/api/app/main.py - Case API → DB sessions: gets sessions
services/api/app/main.py - Case API → Data schemas: validates and returns
services/api/app/main.py - Case API → Job worker: queues jobs for
README.md - Job worker → DB sessions: gets sessions
services/worker/app/main.py - Job worker → Case and job models: claims and updates
services/worker/app/main.py - Job worker → AI triage: sends triage request
services/worker/app/main.py - AI triage → Data schemas: validates and returns
services/ai/app/main.py - Case API → User: returns case state
README.md - DB sessions → Settings and logging: reads database settings
services/common/db.py - Case and job models → DB sessions: uses declarative base
services/common/models.py - Data schemas → Case and job models: uses status enums
services/common/schemas.py - DB sessions → PostgreSQL: connects to
README.md