Operational backend system designed to automate sports team convocations, structured communication workflows, and real-world coordination processes inside sports organizations.
- Operational workflow automation
- Structured communication generation
- Controlled AI-assisted refinement
- WhatsApp delivery integration
- Deterministic backend orchestration
- Real-world organizational utility
- Select scheduled match
- Generate deterministic convocation draft
- Adjust player availability
- Optionally refine message using AI
- Confirm final communication
- Deliver through WhatsApp
Layered modular monolith with hexagonal-inspired boundaries:
app/
├── presentation/ # HTTP routes, request/response schemas
├── application/ # Use cases, workflow orchestration
├── domain/ # Entities, business rules (no external dependencies)
├── infrastructure/ # Database, AI adapter, WhatsApp adapter
├── config/ # Settings, logging
└── shared/ # Cross-cutting utilities
Dependency direction: presentation → application → domain
Infrastructure is injected; domain never depends on it.
| Layer | Technology |
|---|---|
| Backend | Python 3.12, FastAPI |
| ORM | SQLAlchemy 2.x |
| Database | PostgreSQL 16 |
| Migrations | Alembic |
| Config | Pydantic Settings |
| AI | OpenAI API (optional refinement) |
| Messaging | WhatsApp API |
| Infrastructure | Docker, Fly.io |
- Docker and Docker Compose installed
- Python 3.12 (for running outside Docker)
git clone <repository-url>
cd convocation-automation-system
cp .env.example .envEdit .env and fill in OPENAI_API_KEY and WHATSAPP_API_KEY.
docker-compose up --buildThe API will be available at http://localhost:8000.
curl http://localhost:8000/health
# {"status": "ok"}docker-compose exec api alembic upgrade headpython -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadRequires a running PostgreSQL instance and a valid DATABASE_URL in .env.
- AI is treated as a constrained external dependency
- Operational truth comes from structured persistence
- Human confirmation remains the final authority
- Simplicity is prioritized over premature complexity