Order processing demo using FastAPI, Temporal, and PostgreSQL.
uv syncdocker compose up -dalembic upgrade headuvicorn app:get_app --factoryWorkflows and activities are located in app/infrastructure/workflows/:
order.py—NewOrderWorkflowwithwait_for_conditionandsend_confirmationactivitiesprint_every_minute.py—PrintEveryMinuteWorkflowscheduled to run every minute via Temporal Schedulesworker.py— Temporal worker setup, task queue:new-orders
The worker starts automatically with the application on startup. On first start, start_schedules() registers the print-every-minute schedule in Temporal (idempotent and safe to restart).
| Interface | URL |
|---|---|
| OpenAPI docs | http://localhost:8000/docs |
| Temporal UI | http://localhost:8233 |