Status: 🟢 Production Ready (pending manual testing)
A modern, accessible blood pressure tracking application built with Next.js 15, React 19, Supabase, and shadcn/ui.
- 🔐 Secure Authentication: Complete auth system with login, signup, and password reset
- 📊 Blood Pressure Tracking: Log and visualize your daily BP readings with interactive charts
- 🥗 Diet Logging: Track your meals and nutrition
- 🏃 Exercise Tracking: Monitor your physical activities
- 👤 Profile Management: User profile with settings and account management
- 💊 Medication Tracking: Manage medications, track doses, and monitor adherence with color-coded analytics
- 📈 Health Analytics: Correlation analysis between BP, diet, exercise, and medications with interactive timeline
- 🤖 AI Health Assistant: Powered by Claude 3.5 Sonnet for personalized health insights, summaries, and advice
- 🎨 Modern Glass UI: Beautiful glassmorphism design with gradients and animations
- 🌓 Dark Mode: Full dark mode support with smooth transitions
- ♿ Accessible: WCAG 2.1 AA compliant with keyboard navigation and screen reader support
- 📱 Responsive: Mobile-first design optimized for all devices
- 🔒 Secure: Row Level Security (RLS) on all data with input validation
- ⚡ Fast: Next.js 16 with Server Components, Streaming, and optimized queries
- Framework: Next.js 16 with App Router
- Language: TypeScript 5.6 (strict mode)
- UI Library: React 19
- Styling: Tailwind CSS 3.4
- Components: shadcn/ui
- Backend: Supabase (PostgreSQL + Auth + Real-time)
- Charts: Recharts
- Validation: Zod
- Icons: Lucide React
- Node.js 18+ and npm
- A Supabase account (free tier available)
- Clone the repository:
git clone https://github.com/hallengray/BPT.git
cd BPT- Install dependencies:
npm install- Set up environment variables:
cp env.example .env.localEdit .env.local and add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyGet these from: https://app.supabase.com/project/_/settings/api
- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication routes
│ │ ├── login/
│ │ ├── signup/
│ │ └── forgot-password/
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── dashboard/
│ │ ├── log-bp/
│ │ ├── log-diet-exercise/
│ │ └── profile/
│ ├── actions/ # Server Actions
│ ├── layout.tsx # Root layout
│ └── page.tsx # Landing page
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── forms/ # Form components
│ ├── charts/ # Chart components
│ └── layout/ # Layout components
├── lib/ # Utility functions
│ ├── supabase/ # Supabase clients
│ ├── validations/ # Zod schemas
│ └── utils.ts # Helper functions
├── hooks/ # Custom React hooks
├── types/ # TypeScript types
└── public/ # Static assets
The application uses the following Supabase tables:
profiles- User profile informationblood_pressure_readings- BP measurements (systolic, diastolic, pulse)diet_logs- Meal and nutrition logsexercise_logs- Physical activity logs
All tables have Row Level Security (RLS) enabled for data isolation.
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run type-check- Run TypeScript type checking
The authentication system has been fully implemented by Agent Alpha and includes:
- Login (
/login) - Email/password authentication - Signup (
/signup) - User registration with email verification - Forgot Password (
/forgot-password) - Password reset flow - Custom Hooks:
useUser()- Get current authenticated useruseAuth()- Full auth utilities (user, loading, signOut)
- Server Actions: All auth operations use Next.js 15 Server Actions
- React 19 Features: Uses
useActionStateanduseFormStatus - Validation: Zod schemas with strong password requirements
- Accessibility: WCAG 2.1 AA compliant
Documentation:
- See
AGENT_ALPHA_COMPLETION_REPORT.mdfor full implementation details - See
AGENT_ALPHA_TESTING_GUIDE.mdfor testing instructions
For Developers:
// Use in any client component
import { useUser } from '@/hooks/use-user'
export function MyComponent() {
const { user, loading } = useUser()
if (loading) return <div>Loading...</div>
if (!user) return <div>Please sign in</div>
return <div>Welcome, {user.email}!</div>
}- TypeScript Strict Mode: Enabled for type safety
- ESLint: Configured with Next.js recommended rules
- Prettier: Automatic code formatting
- Accessibility: WCAG 2.1 AA compliance enforced
- Server Components: Default for optimal performance
- Server Actions: Used for all data mutations
- Streaming: Implemented with React Suspense
- Parallel Data Fetching: Reduces waterfalls
use()hook for data fetchinguseFormStatus()for form pending statesuseOptimistic()for instant UI updates- Enhanced error boundaries
@supabase/ssrfor cookie-based sessions- Row Level Security (RLS) for data isolation
- Real-time subscriptions for live updates
- Generated TypeScript types for type safety
- Push your code to GitHub
- Import the repository in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
Required for production:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- All user data is protected with Row Level Security (RLS)
- Authentication handled by Supabase Auth
- Server Actions include CSRF protection
- Input validation with Zod schemas
- No sensitive data exposed to client
- Semantic HTML throughout
- ARIA labels on all interactive elements
- Keyboard navigation support
- Screen reader tested
- Color contrast ratios meet WCAG AA standards
- Touch targets minimum 44x44px
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT
- Agent Alpha Report - Authentication system implementation
- Agent Beta Report - Dashboard & BP tracking implementation
- Agent Gamma Report - Diet & Exercise logging implementation
- Agent Delta Report - QA, testing, and production readiness
- Sprint Review - Complete project review
- Next Steps - Testing and deployment guide
- ✅ Zero TypeScript Errors
- ✅ Zero Linting Errors
- ✅ Production Build Succeeds
- ✅ Security Audit Passed
- ✅ Performance Audit Completed
- ✅ WCAG 2.1 AA Compliant
- ✅ Mobile Responsive
Ready to deploy? Follow our comprehensive guides:
See QUICK_DEPLOY_CHECKLIST.md for a step-by-step checklist to deploy to Vercel.
See DEPLOYMENT_GUIDE.md for complete deployment instructions including:
- OpenRouter API setup
- Vercel configuration
- Custom domain setup
- Monitoring and analytics
- PWA configuration
- Troubleshooting
- Get OpenRouter API key from https://openrouter.ai/keys
- Push code to GitHub
- Deploy to Vercel
- Add environment variables in Vercel
- Test production deployment
- Set up monitoring (optional)
- Add custom domain (optional)
This application is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.
For issues and questions, please open an issue on GitHub.