How marvelai-org/presentationgenerator works
Project Type & Overall Purpose
• The project is a full-stack web application with a Next.js (React) frontend and a Python-based AI service backend.
• Its purpose is to generate professional presentations using AI, allowing users to create, customize, and export slide decks.
• It also integrates with external services such as Supabase for authentication and database operations (as indicated by the environment variables and Prisma configuration).
Main Components of the System
a. Frontend Application:
• Built with Next.js in the “src” directory.
• Contains multiple sub-components divided into features (e.g., AI interactions, presentation editor, dashboard, marketing landing page).
• Uses component-based design to separate areas like authentication, slide editor, feedback, command menus, and layout elements.
b. AI Service:
• A standalone Python service found under the “ai-services” directory.
• Exposes endpoints (including health-check and routes for presentation generation, slide editing, preview generation).
• Runs on a separate port (http://localhost:8000) and uses a RESTful API.
c. Database & External Services:
• The project leverages Supabase (as shown by environment variables) for authentication and probably database operations.
• Prisma in the “prisma” folder suggests there is an ORM layer for database interactions.
d. Infrastructure & Deployment:
• Docker and Docker Compose files (Dockerfile, docker-compose.yml) showcase containerized deployment.
• GitHub Actions workflows in the “.github/workflows” directory for CI/CD.
Relationships & Interactions
• The frontend communicates with the AI service over HTTP for generating and editing presentations.
• The frontend also interacts with the database (through Supabase and Prisma) for user authentication and data storage.
• Docker Compose orchestrates multi-container deployment where the frontend (Next.js) and backend services (AI service) run as separate containers.
• CI/CD pipelines automate linting, testing, building, and container creation, ensuring the integrity and smooth deployment of both services.
Architectural Patterns and Design Principles
• Component-Based UI: The React/Next.js project is organized into discrete components and pages (e.g., authentication, dashboard, editor, marketing) that enhance modularity.
• Microservices: There’s a clear separation between the UI layer and the AI service backend.
• Containerization: Use of Docker facilitates vendor-agnostic, self-hosted deployment.
• API-First Design: The AI service exposes RESTful endpoints (with Swagger and ReDoc documentation) that the frontend consumes.
• CI/CD practices: Automated workflows ensure code quality and streamlined deployment.
Relevant Technologies, Frameworks & Libraries
• Next.js, React, and TypeScript for the frontend.
• Python (with libraries likely listed in “requirements.txt”) for the AI service.
• Supabase for authentication and database support.
• Prisma as an ORM.
• Docker for containerization.
• GitHub Actions for CI/CD.
• Tailwind CSS, ESLint, and Prettier for styling and code quality.