How martin226/slideitin works
Main Project Components
• Frontend:
• Located in the “frontend/” directory, it’s a Next.js application (built with React, TypeScript, and Tailwind CSS).
• Responsible for the user interface, handling uploads, theme selection, configuration, and displaying real-time progress.
• Backend API Service:
• Found under “backend/api/” with Go code (Gin framework). It handles receiving client requests, managing business logic, interfacing with Google Cloud Firestore for job status, and setting up Cloud Tasks.
• Uses server-sent events (SSE) to relay real-time updates to the frontend.
• Slides Service Microservice:
• Located in “backend/slides-service/”, also in Go, and dedicated to slide generation tasks.
• Integrates with the Gemini 1.5 Flash API for AI-driven content creation and uses Marp for converting markdown into presentation slides.
• Cloud and Third-Party Services:
• Google Cloud Firestore for storage and job status tracking.
• Google Cloud Tasks for asynchronous job processing.
• External AI API (Gemini 1.5 Flash) and presentation tool (Marp).
Architectural Relationships
• The frontend interacts with the backend API via RESTful/SSE endpoints.
• The backend API receives file uploads and user preferences and then enqueues jobs (using Cloud Tasks) for slide generation.
• The slides-service microservice processes these jobs: it calls the Gemini API for content generation, applies the chosen theme (with available CSS files under “services/slides/themes/”), and finally produces the slide deck.
• Data flows through clearly defined channels, from the user to the frontend, then to the backend API, and finally to the slides service microservice.
• The entire process is orchestrated via Google Cloud’s build and deployment pipelines (as seen in “cloudbuild.yaml” and “lb.yaml”).
Architectural Patterns and Design Principles
• Microservices architecture: Separating the main API from the slide generation service enhances scalability and maintainability.
• Clear separation of concerns: Frontend handles presentation, the API handles data/business logic, and the slide service focuses on domain-specific operations.
• Cloud-native deployment: Deployment via Docker and Cloud Run indicates containerization and the use of managed cloud infrastructure.
• Real-time communication using Server-Sent Events guiding user feedback during slide generation.