Skip to content

web application designed to help users track fitness activities, monitor vital signs, and receive personalized health recommendations. ๐Ÿƒโ€โ™‚๏ธ๐Ÿ’ช๐Ÿ“Š

Notifications You must be signed in to change notification settings

MehvishSheikh/Health-Pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

81 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’“ Health Pulse - Personal Health & Wellness Tracker

A cutting-edge web application designed to help users track fitness activities, monitor vital signs, and receive personalized health recommendations. ๐Ÿƒโ€โ™‚๏ธ๐Ÿ’ช๐Ÿ“Š

image

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

  • ๐ŸŸข Node.js (v18 or higher)
  • ๐Ÿƒ MongoDB (v5.0 or higher)
  • ๐Ÿ”ง Git

โš™๏ธ Installation

  1. ๐Ÿ“ฅ Clone the repository

    git clone <repository-url>
    cd health_pulse
  2. ๐Ÿ”ง Backend Setup

    cd backend
    npm install
    cp .env.example .env

    Configure your .env file:

    NODE_ENV=development
    PORT=5000
    MONGODB_URI=mongodb://localhost:27017/healthpulse
    JWT_SECRET=your_jwt_secret_here
    JWT_EXPIRE=7d
  3. ๐ŸŽจ Frontend Setup

    cd ../frontend
    npm install

    Create .env file:

    VITE_API_URL=http://localhost:5000/api
    VITE_APP_NAME=Health Pulse
  4. ๐Ÿƒ Start MongoDB

    # Windows
    net start MongoDB
    
    # macOS/Linux
    sudo systemctl start mongod
  5. ๐Ÿš€ Run the Application

    Backend (Terminal 1):

    cd backend
    npm run dev

    Frontend (Terminal 2):

    cd frontend
    npm run dev
  6. ๐ŸŒ Access the Application

๐Ÿ› ๏ธ Technology Stack

๐Ÿ”ง Backend

  • โšก Runtime: Node.js with TypeScript
  • ๐Ÿš€ Framework: Express.js
  • ๐Ÿƒ Database: MongoDB with Mongoose ODM
  • โœ… Validation: Zod schemas
  • ๐Ÿ” Authentication: JWT tokens

๐ŸŽจ Frontend

  • โš›๏ธ Framework: React 18 with TypeScript
  • โšก Build Tool: Vite
  • ๐ŸŽจ Styling: Tailwind CSS + Material UI 3
  • ๐Ÿ“Š State Management: React Query (TanStack Query)

๐Ÿงช Testing

  • ๐Ÿ”ฌ Component Testing: Vitest
  • ๐ŸŽญ E2E Testing: Playwright

๐Ÿ“ Project Structure

๐Ÿ’“ 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

๐Ÿงช Testing

๐Ÿ”ฌ Component Tests

cd frontend
npm run test

๐ŸŽญ E2E Tests

# Install Playwright browsers
npx playwright install

# Run E2E tests
npm run test:e2e

๐Ÿ”ง Development Scripts

๐Ÿ”ง Backend

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run test         # Run tests

๐ŸŽจ Frontend

npm 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

๐Ÿ“Š Features

๐ŸŽฏ Core Functionality

  • ๐Ÿ‘ค 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

โšก Technical Features

  • ๐ŸŒ 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

๐Ÿ”Œ API Endpoints

๐Ÿ” Authentication

  • POST /api/auth/register - ๐Ÿ“ User registration
  • POST /api/auth/login - ๐Ÿ”‘ User login
  • GET /api/auth/me - ๐Ÿ‘ค Get current user

๐Ÿ‘ค User Profile

  • GET /api/users/profile - ๐Ÿ“‹ Get user profile
  • PUT /api/users/profile - โœ๏ธ Update user profile

๐Ÿƒโ€โ™‚๏ธ Fitness Activities

  • GET /api/fitness/activities - ๐Ÿ“‹ Get activities
  • POST /api/fitness/activities - โž• Log new activity
  • PUT /api/fitness/activities/:id - โœ๏ธ Update activity

๐Ÿ’“ Vital Signs

  • GET /api/vitals - ๐Ÿ“Š Get vital signs history
  • POST /api/vitals - โž• Add vital signs entry

๐Ÿค– Recommendations

  • GET /api/recommendations - ๐Ÿ’ก Get personalized recommendations

๐Ÿš€ Deployment

๐ŸŒ Environment Setup

  1. โš™๏ธ Set NODE_ENV=production
  2. ๐Ÿƒ Configure production MongoDB URI
  3. ๐Ÿ” Set secure JWT secret
  4. ๐Ÿ”’ Enable SSL/TLS
  5. ๐ŸŒ Configure CORS for production domains

๐Ÿญ Production Considerations

  • ๐Ÿ“Š Database indexing and optimization
  • ๐Ÿšฆ API rate limiting
  • ๐Ÿ“ Error logging and monitoring
  • ๐ŸŒ CDN integration for static assets
  • โš–๏ธ Load balancing for scalability

๐Ÿค Contributing

  1. ๐Ÿ“ Follow the established project structure
  2. ๐Ÿงช Write comprehensive tests for new features
  3. ๐Ÿ“ Ensure TypeScript compliance
  4. ๐Ÿšจ Implement proper error handling
  5. โœ… Validate all user inputs
  6. โ™ฟ Maintain accessibility standards (WCAG 2.1 AA)
  7. ๐Ÿ“š Update documentation for API changes

๐Ÿ“„ License

This project is developed as part of a capstone project for educational purposes. ๐ŸŽ“

๐Ÿ†˜ Troubleshooting

โš ๏ธ Common Issues

๐Ÿƒ 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 install

๐Ÿ’ฌ Support

For issues and questions, please check the project documentation or create an issue in the repository. ๐Ÿค

About

web application designed to help users track fitness activities, monitor vital signs, and receive personalized health recommendations. ๐Ÿƒโ€โ™‚๏ธ๐Ÿ’ช๐Ÿ“Š

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages