metadata
title: CreatorStudio AI Backend Develop
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
CreatorStudio AI Backend
CreatorStudio AI is a powerful, enterprise-grade AI content generation and study platform. It leverages state-of-the-art Large Language Models (LLMs) and cloud infrastructure to transform documents and media into a wide array of educational and creative content.
π Features
- π Robust Authentication: Secure JWT-based authentication system with password hashing and user-scoped data access.
- π Source Management: Integrated AWS S3 file management for seamless document uploads, listing, and storage.
- π§ Advanced RAG (Retrieval-Augmented Generation): Chat with your uploaded documents using Azure AI Search and OpenAI/Gemini, enabling high-precision context-aware interactions.
- ποΈ Podcast Generation: Automatically transform text and documents into professional podcast scripts and audio segments.
- π¬ Video Generation: Create engaging video summaries and slide-based videos from static content using MoviePy and FFmpeg.
- π Interactive Study Tools:
- Flashcards: AI-generated flashcards tailored to your source material.
- Quizzes: Customizable quizzes with multiple-choice questions, hints, and detailed explanations.
- Mind Maps: Visualize complex relationships with auto-generated Mermaid.js mind maps.
- π Smart Reports: Generate structured, professional reports and summaries from various source materials.
π οΈ Tech Stack
- Framework: FastAPI (Python 3.x)
- Database: SQLAlchemy ORM with support for relational databases (e.g., MSSQL/PostgreSQL).
- AI Infrastructure:
- LLMs: OpenAI GPT-4o, Google Gemini Pro.
- RAG: Azure AI Search, Azure OpenAI Embeddings.
- Cloud & Processing:
- Storage: AWS S3, Azure Blob Storage.
- Media: MoviePy, FFmpeg, Pydub for audio/video processing.
- Documents: PyPDF2, pdf2image, Pillow for comprehensive document handling.
π Project Structure
CreatorStudio AI/
βββ api/ # FastAPI routers and endpoint logic
β βββ auth.py # Authentication & User management
β βββ sources.py # S3 Source file management
β βββ rag.py # Azure RAG indexing and querying
β βββ podcast.py # Podcast generation endpoints
β βββ flashcards.py # Flashcard generation logic
β βββ ... # Quizzes, Mindmaps, Reports, Video Gen
βββ core/ # Core application configuration
β βββ config.py # Pydantic settings & Environment management
β βββ database.py # DB connection & Session management
β βββ prompts.py # Centralized AI prompt templates
β βββ security.py # JWT & Password hashing utilities
βββ models/ # Data models
β βββ db_models.py # SQLAlchemy database models (User, Source, RAG, etc.)
β βββ schemas.py # Pydantic request/response schemas for API
βββ services/ # Business logic & 3rd party integrations
β βββ s3_service.py # AWS S3 integration
β βββ rag_service.py # Azure AI Search & RAG logic
β βββ podcast_service.py # Podcast creation & script logic
β βββ video_generator_service.py # Video processing
β βββ ... # Specialized services for all features
βββ main.py # Application entry point & Router inclusion
βββ requirements.txt # Project dependencies
βοΈ Setup & Installation
- Clone the repository
- Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install Dependencies:
pip install -r requirements.txt - Configure Environment Variables:
Create a
.envfile in the root directory based on the following template:# AWS Configuration AWS_ACCESS_KEY_ID=your_aws_key AWS_SECRET_ACCESS_KEY=your_aws_secret AWS_S3_BUCKET=your_bucket_name # Azure RAG & OpenAI AZURE_SEARCH_ENDPOINT=your_endpoint AZURE_SEARCH_KEY=your_search_key AZURE_OPENAI_API_KEY=your_openai_key AZURE_OPENAI_ENDPOINT=your_openai_endpoint # LLM Keys OPENAI_API_KEY=your_openai_key GEMINI_API_KEY=your_gemini_key # Database & Security DATABASE_URL=your_db_connection_string SECRET_KEY=your_jwt_secret_key - Run the Server:
The API will be available atpython main.pyhttp://localhost:8000. Access the interactive documentation athttp://localhost:8000/docs.
π API Documentation
The backend provides a fully interactive Swagger UI at /docs for testing and exploration.
- Auth:
/api/auth/register,/api/auth/login - Sources:
/api/sources/upload,/api/sources/list,/api/sources/{id} - RAG:
/api/rag/index,/api/rag/query - Content Generation:
/api/podcast,/api/flashcards,/api/mindmaps,/api/quizzes,/api/reports,/api/video_generator
Β© 2026 CreatorStudio AI Team. All rights reserved.