--- 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 ```text 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 1. **Clone the repository** 2. **Create a Virtual Environment**: ```bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` 3. **Install Dependencies**: ```bash pip install -r requirements.txt ``` 4. **Configure Environment Variables**: Create a `.env` file in the root directory based on the following template: ```env # 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 ``` 5. **Run the Server**: ```bash python main.py ``` The API will be available at `http://localhost:8000`. Access the interactive documentation at `http://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.