How bakrianoo/temporal-101-course works
This is a Temporal 101 teaching repository, not one production application: it progresses from a synchronous S3-to-Markdown script to a Temporal-orchestrated version, then to multi-document AI contract review with human approval and revision. The FastAPI client starts workflows and exposes status, report, and review controls; workers register workflow and activity code with Temporal. The README documents the product capabilities, while sampled source supports the specific calls shown below. The local Temporal server is an external runtime dependency; infrastructure and setup files are not mapped as product components.
Main entry points: ai-contract-review/activities.py Review activities · pdf-extraction-02-temporal/activities.py PDF activities · worker.py Review worker · parent_workflow.py Review coordinator
Components 17
Client API
- FastAPI client
apps/client-app/main.py
Plain PDF
- Synchronous pipeline
apps/pdf-extraction-01-plain/process_pdf.py
Temporal PDF
- PDF worker
apps/pdf-extraction-02-temporal/worker.py - PDF workflow
apps/pdf-extraction-02-temporal/workflow_process_pdf.py - PDF activities
apps/pdf-extraction-02-temporal/activities.py - S3 helpers and data
apps/pdf-extraction-02-temporal/helpers.py
Contract Review
- Review worker
apps/ai-contract-review/worker.py - Review coordinator
apps/ai-contract-review/parent_workflow.py - Document analysis
apps/ai-contract-review/child_workflow.py - Review activities
apps/ai-contract-review/activities.py - Analysis prompts
apps/ai-contract-review/prompts.py
Other components
- API caller
- Temporal server
- S3 storage
- PDF-to-Markdown
- OpenRouter LLM
- Human reviewer
Connections 26
- API caller → FastAPI client: calls routes
- API caller → Synchronous pipeline: runs script
- Synchronous pipeline → S3 storage: downloads and uploads
- Synchronous pipeline → PDF-to-Markdown: converts PDF
- FastAPI client → Temporal server: starts and queries workflows
- Temporal server → PDF worker: dispatches tasks
- PDF worker → PDF workflow: registers workflow
- PDF worker → PDF activities: registers activities
- PDF workflow → PDF activities: executes activities
- PDF activities → S3 helpers and data: uses S3 helpers
- PDF activities → S3 storage: downloads and uploads
- PDF activities → PDF-to-Markdown: converts PDF
- Temporal server → Review worker: dispatches tasks
- Review worker → Review coordinator: registers workflow
- Review worker → Document analysis: registers workflow
- Review worker → Review activities: registers activities
- Review coordinator → Document analysis: starts child workflows
- Review coordinator → Review activities: executes synthesis and revision
- Document analysis → Review activities: executes extraction and analysis
- Document analysis → Analysis prompts: formats analysis prompt
- Review coordinator → Analysis prompts: formats report prompts
- Review activities → S3 storage: downloads PDFs
- Review activities → PDF-to-Markdown: extracts PDF text
- Review activities → OpenRouter LLM: sends LLM prompts
- Human reviewer → FastAPI client: assigns and decides
- FastAPI client → Temporal server: queries and signals review