How banerjeesoumya/misfits works
Main Components
• ML (Disease Prediction) Module:
• Found in the “DiseasePrediction” folder (and the root, via notebooks and Python files).
• Contains Jupyter notebooks, Python scripts (app.py, symptom.py), pickled models (disease_prediction_model.pkl, trained_model_symptom.pkl), and a vectorizer (vectorizer_symptom.pkl).
• Likely responsible for processing medical data and predicting diseases based on symptoms.
• Backend Service:
• Located in the “backend” directory.
• Contains Node/TypeScript code (src/index.ts and various route files for admin, doctor, and user endpoints).
• Uses Prisma for database schema migrations, indicating interaction with a relational database.
• Contains configuration files (package.json, tsconfig.json, etc.) and migration scripts for schema management.
• Frontend Service:
• Under the “frontend” folder.
• Contains React components (App.tsx, pages like Dashboard, Landing, authentication pages, etc.).
• Utilizes tools like Vite for the project build, Tailwind CSS for styling, and integrates libraries for state management and HTTP communication (seen in /src/lib/axios.ts).
• Provides the user interface that interacts with the backend service.
Relationships and Data Flow
• The Frontend communicates with the Backend API using HTTP requests.
• The Backend serves as the central business logic and data provider, interfacing with:
• The Database (through Prisma migrations and schema). Although the specific DB server isn’t in the file tree, the presence of Prisma suggests a relational database (such as PostgreSQL or MySQL).
• The ML Module. When a disease prediction is requested by the frontend (or another part of the system), the backend could either:
▪ Call the Python service (via a REST API, inter-process communication, or direct integration), or
▪ Run processes that load the ML models stored as pickled files.
• Integration points and flows between these components must show data input and output clearly.
Noting Architectural Patterns and Technologies
• MVC/Microservice-like Separation:
• The layered separation between frontend, backend, and the ML prediction module.
• The backend organizes endpoints into routes (admin, doctor, user) that can be seen as controllers within an MVC structure.
• Technology Stack:
• Python ML stack: Jupyter notebooks, pickle models, CSV data.
• Backend: Node.js/TypeScript, Prisma for ORM and migrations.
• Frontend: React (with TypeScript) built using Vite and styled with Tailwind CSS.
• Each component should be clearly labeled along with the technology and role it plays.