H78 is a healthcare-focused web application built using the MERN stack (MongoDB, Express.js, React, and Node.js). It provides user authentication, interactive charts powered by D3.js, and insights into emerging healthcare technologies. The application is hosted on a single server with NGINX serving the frontend and proxying API calls to the backend.
- User Authentication: Secure login with JWT.
- Dashboard: Summaries and technical descriptions of healthcare innovations.
- Dynamic Charts: Interactive charts on Summary and Reports pages, using data retrieved via HTTP GET requests.
- Accessibility: ADA/WCAG-compliant design with ARIA roles and keyboard navigation.
- Frontend: React with React Router for navigation.
- Backend: Node.js with Express.js.
- Database: MongoDB.
- Authentication: JWT.
- Charting: D3.js.
- Server: NGINX to serve the frontend and proxy backend requests.
H78/
|-- backend/
| |-- server.js
| |-- routes/
| | |-- auth.js
| | |-- data.js
| |-- models/
| | |-- User.js
| |-- middleware/
| | |-- authMiddleware.js
| |-- config/
| | |-- db.js
| |-- script/
| | |-- createTestUser.js
| |-- .env
|-- frontend/
| |-- src/
| | |-- components/
| | | |-- Login.js
| | | |-- Dashboard.js
| | | |-- Summary.js
| | | |-- Reports.js
| | |-- App.js
| | |-- index.js
| | |-- setupTest.js
| |-- package.json
| |-- .env
- Node.js installed.
- MongoDB instance running locally or remotely.
- NGINX installed on the server for deployment.
- Navigate to the
backenddirectory:cd backend - Install dependencies:
npm install
- Start the backend server:
The backend runs on port
node server.js
3000.
- Navigate to the
frontenddirectory:cd ../frontend - Install dependencies:
npm install
- Build the frontend:
npm run build
- To view the app locally, you can use a simple HTTP server to serve the
buildfolder or integrate with the backend for a full-stack setup.
- Build the frontend:
cd frontend npm run build - Configure NGINX:
- Serve the frontend build files on port
80. - Proxy API requests to the backend server on port
3000.
- Serve the frontend build files on port
- Restart NGINX to apply the configuration.
- Ensure the MongoDB instance is accessible and the backend server is running