How adityas1309/raktconnect works
Project type and purpose
• This is a full-stack MERN (MongoDB, Express, React, Node.js) application augmented by a standalone Python AI microservice.
• Purpose: connect hospitals, donors, and patients to manage blood inventory, track donations, forecast demand via AI, and handle blood requests.
File structure
• Top-level directories:
• ai-backend – Python service containing app.py, datasets (CSV), and requirements.txt for AI/ML data predictions
• client – React front-end (Vite) with component hierarchy for Auth, Landing, Donor, Hospital, Patient segments; Tailwind CSS, Recharts for visualizations
• server – Node.js/Express back-end with config (DB connection), models (Mongoose schemas), routes (APIs for auth, donor, hospital, patient), utilities (validation), and deployment config (vercel.json)
• Root contains package.json scripts to start client and server concurrently.
• Key patterns:
• Front-end ↔ Back-end via REST APIs
• Back-end ↔ Database via Mongoose (MVC pattern in server/models, server/controllers implicitly in routes)
• Back-end ↔ AI microservice via HTTP (treat ai-backend as separate microservice)
README for additional insights
• Architecture described indirectly via “MERN + AI-powered”
• Tech stack lists MongoDB, Express.js, React, Node.js, Recharts, Tailwind CSS, Python for AI
• Features map to three user segments with separate dashboards and analytics
Elements
– Clear, consistent labels on each component (e.g., “React Client”, “Express API”, “MongoDB”, “Python AI Service”)
• UI Components (e.g., blue rectangles)
• Microservices (e.g., orange hexagons)
– Notes/annotations for key endpoints (e.g., /api/hospital/inventory, /api/ai/forecast)