Production-ready backend for automating content generation and social media publishing.
- Clean Architecture: Modular structure (API, Core, Services, Models).
- FastAPI: High performance async API.
- PostgreSQL: Robust data persistence.
- MinIO: S3-compatible object storage for media assets.
- Ollama Integration: Local AI text generation support.
- Scheduler: Background tasks using APScheduler.
- Dockerized: Easy deployment with Docker Compose.
-
Environment Variables: Copy
.env.exampleto.envand fill in your credentials.cp .env.example .env
-
Run with Docker: The easiest way to run the full stack (App + DB + MinIO).
docker-compose up --build
-
Access:
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
- MinIO Console: http://localhost:9001 (User/Pass: minioadmin)
- Image Service API: http://localhost:8001/docs
- Video Service API: http://localhost:8002/docs
A standalone microservice for Stable Diffusion image generation.
- Endpoint:
POST /generate - Config: Controlled by
SD_API_URL.
A standalone microservice for creating 9:16 videos using FFmpeg.
- Endpoint:
POST /generate - Features: Concatenates images, adds audio, and uploads to MinIO.
If you want to run locally without Docker for the app:
- Install Dependencies:
pip install -r requirements.txt
- Start Dependencies: Ensure Postgres and MinIO are running (e.g., via docker-compose).
- Run App:
uvicorn app.main:app --reload
POST /api/v1/auth/signup: Register a new user.POST /api/v1/auth/login/access-token: Get JWT token.POST /api/v1/content/: Generate content (Ollama/OpenAI).POST /api/v1/posts/: Schedule a post.
app/core: Configuration, Security, DB session.app/api: Routes and Dependencies.app/services: Business logic (Auth, Content, Media, Social).app/models: Database tables (SQLModel).