How anmolverma404/healthy-heartechs works
Main Components
• Client/Frontend – Located in the “client” directory. It contains HTML, CSS, and JavaScript files along with assets (images, SVGs) and views (HTML templates for various pages like signin, signup, appointment, etc.). This is where users interact with the interface.
• Server/Backend – Found in the “server” directory. It includes the main server file (app.js), various controllers (auth.js, medical.js, records.js), models (representing collections/tables like user, appointment, diseases, etc.), middleware for authentication, and routes for handling API endpoints.
• External Services – The project uses a Google Maps API for locating nearby doctors, as noted in the README. Also, Firebase appears to be configured for hosting (see the .firebase folder and firebase.json).
Relationships and Interactions
• The Client interacts with the Server via API calls (for authentication, fetching medical data, booking appointments, etc.), as indicated by the presence of separate routes and controllers.
• The Server likely communicates with a MongoDB database (as per the README). Models for storing users, appointments, medicines (allopathic and ayurvedic), and other health-related data encapsulate the database interactions.
• The Google Maps API serves as an external service that the frontend (or possibly the backend) calls to retrieve location-based data.
Architectural Patterns & Design Principles
• Separation of Concerns – The project separates client-side views and logic from the backend API, clearly dividing responsibilities.
• MVC-like Pattern on the server side – Although not explicitly named, having controllers, routes, models, and middleware indicates an organized layering similar to the MVC (Model-View-Controller) pattern.
• Use of External Hosted Services – Firebase for hosting and Google Maps API for location features are external dependencies that integrate into the design.
Key Technologies
• Frontend: HTML, CSS, JavaScript, possibly the use of SCSS for styling (client style.scss, appointment.scss, etc.).
• Backend: Node.js along with Express-style routing (indicated by server/app.js and modular routes controllers).
• Database: MongoDB (as described in the README).
• APIs: Google Maps API for geolocation services, and potential Firebase integration for hosting.