Skip to content

kris07hna/HealTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HealTrack - Comprehensive Health & Symptom Tracker

A modern, full-featured health tracking application built with Next.js and Supabase, designed to help users monitor their health symptoms, medications, and overall wellness journey.

Features

  • πŸ₯ Symptom Tracking: Log and monitor health symptoms with detailed analytics
  • πŸ“Š Visual Analytics: Interactive charts and graphs to visualize health trends
  • πŸ’Š Medication Management: Track medication schedules and effectiveness
  • πŸ“± Responsive Design: Optimized for desktop, tablet, and mobile devices
  • πŸ” Secure Authentication: Email-based authentication with Supabase
  • ☁️ Cloud Storage: Real-time data synchronization across devices
  • βœ‰οΈ Email Confirmation: Secure account verification system
  • πŸŒ™ Dark Theme: Modern dark UI for comfortable viewing

Technology Stack

Frontend

  • Next.js 14.2.30 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first CSS framework
  • React Hook Form - Efficient form handling
  • Recharts - Modern chart library for data visualization
  • React Hot Toast - Beautiful notifications

Backend & Database

  • Supabase - Backend-as-a-Service with PostgreSQL
  • Supabase Auth - Authentication and user management
  • Real-time subscriptions - Live data updates

Deployment

  • Netlify - Production hosting with CI/CD
  • GitHub - Version control and automated deployments

Project Structure

healtrack/
β”œβ”€β”€ pages/                    # Next.js pages
β”‚   β”œβ”€β”€ api/                 # API routes (minimal - using Supabase)
β”‚   β”œβ”€β”€ _app.tsx            # App wrapper with auth context
β”‚   β”œβ”€β”€ index.tsx           # Landing page
β”‚   β”œβ”€β”€ dashboard.tsx       # Main application dashboard
β”‚   β”œβ”€β”€ login.tsx           # Authentication page
β”‚   └── register.tsx        # User registration
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ common/             # Reusable components (Header, Footer)
β”‚   β”œβ”€β”€ dashboard/          # Dashboard-specific components
β”‚   β”‚   β”œβ”€β”€ SymptomTracker.tsx
β”‚   β”‚   β”œβ”€β”€ MedicationTracker.tsx
β”‚   β”‚   └── HealthAnalytics.tsx
β”‚   β”œβ”€β”€ forms/              # Form components
β”‚   └── charts/             # Chart components
β”œβ”€β”€ lib/                    # Utility functions and configurations
β”‚   β”œβ”€β”€ database.ts         # Supabase client configuration
β”‚   β”œβ”€β”€ auth.tsx           # Authentication context and helpers
β”‚   └── utils/             # Helper functions
β”œβ”€β”€ styles/                 # Global styles and Tailwind config
β”œβ”€β”€ types/                  # TypeScript type definitions
└── public/                 # Static assets

Environment Setup

Create a .env.local file with your Supabase credentials:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Supabase account (free tier available)

Installation

  1. Clone the Repository

    git clone https://github.com/kris07hna/HealTrack.git
    cd HealTrack
  2. Install Dependencies

    npm install
  3. Set Up Supabase

    • Create a new project at supabase.com
    • Copy your project URL and anon key
    • Create .env.local file with your credentials
  4. Run Development Server

    npm run dev

    Open http://localhost:3000 in your browser

  5. Build for Production

    npm run build

Deployment

Netlify (Current)

  1. Connect your GitHub repository to Netlify
  2. Add environment variables in Netlify dashboard
  3. Deploy automatically on push to main branch

Deployment Environment Variables

NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

Features Overview

οΏ½ Authentication

  • Email/password registration and login
  • Email verification system
  • Secure session management
  • Protected routes and data

οΏ½πŸ“Š Dashboard

  • Health metrics overview with visual indicators
  • Recent symptoms timeline and trends
  • Medication adherence tracking
  • Interactive analytics charts

πŸ“ Symptom Tracking

  • Quick symptom entry with severity ratings
  • Categorized symptom logging
  • Detailed notes and trigger identification
  • Historical symptom patterns

πŸ“ˆ Health Analytics

  • Visual trend analysis with charts
  • Symptom frequency and severity tracking
  • Medication effectiveness insights
  • Exportable health reports

οΏ½ Medication Management

  • Medication schedule tracking
  • Dosage and frequency monitoring
  • Adherence rate calculations
  • Medication effectiveness correlation

πŸ”’ Privacy & Security

  • End-to-end encrypted data storage
  • GDPR-compliant data handling
  • User-controlled data export/deletion
  • No third-party data sharing

Database Schema

HealTrack uses Supabase (PostgreSQL) with the following main tables:

  • users - User profiles and preferences
  • symptoms - Symptom logs with severity and notes
  • medications - Medication tracking and schedules
  • health_metrics - General health indicators
  • user_settings - Application preferences

Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript checks

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Use TypeScript for all new code
  • Follow the existing component structure
  • Use Tailwind CSS for styling
  • Write meaningful commit messages

Troubleshooting

Common Issues

Authentication Issues

  • Verify Supabase environment variables
  • Check email confirmation settings in Supabase dashboard
  • Ensure RLS policies are properly configured

Build Errors

  • Run npm run type-check for TypeScript errors
  • Clear .next cache: rm -rf .next
  • Reinstall dependencies: rm -rf node_modules && npm install

Development Server Issues

  • Check port 3000 is available
  • Verify Node.js version (18+)
  • Check for conflicting processes

License

MIT License - feel free to use and modify for your needs.

Support

  • πŸ“« Issues: Open a GitHub issue for bugs or feature requests
  • πŸ’¬ Discussions: Use GitHub Discussions for questions
  • πŸ“– Documentation: Check the wiki for detailed guides

Roadmap

Upcoming Features

  • Mobile app (React Native)
  • Medication reminder notifications
  • Doctor/healthcare provider sharing
  • Advanced analytics and insights
  • Data export to common formats
  • Integration with fitness trackers

Recent Updates

  • βœ… Supabase authentication system
  • βœ… Email verification workflow
  • βœ… Enhanced dashboard analytics
  • βœ… Production deployment on Netlify
  • βœ… Responsive design improvements

Built with ❀️ for better health tracking and management.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published