REST API backend for my portfolio, providing data for projects and certificates.
- FastAPI - Modern, high-performance Python web framework
- UV - Fast Python package manager and project tool
- Supabase - PostgreSQL database with Storage for images
- Redis - In-memory caching for fast response times
- Redis Caching: Async caching decorator with automatic cache invalidation on data changes
- Connection Pooling: Efficient Redis connection management for high performance
- Environment Config: Pydantic Settings for type-safe configuration from
.env - Image Storage: Supabase Storage integration for project images (light/dark variants)
- API Key Auth: Simple API key authentication for protected endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /projects/ |
List all projects (with caching) |
| POST | /projects/ |
Create a project |
| PUT | /projects/{id} |
Update a project |
| DELETE | /projects/{id} |
Delete a project |
| GET | /certificates/ |
List all certificates (with caching) |
| POST | /certificates/ |
Create a certificate |
| DELETE | /certificates/{id} |
Delete a certificate |
# Install dependencies
uv sync
# Run development server
uv run uvicorn main:app --reload
# Format code
uv run ruff format .
# Lint code
uv run ruff check .API_KEY=your-api-key
SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-key
REDIS_URL=redis://localhost:6379