A personal file storage service MVP (like a mini-Dropbox) built with a strict Domain-Driven Design (DDD) and Clean Architecture approach.
- Language: Python 3.12+
- Web Framework: FastAPI (Async)
- Database: PostgreSQL (Async via
asyncpg) - ORM: SQLAlchemy 2.0
- Object Storage: MinIO (S3 Compatible)
- Dependency Manager:
uv - Migrations: Alembic
- Containerization: Docker & Docker Compose
This project adheres to the Dependency Rule: dependencies only point inwards.
src/
├── domain/ # Enterprise Logic (Pure Python, No Frameworks)
├── application/ # Application Business Rules (Use Cases, DTOs)
├── interfaces/ # Interface Adapters (FastAPI Routers, Pydantic Schemas)
└── infrastructure/ # Frameworks & Drivers (SQLAlchemy, MinIO, Settings)
- User Management: Registration, Login, Authentication.
- File System:
- Upload/Download files.
- Create/List folders.
- Hierarchical structure.
- Sharing:
- Generate public read-only links.
- Expiration support.
- Disable/Revoke links.
- Sync (Delta):
- (In Progress) polling mechanism for changes.
The project relies on environment variables. For local development, default values are provided in src/infrastructure/config/settings.py.
Spin up PostgreSQL and MinIO:
docker-compose up -duv syncApply database schema changes:
uv run alembic upgrade headStart the FastAPI development server:
uv run fastapi dev src/interfaces/api/main.py- API:
http://localhost:8000 - Docs:
http://localhost:8000/docs
Run the test suite (requires Docker infra running):
uv run pytestSee ARCHITECTURE_RULES.md for detailed coding guidelines regarding the DDD structure and strict separation of concerns.