How vikramchavan888/prevoyance-solutions works
Main Components
• Frontend Client:
• Built with React (using Vite as the build tool).
• Contains multiple pages such as Home, Login, Register, Profile, Admin Dashboard, and Add User.
• Uses libraries like React Router for routing, Axios for HTTP requests, and Tailwind CSS for styling.
• Backend Server:
• Developed using Node.js and Express.
• Provides endpoints for user authentication (JWT based), user data retrieval, and bulk Excel file upload.
• Implements middleware for file uploads (using Multer) and processing Excel files (using the XLSX library).
• Contains modules like bcrypt for password hashing and JWT for secure token management.
• Database:
• MySQL is used to store user details including profile pictures, with a users table as outlined in the README.
• Static File Handling:
• Server serves static files (e.g., locally stored profile pictures and uploaded Excel files from the “uploads” folder).
Relationships and Interactions
• The Frontend communicates with the Backend via HTTP/HTTPS APIs to perform actions like registration, login, and data retrieval.
• The backend authenticates users using JWT tokens, processes requests, and interacts with the MySQL database for CRUD operations.
• The backend handles bulk uploads by accepting an Excel file, parsing its contents using the XLSX library, and inserting the data into the database.
• Static files (profile images, Excel examples) are stored and served from designated directories within the server structure.
Architectural Patterns & Design Principles
• Client-Server model: There is a clear separation between the frontend (client) and backend (server), facilitating modular development and deployment.
• REST API design: The server exposes RESTful endpoints for user management and file uploads.
• Security practices: JWT-based authentication and encryption (using bcrypt) enforce secure access.
• Separation of concerns: The project cleanly divides presentation (frontend) from business logic (backend) and data persistence (MySQL database).
Technologies and Frameworks
• Frontend: React, React Router, Axios, Tailwind CSS, Vite.
• Backend: Node.js, Express, JWT, Multer, XLSX, bcrypt.
• Database: MySQL.