1.5 KiB
1.5 KiB
availabili.tf
Scheduling for TF2
Tech Stack
- Frontend: Vue 3 + TypeScript
- State Management: Pinia
- Backend: Flask + Python
- ORM: SQLAlchemy
- Validation: Pydantic
- spectree for OpenAPI documentation
- Flask-Migrate (Alembic) for database migrations
- Celery for async tasks
- Redis for Celery broker
- Database: PostgreSQL 17.1 (production) / SQLite (development)
Setup (dev)
docker compose build
docker compose up
DATABASE_URI=sqlite:///db.sqlite3 flask db upgrade
App will run at port 8000.
Setup (production)
Build the frontend app:
cd availabili.tf
npm run build
Build the rest of the containers:
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up
Perform initial database migration:
docker exec -it backend bash
flask db upgrade
OpenAPI
The backend will automatically serve its OpenAPI-compliant spec at
/apidoc/openapi.json
which can also be viewed at /apidoc/redoc
or
/apidoc/swagger
or /apidoc/scalar
.
To generate the frontend client:
npm run openapi-generate