"# Group 2 COMP308 Project - Health Monitoring System
A full-stack health monitoring application that enables nurses to track patient vital signs and patients to log daily health information, track symptoms, and receive AI-powered condition predictions.
- Record Vital Signs – Log patient body temperature, heart rate, blood pressure, and respiratory rate
- View Patient Data – Access previous visit records and patient health history
- Send Motivational Tips – Provide encouragement and health tips to patients
- Generate Reports – Create and send medical reports to patients
- Daily Health Logging – Record daily metrics including pulse rate, blood pressure, weight, temperature, and respiratory rate
- Symptom Checklist – Track and submit symptoms for monitoring
- View Motivational Tips – Receive tips and encouragement from nurses
- AI Condition Prediction – Get health condition predictions powered by TensorFlow.js
- React 18 – UI library
- React Router v6 – Client-side routing
- Apollo Client – GraphQL client
- TailwindCSS – Utility-first styling
- TensorFlow.js – Machine learning predictions
- React Toastify – Toast notifications
- Node.js + Express – Server framework
- GraphQL – API query language (using
express-graphql) - MongoDB + Mongoose – Database and ODM
- JWT – Authentication tokens
- bcrypt – Password hashing
Group2COMP308Project/
├── backend/
│ ├── graphql/ # GraphQL schema and resolvers
│ ├── models/ # Mongoose models (User, VitalSign, DailyInfo, etc.)
│ ├── routes/ # REST auth routes
│ ├── utils/ # Authentication utilities
│ ├── index.js # Server entry point
│ └── .env.example # Environment variables template
├── frontend/
│ ├── src/
│ │ ├── Modules/ # React components (dashboards, forms, etc.)
│ │ ├── Context/ # React context providers
│ │ └── App.js # Main application with routing
│ └── .env.example # Environment variables template
└── README.md
- Node.js (v18 or higher recommended)
- npm or yarn
- MongoDB (local instance or MongoDB Atlas)
-
Clone the repository
git clone https://github.com/your-username/Group2COMP308Project.git cd Group2COMP308Project -
Setup Backend
cd backend npm install cp .env.example .env # Edit .env with your MongoDB URI and JWT secret
-
Setup Frontend
cd ../frontend npm install cp .env.example .env # Edit .env if needed (default connects to localhost:4000)
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/... |
JWT_SECRET |
Secret key for JWT tokens | your_secure_secret_key |
PORT |
Server port (optional) | 4000 |
| Variable | Description | Default |
|---|---|---|
REACT_APP_API_URL |
Backend API URL | http://localhost:4000 |
Start Backend (runs on port 4000):
cd backend
npm startStart Frontend (runs on port 3000):
cd frontend
npm startOpen http://localhost:3000 to view the app in your browser.
The backend exposes a GraphQL endpoint at /graphql with GraphiQL enabled for development.
# Get all patients
query {
patients {
id
name
email
age
gender
}
}
# Get vital signs recorded by a nurse
query {
getVitalSignsByNurseId(nurseId: "...") {
bodyTemperature
heartRate
bloodPressure
respiratoryRate
createdAt
}
}# Record vital signs
mutation {
recordVitalSigns(
nurseId: "..."
patientId: "..."
bodyTemperature: 98.6
heartRate: 72
bloodPressure: "120/80"
respiratoryRate: 16
) {
id
createdAt
}
}- Users register and login via REST endpoints at
/api/auth - JWT tokens are stored in localStorage
- Protected routes require valid authentication tokens
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Honesty Werinwo & Group 2 Contributors - COMP308 Project
Made with ❤️ for COMP308
"