How stmarya/aifrodevelopers5 works
Project type and purpose
• This is a full-stack monorepo combining:
• An Express.js backend that exposes REST API endpoints for text, image, document, and audio processing using the Google Gemini AI model
• A static HTML/CSS/JavaScript frontend chatbot UI served by the same Express server
• Purpose: provide a chat interface that can send various media and receive AI-generated responses.
File structure
• Top-level monorepo with one “backend” folder; within it:
• public/ – static files (index.html, script.js, style.css)
• src/ – server code broken down into controllers, routes, services, utils, plus index.js
• uploads/ – temporary storage for file uploads
• configuration files (.env, package.json)
• No separate “frontend” repo; frontend is static assets under backend/public
• No database layer or external persistent storage except temporary uploads
• Build/deploy artifacts: Dockerfile, docker-compose.yml at root
README for additional insights
• Lists features and API endpoints
• Describes configuration via environment variables
• Indicates use of Google Gemini API client in services/geminiClient.js
• Suggests development vs. production startup scripts (npm run dev, npm start)
• Sub-components inside “Express.js Server”:
• Routes layer (src/routes): maps endpoints to controllers
• Controllers layer (src/controllers): validate input, orchestrate services
• Services layer (src/services): geminiClient.js calls external API
• Utils layer (src/utils): fileHelper.js manages temporary files
• Static asset server (serves /public files)
• How middleware (file upload) sits between Routes and Controllers for file endpoints