A mobile-optimized web application designed to help young women track their daily health patterns and identify potential IBS triggers. Built with Next.js, TypeScript, Tailwind CSS, and Supabase.
- Period tracking: None, low, medium, heavy
- Water intake: Track daily water consumption in liters
- Food notes: Log special foods or meals
- Bowel movements: Normal, diarrhea, constipation, bloated
- Stress levels: 0-10 scale
- Exercise: None, short, long
- Pain levels: 0-10 scale
- Weekly view: Visual overview of the current week
- Monthly view: Comprehensive monthly analytics with charts
- Pattern analysis: Identify common triggers for IBS attacks
- IBS attack logging: Track attack severity, duration, and symptoms
- Optimized for mobile devices
- Touch-friendly interface
- Responsive design for all screen sizes
- Intuitive navigation
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: Supabase (PostgreSQL, Auth, Real-time)
- Charts: Recharts
- Icons: Lucide React
- Date handling: date-fns
- Node.js 18+
- npm or yarn
- Supabase account
-
Clone the repository
git clone https://github.com/ChocooDEV/IBS-Tracker cd ibs-tracker -
Install dependencies
npm install
-
Set up Supabase
- Create a new Supabase project
- Run the SQL schema from
supabase-schema.sqlin your Supabase SQL editor - Get your project URL and anon key from Settings > API
-
Configure environment variables
cp .env.local.example .env.local
Update
.env.localwith your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
The app uses three main tables:
- Extends Supabase auth.users
- Stores user profile information
- Stores daily health tracking data
- One record per user per day
- Tracks all health metrics
- Logs IBS attack episodes
- Includes severity, duration, symptoms, and notes
- Used for pattern analysis
Users can log their daily health metrics through an intuitive form. The form automatically loads existing data for the current day, allowing users to update their entries.
Provides a visual overview of the current week with color-coded indicators for different health metrics. Perfect for quick pattern recognition.
Comprehensive monthly view with:
- Average metrics (water intake, stress, pain)
- Trend charts for water intake and stress/pain levels
- Distribution charts for periods, bowel movements, and exercise
- Calendar view with daily indicators
Advanced analytics to identify potential IBS triggers:
- Analyzes data from days leading up to IBS attacks
- Identifies common patterns and triggers
- Provides personalized insights and recommendations
- Tracks trigger frequency and percentages
Users can log IBS attacks with:
- Severity rating (1-10)
- Duration in hours
- Symptom selection from predefined list
- Additional notes
- Automatic pattern correlation with daily logs
The app is designed with mobile-first principles:
- Touch-friendly buttons (minimum 44px touch targets)
- Optimized scrolling and navigation
- Responsive layouts for all screen sizes
- Safe area support for modern mobile devices
- Custom scrollbars for better mobile experience
- All data is stored securely in Supabase
- Row Level Security (RLS) ensures users can only access their own data
- Social media authentication through Supabase Auth
- No third-party analytics or tracking
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support or questions, please open an issue in the GitHub repository.
Note: This app is designed for educational and personal use. Always consult with healthcare professionals for medical advice related to IBS or other health conditions.