A comprehensive FastAPI application for file upload and management with MinIO storage, PostgreSQL database, Redis caching, and Celery task processing.
- 🔐 JWT Authentication & Authorization
- 📁 File Upload & Management with MinIO
- 🗃️ PostgreSQL Database with SQLAlchemy ORM
- 🔧 Database Migrations with Alembic
- 🔄 Async Task Processing with Celery & Redis
- 🧪 Comprehensive Testing Suite
- 🐳 Docker & Docker Compose Setup
- 📦 UV Package Management
- Docker & Docker Compose
- Python 3.11+
- UV (for local development)
- Clone the repository:
git clone https://github.com/conorburke/lodestone-api.git
cd lodestone-api- Set up environment variables:
cp .env.example .env
# Edit .env with your configurations- Start all services:
make build
make up- Run database migrations:
make mmigrate-
The API will be available at
http://localhost:8000 -
MinIO Console at
http://localhost:9001
POST /api/v1/auth/register- Register new userPOST /api/v1/auth/login- Login userGET /api/v1/auth/me- Get current user info
POST /api/v1/files/upload- Upload fileGET /api/v1/files/- List user filesGET /api/v1/files/{file_id}- Get file detailsGET /api/v1/files/{file_id}/download- Get download URLDELETE /api/v1/files/{file_id}- Delete file
Run the test suite:
make test- FastAPI: Web framework and API server
- PostgreSQL: Primary database for metadata and users
- MinIO: S3-compatible object storage for files
- Redis: Message broker and caching for worker jobs
- Celery: Async task processing
app/
├── api/ # API route handlers
├── core/ # Core functionality (auth, storage)
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas
├── tasks/ # Celery tasks
└── workers/ # Celery configuration
Create a new migration:
make create-migration msg="<migration-name>"Apply migrations:
make migrate- Health check endpoint:
GET /health - API documentation:
http://localhost:8000/docs - MinIO console:
http://localhost:9001
- JWT-based authentication
- Password hashing with bcrypt
- File size limits (100MB default)
- CORS configuration for frontend integration
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
MIT License