AI-powered symptom tracking with intelligent pattern recognition to help users understand their health trends.
- Daily Symptom Logging - Track symptoms with severity ratings and contextual factors
- Pattern Detection - AI identifies correlations and trends in symptom data
- Root Cause Analysis - Ranked possible causes with supporting evidence
- Urgency Assessment - 1-10 score with red flag detection for emergency situations
- Actionable Insights - Evidence-based self-care suggestions and doctor consultation questions
- Data Visualizations - Charts showing symptom frequency, severity trends, and correlations
- Privacy-First - All data stored locally in browser (localStorage)
- Frontend: React 18 + TypeScript + Vite
- Styling: TailwindCSS
- AI: Groq API (llama-3.1-70b-versatile)
- Charts: Recharts
- Storage: Browser localStorage
- Deployment: Vercel/Netlify compatible
- Node.js 18+ and npm
- Groq API key (free tier available at https://console.groq.com)
- Clone the repository:
git clone https://github.com/yourusername/symptom-tracker.git
cd symptom-tracker- Install dependencies:
npm install- Create environment file:
cp .env.example .env.local- Add your Groq API key to
.env.local:
VITE_GROQ_API_KEY=gsk_your_api_key_here
- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
- Navigate to the Calendar view
- Click any date to open the symptom entry modal
- Select symptoms from categorized lists (pain, digestive, respiratory, mental, other)
- Rate each symptom's severity on a 1-10 scale
- Add context factors (stress level, sleep hours, exercise)
- Optionally add notes
- Save the entry
- Log symptoms for at least 7 days
- Navigate to the Analysis view
- Click "Analyze Symptom Patterns"
- Review the AI-generated insights:
- Detected patterns with confidence levels
- Possible causes ranked by likelihood
- Urgency assessment with red flags
- Self-care suggestions and doctor questions
- Navigate to the Charts view
- Review visualizations:
- Most common symptoms (bar chart)
- Severity over time (line chart)
- Symptom correlations with context factors
- Export: Download your data as JSON for backup or device transfer
- Import: Load previously exported data
- Demo Mode: Pre-populate with 14 days of sample data to explore features
- Clear All: Delete all stored data
symptom-tracker/
├── public/ # Static assets
├── src/
│ ├── components/
│ │ ├── Calendar/ # Calendar and symptom entry components
│ │ ├── Analysis/ # AI analysis result containers
│ │ ├── Charts/ # Data visualization components
│ │ ├── DataManagement/ # Import/export components
│ │ └── Layout/ # Header, sidebar, privacy banner
│ ├── hooks/
│ │ ├── useSymptomData.ts # Symptom data CRUD operations
│ │ └── useAnalysis.ts # AI analysis state management
│ ├── services/
│ │ ├── storage.ts # localStorage wrapper
│ │ ├── aiAnalysis.ts # Groq API integration
│ │ └── dataProcessing.ts # Data transformation for charts
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ ├── utils/
│ │ ├── constants.ts # Symptom categories, thresholds
│ │ ├── dateHelpers.ts # Date manipulation utilities
│ │ └── demoData.ts # Sample data generator
│ ├── App.tsx # Main application component
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles and Tailwind imports
├── .env.example # Environment variable template
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tailwind.config.js # TailwindCSS configuration
├── vite.config.ts # Vite build configuration
└── README.md # This file
-
Push your code to GitHub
-
Import the repository in Vercel dashboard
-
Add environment variable:
- Key:
VITE_GROQ_API_KEY - Value: Your Groq API key
- Key:
-
Deploy
-
Push your code to GitHub
-
Import the repository in Netlify dashboard
-
Build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
-
Add environment variable:
- Key:
VITE_GROQ_API_KEY - Value: Your Groq API key
- Key:
-
Deploy
- Visit https://console.groq.com
- Sign up for a free account
- Navigate to API Keys section
- Create a new API key
- Copy the key (starts with
gsk_) - Add to your
.env.localfile
The free tier includes:
- 30 requests per minute
- Sufficient for personal use and demonstrations
- Local Storage: All symptom data is stored in your browser's localStorage
- No Account Required: No user registration or authentication
- AI Analysis Only: Data is only sent to external services (Groq API) during analysis requests
- No Tracking: No analytics or tracking scripts
- Export Control: Full control over your data with export/import functionality
For Demonstration and Personal Tracking Purposes Only
This application:
- Is NOT intended for medical diagnosis
- Should NOT replace professional medical advice
- Does NOT store data on external servers (except during AI analysis)
- Is NOT HIPAA compliant for clinical use
- Should be used alongside, not instead of, healthcare provider consultations
Always consult qualified healthcare professionals for medical concerns.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locally
- New Symptom Category: Update
SYMPTOM_CATEGORIESinsrc/utils/constants.ts - Custom Analysis Prompt: Modify
buildPrompt()insrc/services/aiAnalysis.ts - Additional Charts: Create new component in
src/components/Charts/ - Context Factors: Update
ContextFactorstype and modal UI
- Verify Groq API key is set in
.env.local - Check browser console for error messages
- Ensure at least 7 days of data are logged
- Try refreshing the page
- Check browser localStorage is enabled
- Verify you're not in private/incognito mode
- Try exporting data as backup
- Delete
node_modulesand runnpm installagain - Ensure Node.js version is 18+
- Check TypeScript errors with
npm run build
- Privacy-first: No server-side storage
- Zero setup for users
- Works offline
- HIPAA-safe for demonstrations (no PHI on servers)
- Fast inference (llama-3.1-70b)
- Generous free tier
- Good medical reasoning capabilities
- Simple REST API
- Simpler deployment (static hosting)
- Lower costs (no backend servers)
- Privacy-focused (data stays local)
- Suitable for portfolio demonstration
Potential improvements (not currently implemented):
- PWA support for offline functionality
- Reminder notifications for daily logging
- Multi-user support for family tracking
- Export to PDF for doctor visits
- Wearable device integration
- Symptom prediction based on patterns
- Backend API for cross-device sync (optional)
MIT License - See LICENSE file for details
This is a portfolio project. If you'd like to use it as a base for your own work, feel free to fork and modify.
For questions about this project, please open an issue on GitHub.
Built as a demonstration project for healthcare ML engineering applications.