How arushi-866/brainverse works
Main Components
• Frontend Client:
– Represent the React.js application starting from the index.html and captured within the “src” directory.
– This includes various UI components (Dashboard, Chatbot, HomePage, Profile, etc.), pages, modals, and utility functions such as ProtectedRoute.
• Backend Server:
– Located in the “backend” folder, built with Node.js/Express.
– Split into controllers (e.g., authController.js, user.js), routes (auth.js, flashcards.js, mindmap.js, etc.), middleware (auth.js, error.js), and models (User.js).
– Also includes configuration for Cloudinary (cloudinary.js) and database connection (db.js).
• Database:
– MongoDB is used for data storage and persistence.
• AI/NLP Service:
– The Gemini 1.5 Pro API is integrated with the backend to handle AI-driven responses (StudyBuddy Chatbot) and question generation.
• File & Document Ingestion:
– The system supports uploading PDFs and documents for content ingestion. This likely interacts with both the backend (handling file uploads/processing) and external storage/integration with services like Cloudinary.
Relationships and Interactions
• Frontend <-> Backend:
• Backend <-> Database:
– Show data flows where backend controllers and routes interact with MongoDB for CRUD operations.
• Backend <-> External Services:
– Also, indicate interactions with Cloudinary for media or file handling.
Architectural Patterns & Design Principles
• Separation of Concerns: Clearly delineate frontend, backend, and external integrations.
• Modularization: The backend is organized into controllers, middleware, and routes to handle different functionalities.
• API-First Approach: Emphasize RESTful communication between the client and server.
• Security and Error Handling: Note usage of authentication middleware and error handlers.
Relevant Technology Labels
• For the backend, note Express.js as the framework with routes, middleware, and controllers.
• MongoDB for the database.
• Cloudinary (for media uploads) and the Gemini 1.5 Pro API (for AI/NLP operations) as external services.
• Optionally, include Tailwind CSS for UI styling as part of the frontend’s tech stack.