How nemoxus/sushruta works
Main Components
• Frontend (User Interface)
• Built with React (files like App.jsx, CheckUpBtn.jsx, InputDataPage.jsx, etc.) and configured using Vite (vite.config.js) with package.json and index.html.
• Utilizes supporting assets (in src/assets), utility libraries (src/lib/utils.js), and styling (e.g., CSS files, index.css).
• Communicates with the backend via API calls.
• Includes Firebase configuration (src/firebaseConfig.js) which hints at user authentication/data management or real-time updates.
• Backend (AI/ML Service)
• Encapsulated in the sushruta-backend folder.
• Contains the main server file (ai_server.py) which likely exposes endpoints for predictions.
• Holds machine learning model files (rf_model.pkl, stacking_model.pkl) and a Procfile (suggesting deployment on a platform like Heroku).
• Manages ML tasks using Python libraries such as Scikit-Learn, XGBoost, TensorFlow/Keras, etc., as detailed in the README.
Understand the Relationships and Interactions
• User inputs (patient data) submitted from the frontend to the backend.
• Response containing prediction results coming back from the backend.
• The backend while processing may use:
• Pre-trained models (Random Forest, Stacking ensemble, ANN) to compute predictions.
• Data transformation and feature selection techniques (e.g., RFE, PCA) before prediction.
• Firebase might serve as a user/session management system (or other real-time service), so include its interactions if it plays a role in authentication or data persistence.
Architectural Patterns and Design Principles
• Separation of Concerns: The clear split between frontend and backend components ensures that UI/UX logic is decoupled from business logic, which in this case is ML-driven predictive analytics.
• Modular Design: Each React component (e.g., CheckUpBtn, Predict, SignInBtn) handles individual UI pieces, and the backend is organized to encapsulate ML models and prediction business logic.
• API Communication: Illustrate the RESTful API interactions (or similar protocol) between the frontend and backend.
• Deployment and Build Tools: Mention Vite (for frontend development), Procfile (for backend deployment), and configuration files like vercel.json and eslint.config.js that support CI/CD and linting.
Specific Elements to Incorporate
• From User → Frontend → Backend → ML Models → Backend → Frontend → Display to User.
• Concise annotations for each part:
• Frontend: “Built with React & Vite; handles user interactions & API requests.”
• Backend: “Python service that processes patient data, selects features (using RFE/PCA), and utilizes ensemble & ANN models to predict heart disease.”
• Firebase: “Manages authentication and/or real-time data services.”