A modern fitness tracking web application built with Next.js 14, Supabase, and Stripe. Track workouts, monitor progress, and generate AI-powered workout programs.
- Workout Logging – Create, edit, and track workouts with exercises, sets, and reps
- Progress Tracking – Visualize strength gains and personal records over time
- AI Plan Generator – Generate personalized workout programs using OpenAI (Pro feature)
- Calendar View – Schedule and view workouts on an interactive calendar
- Subscription System – Free and Pro tiers with Stripe integration
- Secure Authentication – Email/password auth with rate limiting via Supabase Auth
- Demo Mode (WIP) – Test all features without API keys using built-in sample data
ImpactHub includes a fully functional demo mode that allows testers to explore all features without configuring Supabase, Stripe, or OpenAI API keys
- Run the app without any environment variables configured
- Navigate to the login page at
/auth/login - Choose one of two options:
- Click "Continue as Demo User" button
- Use guest credentials:
guest@guest.com/Password123
| Feature | Demo Behavior |
|---|---|
| Dashboard | Shows sample workout stats, PRs, and streak data |
| Workouts | Pre-loaded with 3 completed workouts + 1 planned workout |
| Create Workout | Save new workouts to the demo session (in-memory) |
| Programs | Includes a full 6-day Push/Pull/Legs program + Starting Strength |
| AI Generator | Disabled with message explaining API key requirement |
| Calendar | Displays demo workouts on their respective dates |
| Progress | Fully unlocked with sample PR history and volume analytics |
| Settings | View demo user profile and preferences |
- Workouts: 4 sample workouts spanning the past week
- Exercises: 26 exercises in the autocomplete library
- Personal Records: 5 PRs for major compound lifts
- Programs:
- Push Pull Legs (6-day split, 8 weeks, intermediate)
- Starting Strength (3-day full body, 12 weeks, beginner)
- Data is not persisted – All changes are stored in memory and reset on page refresh
- No real authentication – Demo mode bypasses Supabase Auth entirely
- AI features disabled – Requires
OPENAI_API_KEYto generate workout plans - Payments not processed – Stripe integration requires API keys
| Layer | Technology |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Database | Supabase (PostgreSQL) |
| Auth | Supabase Auth |
| Payments | Stripe |
| AI | OpenAI GPT-4o-mini |
Want to try ImpactHub without setting up any services? Run it in demo mode:
git clone https://github.com/zaynedoc/ImpactHub-Demo.git
cd ImpactHub-Demo/WebApp_ImpactHub
npm install
npm run devThen visit http://localhost:3000/auth/login and click "Continue as Demo User".
- Node.js 18+
- npm or pnpm
- Supabase account (free tier works)
- Stripe account (test mode)
- OpenAI API key (optional, for AI features)
git clone https://github.com/zaynedoc/ImpactHub-Demo.git
cd WebApp_ImpactHubnpm install- Create a new project at supabase.com
- Go to Project Settings ? API and copy:
- Project URL ?
NEXT_PUBLIC_SUPABASE_URL anonpublic key ?NEXT_PUBLIC_SUPABASE_ANON_KEYservice_rolekey ?SUPABASE_SERVICE_ROLE_KEY
- Project URL ?
- Run the database migrations:
# Using Supabase CLI (recommended) npx supabase db push # Or manually run SQL files in order from supabase/migrations/
- Create a Stripe account at stripe.com
- Enable Test Mode (toggle in dashboard)
- Go to Developers ? API keys and copy:
- Publishable key ?
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - Secret key ?
STRIPE_SECRET_KEY
- Publishable key ?
- Create a product and price:
- Go to Products ? Add product
- Name: "Pro Subscription", Price: $4.99/month (recurring)
- Copy the Price ID ?
STRIPE_PRO_PRICE_ID
- Set up webhook (for local development):
Copy the webhook signing secret ?
# Install Stripe CLI: https://stripe.com/docs/stripe-cli stripe listen --forward-to localhost:3000/api/billing/webhookSTRIPE_WEBHOOK_SECRET
- Get an API key from platform.openai.com
- Add to
.env.local?OPENAI_API_KEY
Copy the example environment file:
cp .env.example .env.localFill in all required values:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRO_PRICE_ID=price_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
# OpenAI (optional)
OPENAI_API_KEY=sk-...
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000npm run devOpen http://localhost:3000 in your browser.
WebApp_ImpactHub/
├── app/ # Next.js App Router
│ ├── (public)/ # Public pages (landing, features, pricing)
│ ├── api/ # API routes
│ ├── auth/ # Auth pages (login, signup, etc.)
│ └── dashboard/ # Protected dashboard pages
├── components/ # React components
│ ├── ai/ # AI-related components
│ ├── billing/ # Subscription/payment components
│ ├── effects/ # Visual effect components
│ ├── layout/ # Layout components (Navbar, Sidebar)
│ ├── programs/ # Workout program components
│ └── ui/ # Reusable UI components
├── lib/ # Utility functions and configurations
│ ├── demo/ # Demo mode store and sample data
│ └── supabase/ # Supabase client setup
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
└── supabase/ # Database migrations and scripts
└── migrations/ # SQL migration files
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
Use these test card numbers in Stripe test mode:
| Card | Number |
|---|---|
| Success | 4242 4242 4242 4242 |
| Declined | 4000 0000 0000 0002 |
| Requires Auth | 4000 0025 0000 3155 |
Use any future expiry date and any 3-digit CVC.
MIT
Built by zaynedoc