A cutting-edge web application designed to help users track fitness activities, monitor vital signs, and receive personalized health recommendations. ๐โโ๏ธ๐ช๐
- ๐ข Node.js (v18 or higher)
- ๐ MongoDB (v5.0 or higher)
- ๐ง Git
-
๐ฅ Clone the repository
git clone <repository-url> cd health_pulse
-
๐ง Backend Setup
cd backend npm install cp .env.example .envConfigure your
.envfile:NODE_ENV=development PORT=5000 MONGODB_URI=mongodb://localhost:27017/healthpulse JWT_SECRET=your_jwt_secret_here JWT_EXPIRE=7d
-
๐จ Frontend Setup
cd ../frontend npm installCreate
.envfile:VITE_API_URL=http://localhost:5000/api VITE_APP_NAME=Health Pulse
-
๐ Start MongoDB
# Windows net start MongoDB # macOS/Linux sudo systemctl start mongod
-
๐ Run the Application
Backend (Terminal 1):
cd backend npm run devFrontend (Terminal 2):
cd frontend npm run dev -
๐ Access the Application
- ๐จ Frontend: http://localhost:5173
- โก Backend API: http://localhost:5000/api
- โก Runtime: Node.js with TypeScript
- ๐ Framework: Express.js
- ๐ Database: MongoDB with Mongoose ODM
- โ Validation: Zod schemas
- ๐ Authentication: JWT tokens
- โ๏ธ Framework: React 18 with TypeScript
- โก Build Tool: Vite
- ๐จ Styling: Tailwind CSS + Material UI 3
- ๐ State Management: React Query (TanStack Query)
- ๐ฌ Component Testing: Vitest
- ๐ญ E2E Testing: Playwright
๐ health_pulse/
โโโ ๐ง backend/
โ โโโ ๐ src/
โ โ โโโ ๐ฎ controllers/ # Route handlers
โ โ โโโ ๐ models/ # Database models
โ โ โโโ ๐ฃ๏ธ routes/ # API routes
โ โ โโโ ๐ middleware/ # Custom middleware
โ โ โโโ โ๏ธ services/ # Business logic
โ โ โโโ ๐ ๏ธ utils/ # Helper functions
โ โ โโโ ๐ types/ # TypeScript types
โ โโโ ๐ฆ package.json
โโโ ๐จ frontend/
โ โโโ ๐ src/
โ โ โโโ ๐งฉ components/ # React components
โ โ โ โโโ ๐จ ui/ # Atomic design structure
โ โ โโโ ๐ pages/ # Page components
โ โ โโโ ๐ช hooks/ # Custom React hooks
โ โ โโโ ๐ services/ # API services
โ โ โโโ ๐ types/ # TypeScript types
โ โโโ ๐ฆ package.json
โโโ ๐งช tests/ # Test files
cd frontend
npm run test# Install Playwright browsers
npx playwright install
# Run E2E tests
npm run test:e2enpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run test # Run testsnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run test # Run component tests
npm run test:e2e # Run E2E tests- ๐ค User Profile Management: Personal information, health data import
- ๐โโ๏ธ Fitness Activity Tracking: Workout logging, goal setting, progress monitoring
- ๐ Vital Signs Monitoring: Blood pressure, heart rate, weight tracking with alerts
- ๐ค Health Recommendations: AI-driven personalized suggestions
- ๐ Educational Resources: Searchable library of health content
- ๐ฅ Healthcare Connectivity: Provider directory, appointment scheduling
- ๐ Dashboard: Comprehensive health overview with visualizations
- ๐ RESTful API with proper MVC architecture
- ๐ TypeScript throughout the stack
- ๐ฑ Responsive design with Material Design 3
- โก Real-time data updates
- ๐ Secure authentication with JWT
- โ Form validation with Zod schemas
- ๐จ Error handling and logging
POST /api/auth/register- ๐ User registrationPOST /api/auth/login- ๐ User loginGET /api/auth/me- ๐ค Get current user
GET /api/users/profile- ๐ Get user profilePUT /api/users/profile- โ๏ธ Update user profile
GET /api/fitness/activities- ๐ Get activitiesPOST /api/fitness/activities- โ Log new activityPUT /api/fitness/activities/:id- โ๏ธ Update activity
GET /api/vitals- ๐ Get vital signs historyPOST /api/vitals- โ Add vital signs entry
GET /api/recommendations- ๐ก Get personalized recommendations
- โ๏ธ Set
NODE_ENV=production - ๐ Configure production MongoDB URI
- ๐ Set secure JWT secret
- ๐ Enable SSL/TLS
- ๐ Configure CORS for production domains
- ๐ Database indexing and optimization
- ๐ฆ API rate limiting
- ๐ Error logging and monitoring
- ๐ CDN integration for static assets
- โ๏ธ Load balancing for scalability
- ๐ Follow the established project structure
- ๐งช Write comprehensive tests for new features
- ๐ Ensure TypeScript compliance
- ๐จ Implement proper error handling
- โ Validate all user inputs
- โฟ Maintain accessibility standards (WCAG 2.1 AA)
- ๐ Update documentation for API changes
This project is developed as part of a capstone project for educational purposes. ๐
๐ MongoDB Connection Error
# Check if MongoDB is running
mongosh
# If not running, start MongoDB service๐ Port Already in Use
# Kill process on port 5000
npx kill-port 5000
# Or change PORT in .env file๐ฆ Module Not Found
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installFor issues and questions, please check the project documentation or create an issue in the repository. ๐ค