FastAPI-based RESTful API project for Secret Santa draw management.
- 🔐 User authentication and authorization
- 🎲 Draw creation and management
- 👥 Participant addition and removal
- 🎁 Automatic matching algorithm
- 📧 Email notifications
- 🔄 Versioned API (v1)
- FastAPI 0.120.0 - Modern web framework
- Pydantic 2.12.3 - Data validation
- Python 3.13
- Uvicorn - ASGI server
- SQLAlchemy 2.0.36 - ORM
- PostgreSQL - Database
- Alembic 1.14.0 - Database migrations
# Clone the repository
git clone <repository-url>
cd santas_draw
# Copy environment file
cp .env.example .env
# Start all services
docker-compose up -d
# That's it! Application is running at http://localhost:8000
# API Docs: http://localhost:8000/docs- Docker & Docker Compose
No Python, PostgreSQL, or other dependencies needed!
# Start all services
docker-compose up -d
# Stop all services
docker-compose down
# View logs
docker-compose logs -f
# View application logs only
docker-compose logs -f app
# View database logs only
docker-compose logs -f postgres
# Rebuild and start
docker-compose up -d --build
# Stop and remove volumes
docker-compose down -vThe application uses environment variables loaded from .env file. Key settings:
APP_NAME- Application nameAPP_VERSION- Application versionDEBUG- Debug mode (True/False)API_VERSION- API versionHOST- Server hostPORT- Server portCORS_ORIGINS- CORS allowed originsDATABASE_URL- PostgreSQL connection stringDATABASE_ECHO- Log SQL queries (True/False)DATABASE_POOL_SIZE- Connection pool sizeDATABASE_MAX_OVERFLOW- Max overflow connections
After running the application:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
app/
├── main.py # Main application
├── models/ # Database models
├── schemas/ # Pydantic schemas
├── api/
│ ├── deps.py # Dependency injection
│ └── v1/ # API endpoints
├── config/ # Configuration
└── tasks/ # Background tasks
AGPL v3 - See LICENSE file for details.