A full-stack health dashboard website that connects to smartwatches via Web Bluetooth API to display real-time health metrics.
- Web Bluetooth Integration: Connect to smartwatches and access GATT services
- Real-time Health Metrics: Heart rate, steps, SpO₂, and sleep data
- Interactive Charts: Animated, color-coded visualizations
- Authentication System: User login and registration
- Real-time Updates: WebSocket communication for live data
- Mobile Responsive: Modern, mobile-friendly UI
- Mock Data Support: Test without physical devices
- Node.js + Express.js
- MongoDB for data storage
- Socket.IO for real-time communication
- JWT for authentication
- React.js with TypeScript
- Tailwind CSS for styling
- Chart.js/Recharts for data visualization
- Web Bluetooth API
health-dashboard/
├── backend/ # Node.js backend
│ ├── src/
│ │ ├── controllers/ # Route controllers
│ │ ├── models/ # Database models
│ │ ├── routes/ # API routes
│ │ ├── middleware/ # Custom middleware
│ │ └── server.js # Main server file
│ └── package.json
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ ├── utils/ # Utility functions
│ │ ├── App.jsx # Main app component
│ │ └── main.jsx # Entry point
│ └── package.json
└── package.json # Root package.json
-
Install dependencies:
npm run install:all
-
Set up environment variables:
- Copy
.env.example
to.env
in backend directory - Add MongoDB connection string and JWT secret
- Copy
-
Run development servers:
npm run dev
-
Open browser: Navigate to
http://localhost:3000
The app uses the Web Bluetooth API to:
- Connect to smartwatches with standard GATT services
- Access heart rate, step count, SpO₂, and other health data
- Receive real-time notifications when new data is available
- Handle connection/disconnection events gracefully
- Heart Rate: Real-time BPM with historical trends
- Step Count: Daily step tracking with goals
- SpO₂: Blood oxygen saturation levels
- Sleep Data: Sleep duration and quality tracking
cd backend
npm run dev
cd frontend
npm run dev
MIT