A production-ready, enterprise-grade fitness tracking application built with Next.js 15, TypeScript, and modern web technologies. This comprehensive platform rivals industry leaders with cutting-edge features and exceptional user experience.
- Real-time Exercise Tracking: Track sets, reps, and weight with an intuitive interface
- Smart Rest Timer: Audio cues and visual countdown between sets
- Voice Commands: "Complete set", "Next exercise", "Log 12 reps" - hands-free operation
- Auto-progression: Intelligent weight increases based on performance
- Exercise Library: 17+ built-in exercises with instructions and tips
- Drag-and-drop: Reorder exercises on the fly
- Workout Templates: Save and reuse your favorite workouts
- Barcode Scanner: Scan food products with device camera
- Food Database: Comprehensive nutrition information
- Macro Tracking: Real-time progress rings for calories, protein, carbs, fats
- Water Intake: Visual tracking with daily goals
- Meal Planning: Breakfast, lunch, dinner, and snack categorization
- Quick Add: Recent foods and favorites for easy logging
- Progress Charts: Strength progression, volume trends, frequency heatmaps
- Muscle Balance: Radar charts showing muscle group distribution
- Body Metrics: Weight, body fat %, measurements tracking
- AI Insights: Automatic plateau detection and recommendations
- Personal Records: Timeline of achievements with celebrations
- Export Reports: PDF progress reports with charts
- Voice Commands: 15+ natural language commands
- Audio Feedback: Exercise announcements, countdown timers, celebrations
- Motivational Phrases: "Great job!", "One more set!", "New personal record!"
- Customizable Sounds: Volume controls, mute options, sound themes
- Multi-language Support: Starting with English
- Workout Buddy Sync: Real-time workout sharing with friends
- Live Reactions: Send π₯πͺπ during buddy workouts
- Community Templates: Share and discover workout templates
- Creator Profiles: Follow fitness experts and trainers
- Achievements: Unlock badges and share milestones
- Leaderboards: Friendly competition with workout stats
- Authentication: JWT-based secure authentication system
- Data Privacy: GDPR-compliant with full data export
- Monitoring: Comprehensive logging and analytics dashboard
- Performance: Optimized queries, caching, lazy loading
- PWA Support: Install as app, offline functionality
- Responsive Design: Works on all devices
- Export Options: JSON, CSV, PDF formats
- Import Functionality: Restore from backups
- Automatic Backups: Smart reminder system
- GDPR Compliance: Download all data, delete account
- Cloud Integration: Ready for Google Drive, Dropbox
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS v3, Framer Motion
- Database: Prisma ORM with SQLite (dev) / PostgreSQL (prod)
- State Management: React Query (TanStack Query)
- Forms: React Hook Form with Zod validation
- Charts: Recharts for data visualization
- Voice: Web Speech API
- Camera: React Webcam + jsQR for barcode scanning
- Real-time: Server-Sent Events (SSE)
- Testing: Jest, React Testing Library (ready)
- Monitoring: Custom logging system with analytics
# Clone the repository
git clone https://github.com/yourusername/fitness-pro.git
cd fitness-pro
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Set up database
npx prisma migrate dev
npm run db:seed
# Start development server
npm run devVisit http://localhost:3000 and login with:
- Email: demo@fitnesspro.com
- Password: demo123
/login- Authentication/register- Create new account/dashboard- Main dashboard with stats and activities/workouts- Workout management and templates/workouts/[id]/live- Live workout mode with timer/nutrition- Food tracking with barcode scanner/progress- Analytics and insights/community- Browse and share templates/buddies- Manage workout partners/settings- Preferences and data export/admin/analytics- Monitoring dashboard (admin only)
1. Start workout β Timer begins
2. Voice command: "Complete set" β Rest timer starts
3. Audio countdown: "3, 2, 1, rest complete"
4. Swipe to mark sets done
5. Real-time buddy sync shows friend's progress
6. Auto-detect personal records with celebrations
1. Click "Add Food" β Camera opens
2. Scan barcode β Nutrition data appears
3. Adjust serving size β Macros update
4. Save to meal β Progress rings animate
5. Water intake β Visual glass fills
1. Browse templates β Filter by your needs
2. Preview exercises β One-click copy
3. Rate and review β Help others
4. Share your workout β Gain followers
5. Get verified β Blue checkmark
fitness-pro/
βββ app/ # Next.js 15 app directory
β βββ (auth)/ # Auth pages (login, register)
β βββ (authenticated)/ # Protected pages
β β βββ dashboard/ # Main dashboard
β β βββ workouts/ # Workout features
β β βββ nutrition/ # Nutrition tracking
β β βββ progress/ # Analytics
β β βββ community/ # Social features
β β βββ buddies/ # Workout partners
β β βββ settings/ # User settings
β βββ api/ # API routes
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components
β βββ workout/ # Workout-specific
β βββ nutrition/ # Nutrition-specific
β βββ community/ # Community features
β βββ settings/ # Settings components
βββ lib/ # Utilities and helpers
β βββ api-client.ts # API client
β βββ logger.ts # Logging system
β βββ audio-manager.ts # Audio system
β βββ utils.ts # Helper functions
βββ providers/ # React context providers
β βββ AuthProvider.tsx # Authentication
β βββ VoiceProvider.tsx # Voice commands
β βββ MonitoringProvider.tsx # Analytics
βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
βββ sounds/ # Audio files
- JWT token authentication
- Secure password hashing with bcrypt
- Rate limiting on APIs
- Input validation and sanitization
- XSS protection
- CSRF protection
- Secure headers
- Data isolation per user
- Code splitting with dynamic imports
- Image optimization with Next.js Image
- API response caching with React Query
- Database query optimization with indexes
- Lazy loading for components
- Service worker for offline support
- Debounced search inputs
- Virtual scrolling for large lists
- Consistent color palette with primary/secondary colors
- Dark mode support throughout
- Accessible components with ARIA labels
- Smooth animations with Framer Motion
- Responsive breakpoints for all screens
- Glass morphism effects
- Custom Tailwind configuration
npm run build
verceldocker build -t fitness-pro .
docker run -p 3000:3000 fitness-pronpm run build
npm start# Database
DATABASE_URL="file:./dev.db" # SQLite for dev
# DATABASE_URL="postgresql://..." # PostgreSQL for prod
# Authentication
JWT_SECRET="your-secret-key-here"
# Application
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# Optional
NEXT_PUBLIC_GA_ID="UA-XXXXXXXXX-X"# Run unit tests
npm test
# Run e2e tests
npm run test:e2e
# Run with coverage
npm run test:coverageThe app uses Prisma ORM with the following main models:
User- User accounts and profilesWorkout- Workout sessionsExercise- Exercise definitionsWorkoutSet- Individual sets within workoutsNutritionEntry- Food and nutrition logsGoal- User fitness goalsAchievement- Unlockable achievementsCommunityTemplate- Shared workout templatesWorkoutBuddy- Social connections
This is a showcase project demonstrating full-stack development capabilities. Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Use as inspiration for your own projects
MIT License - Feel free to use this code for learning and inspiration.
Built with passion using:
- Next.js team for the amazing framework
- Vercel for hosting and deployment
- Tailwind CSS for the utility-first CSS framework
- Prisma for the excellent ORM
- All the open-source contributors
Built with β€οΈ in PSYCHO MODE! This fitness app demonstrates enterprise-grade development with a focus on user experience, performance, and scalability. Every feature has been crafted to provide the best possible fitness tracking experience.