AI-Powered Personal Fitness Platform with Gamification
Self-hosted โข Privacy-first โข Full control over your data
This software is NOT free for commercial use.
PersonalFit is licensed under the PolyForm Noncommercial License 1.0.0.
โ Allowed: Personal use, learning, research, non-profit organizations โ Not Allowed: Commercial use, SaaS integration, reselling
For commercial licensing, contact: phillipjuanvanderberg@gmail.com
See the LICENSE file for full terms.
PersonalFit is a comprehensive, self-hosted fitness tracking application that combines AI-powered workout generation with gamification to keep you motivated. Built with a modern TypeScript stack, it offers a complete solution for tracking workouts, progress, and maintaining accountabilityโall while keeping your data private.
| Feature | Benefit |
|---|---|
| ๐ Privacy-First | Your fitness data stays on YOUR server |
| ๐ฐ No Subscriptions | Host it yourself, no monthly fees |
| ๐ฎ Gamification | XP, levels, streaks, 42 achievements |
| ๐ค Multi-AI Support | OpenAI, Anthropic Claude, or OpenRouter |
| ๐ฑ Responsive | Works beautifully on desktop, tablet, mobile |
| ๐ก๏ธ Production-Ready | Rate limiting, security headers, error boundaries |
- XP & Leveling โ Earn experience points for every workout completed
- 42 Achievements โ Unlock badges for milestones (First Workout, Week Warrior, Century Club, etc.)
- Streak Tracking โ Build daily workout streaks with freeze protection
- Daily Challenges โ Fresh challenges every day for bonus XP
- Personal Records โ Track PRs with automatic detection
- Gems Currency โ Earn gems to purchase streak freezes
- Multi-Provider โ OpenAI GPT-4, Anthropic Claude, or OpenRouter
- Personalized Plans โ Based on goals, equipment, experience, injuries
- Multi-Agent Orchestration โ Planner โ Worker โ Reviewer pipeline
- Token Management โ Smart token counting and budget optimization
- Retry Logic โ Exponential backoff with jitter for reliability
- Response Validation โ Zod schemas ensure valid AI responses
- Visual Calendar โ Week and month views
- Workout Details โ Click any day for full exercise breakdown
- Progress Tracking โ Completed vs planned at a glance
- Missed Workout Detection โ Automated accountability
- Multiple Plans โ Generate and save multiple workout programs
- Active Plan System โ One active plan at a time
- Plan Preview โ Weekly schedule with XP forecasts
- Session Logging โ Track sets, reps, weight, RPE, notes
- Body Metrics โ Weight, body fat, measurements over time
- Progress Photos โ Front/side/back with S3-compatible storage
- Charts & Trends โ Visualize your journey with Recharts
- Equipment Inventory โ Track your home gym
- Streak Penalties โ Gamified consequences for missed workouts
- Makeup Workouts โ Clear penalties by completing extra sessions
- Partner System โ Invite accountability partners (coming soon)
- 3-Tier Rate Limiting โ Auth (10/min), AI (10/hr), General (100/min)
- Helmet Security Headers โ XSS, HSTS, CSP protection
- API Key Encryption โ User keys encrypted at rest
- Error Boundaries โ Graceful crash recovery
- Optimistic Updates โ Instant UI feedback
| Technology | Purpose |
|---|---|
| Node.js 22 | Runtime |
| Express 5.1 | Web framework |
| TypeScript 5.9 | Type safety |
| MongoDB 8.x | Database |
| Mongoose 8.x | ODM |
| OpenAI SDK | AI integration |
| Anthropic SDK | Claude support |
| tiktoken | Token counting |
| Zod | Schema validation |
| Jest | Testing (170+ tests) |
| Helmet | Security headers |
| express-rate-limit | Rate limiting |
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite 7 | Build tool |
| TypeScript 5.9 | Type safety |
| TailwindCSS 3 | Styling |
| TanStack Query | Server state |
| Zustand | Client state |
| React Hook Form | Form handling |
| Zod | Validation |
| Framer Motion | Animations |
| Recharts | Data visualization |
| Playwright | E2E testing |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Orchestration |
| Nginx | Reverse proxy |
| MinIO | S3-compatible storage |
- Docker & Docker Compose
- Git
- (Optional) Node.js 22+ for local development
git clone https://github.com/Poolchaos/PersonalFit.git
cd PersonalFit
# Copy environment templates
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envbackend/.env:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://mongodb:27017/personalfit
JWT_SECRET=your-super-secret-jwt-key
JWT_REFRESH_SECRET=your-refresh-secret
ENCRYPTION_SECRET=your-32-char-encryption-key
CORS_ORIGIN=http://localhost:5173frontend/.env:
VITE_API_URL=http://localhost:5000docker-compose up -d| Service | URL |
|---|---|
| ๐ Web App | http://localhost:3000 |
| ๐ API | http://localhost:5000 |
| ๐๏ธ MinIO Console | http://localhost:9003 |
cd backend
npm install
npm run devcd frontend
npm install
npm run dev# Backend tests
cd backend && npm test
# Frontend E2E tests
cd frontend && npm run test:e2ePersonalFit/
โโโ backend/
โ โโโ src/
โ โ โโโ controllers/ # Route handlers
โ โ โโโ models/ # Mongoose schemas
โ โ โโโ routes/ # Express routes
โ โ โโโ services/ # Business logic
โ โ โ โโโ ai/ # AI orchestration layer
โ โ โโโ middleware/ # Auth, rate limiting
โ โ โโโ validators/ # Request validation
โ โ โโโ __tests__/ # Jest tests
โ โโโ Dockerfile
โโโ frontend/
โ โโโ src/
โ โ โโโ pages/ # Route components
โ โ โโโ components/ # Reusable UI
โ โ โโโ design-system/ # Component library
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ api/ # API client & query keys
โ โ โโโ store/ # Zustand stores
โ โ โโโ utils/ # Helpers & validation
โ โโโ e2e/ # Playwright tests
โ โโโ Dockerfile
โโโ docs/ # Documentation
โโโ docker-compose.yml
โโโ LICENSE
Copyright (c) 2025-2026 Phillip-Juan van der Berg. All Rights Reserved.
This project is licensed under the PolyForm Noncommercial License 1.0.0.
What this means:
- โ You CAN use this for personal fitness tracking
- โ You CAN study and learn from the code
- โ You CAN use this at non-profit organizations
- โ You CANNOT use this in a commercial product
- โ You CANNOT sell this or offer it as a service
- โ You CANNOT use this within a for-profit company
If you want to use PersonalFit commercially, you need a paid license.
Contact: phillipjuanvanderberg@gmail.com
Available license tiers:
- Startup License โ For companies with < $1M annual revenue
- Enterprise License โ For larger organizations
- OEM License โ For embedding in your products
Contributions are welcome! Please note that by contributing, you agree that your contributions will be licensed under the same PolyForm Noncommercial License.
Phillip-Juan van der Berg ๐ง phillipjuanvanderberg@gmail.com
Built with โค๏ธ for fitness enthusiasts who value privacy