A cutting-edge, mobile-first fitness training platform that connects personal trainers with their clients in a futuristic, high-tech environment. Built with React, TypeScript, tRPC, and featuring a stunning cyberpunk aesthetic with neon pink and electric cyan accents.
- Client Management Dashboard: View and manage all registered clients with detailed profiles
- Workout Builder: Create custom workouts with multiple phases (warmup, main workout, cooldown)
- Exercise Management: Add exercises with duration timers or repetition counts
- Template System: Save workouts as reusable templates and assign them to multiple clients
- Progress Tracking: Monitor client workout completions and performance metrics
- Enhanced Registration: Complete profile with name, date of birth (auto-calculates age), goals, and equipment
- Workout Library: View all assigned workouts with detailed previews
- Interactive Timer: Real-time workout execution with countdown timers and navigation controls
- Voice Guidance: Hands-free training with text-to-speech announcements for exercises and countdowns
- Profile Management: Update personal information, goals, and available equipment
- Progress History: Track workout completions and personal achievements
- Cyberpunk Aesthetic: Deep black background with vibrant neon pink and electric cyan accents
- Neon Glow Effects: Intense outer glow effects simulating neon signage
- Mobile-First: Fully responsive design optimized for all devices
- HUD-Style Elements: Minimalist technical lines and corner brackets
- Smooth Animations: Polished transitions and hover effects
- React 19 - Modern UI library with latest features
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first styling with custom cyberpunk theme
- tRPC Client - End-to-end type-safe API calls
- Wouter - Lightweight routing solution
- shadcn/ui - Beautiful, accessible component library
- Web Speech API - Voice synthesis for workout guidance
- Node.js - JavaScript runtime
- Express 4 - Web application framework
- tRPC 11 - Type-safe API layer
- Drizzle ORM - TypeScript ORM for database operations
- MySQL/TiDB - Relational database
- Manus OAuth - Secure authentication system
- Vitest - Fast unit testing framework
- TypeScript Strict Mode - Enhanced type checking
- ESLint - Code quality and consistency
Before you begin, ensure you have the following installed:
- Node.js (v22.13.0 or higher)
- pnpm (v10.4.1 or higher)
- MySQL or TiDB database instance
- Git for version control
git clone https://github.com/YOUR_USERNAME/personal-trainer-timer.git
cd personal-trainer-timerpnpm installCreate a .env file in the root directory with the following variables:
# Database
DATABASE_URL=mysql://user:password@host:port/database
# Authentication (provided by Manus platform)
JWT_SECRET=your-jwt-secret
OAUTH_SERVER_URL=https://api.manus.im
VITE_OAUTH_PORTAL_URL=https://portal.manus.im
VITE_APP_ID=your-app-id
# Owner Information
OWNER_OPEN_ID=your-open-id
OWNER_NAME=Your Name
# API Keys (provided by Manus platform)
BUILT_IN_FORGE_API_URL=https://forge.manus.im
BUILT_IN_FORGE_API_KEY=your-api-key
VITE_FRONTEND_FORGE_API_KEY=your-frontend-api-key
VITE_FRONTEND_FORGE_API_URL=https://forge.manus.imRun database migrations to create all necessary tables:
pnpm db:pushThis will create the following tables:
users- User accounts with role-based accessworkouts- Workout definitionsworkout_phases- Workout phases (warmup, main, cooldown)exercises- Individual exercisesworkout_templates- Reusable workout templatestemplate_phases- Template phasestemplate_exercises- Template exercisesworkout_completions- Workout completion recordsexercise_performance- Exercise performance metrics
pnpm devThe application will be available at http://localhost:3000
pnpm testpersonal-trainer-timer/
βββ client/ # Frontend application
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ ui/ # shadcn/ui components
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β β βββ trpc.ts # tRPC client configuration
β β βββ pages/ # Page components
β β β βββ Home.tsx
β β β βββ TrainerDashboard.tsx
β β β βββ ClientDetail.tsx
β β β βββ WorkoutBuilder.tsx
β β β βββ TemplateLibrary.tsx
β β β βββ ClientWorkouts.tsx
β β β βββ ClientProfile.tsx
β β β βββ WorkoutPreview.tsx
β β β βββ WorkoutExecution.tsx
β β βββ App.tsx # Main app component with routing
β β βββ main.tsx # Application entry point
β β βββ index.css # Global styles with cyberpunk theme
β βββ index.html # HTML template
βββ server/ # Backend application
β βββ _core/ # Core server functionality
β β βββ index.ts # Server entry point
β β βββ context.ts # tRPC context
β β βββ trpc.ts # tRPC router configuration
β β βββ env.ts # Environment variables
β βββ db.ts # Database query helpers
β βββ routers.ts # tRPC API routes
β βββ *.test.ts # Unit tests
βββ drizzle/ # Database schema and migrations
β βββ schema.ts # Database table definitions
βββ shared/ # Shared types and constants
βββ package.json # Project dependencies
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ vite.config.ts # Vite build configuration
βββ drizzle.config.ts # Drizzle ORM configuration
- Access:
/trainer/dashboard - Capabilities:
- View all registered clients
- Create and edit workouts
- Manage workout templates
- Track client progress
- Access:
/client/workouts - Capabilities:
- View assigned workouts
- Execute workouts with timer
- Update personal profile
- Track workout history
# Start development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run tests
pnpm test
# Type checking
pnpm check
# Format code
pnpm format
# Database migrations
pnpm db:push- Database Changes: Update
drizzle/schema.tsand runpnpm db:push - API Endpoints: Add procedures to
server/routers.ts - Database Queries: Add helper functions to
server/db.ts - Frontend Pages: Create components in
client/src/pages/ - Routes: Register routes in
client/src/App.tsx - Tests: Write tests in
server/*.test.ts
The project uses Vitest for unit testing. Tests cover:
- Authentication procedures
- Workout management
- Template system
- Client management
- Progress tracking
Run tests with:
pnpm testThe cyberpunk theme is defined in client/src/index.css. Key color variables:
--background: oklch(0.12 0.02 270); /* Deep black */
--primary: oklch(0.65 0.28 340); /* Neon pink */
--accent: oklch(0.75 0.25 200); /* Electric cyan */
--foreground: oklch(0.98 0.01 300); /* Bright white */Modify these values to create your own color scheme while maintaining the neon aesthetic.
The application is built mobile-first with:
- Responsive grid layouts
- Touch-friendly controls
- Optimized font sizes
- Smooth animations
- Voice guidance for hands-free operation
- Authentication: Manus OAuth integration
- Role-Based Access: Separate permissions for trainers and clients
- Protected Routes: Server-side validation for all API calls
- Type Safety: End-to-end TypeScript for runtime safety
The project is optimized for deployment on the Manus platform:
- Create a checkpoint: The project is already configured
- Click "Publish" in the Manus UI
- Your app will be live with automatic SSL and custom domain support
- Build the application:
pnpm build-
Set environment variables on your hosting platform
-
Start the production server:
pnpm start- users: User accounts with role (trainer/client) and profile information
- workouts: Workout definitions assigned to clients
- workout_phases: Phases within workouts (e.g., warmup, main, cooldown)
- exercises: Individual exercises with type (duration/reps)
- workout_templates: Reusable workout patterns
- workout_completions: Workout completion records
- exercise_performance: Detailed exercise performance metrics
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact: [your-email@example.com]
- Email notifications for workout completions
- Analytics dashboard with progress charts
- Workout scheduling with calendar integration
- Exercise video demonstrations
- Social features and workout sharing
- Mobile app (React Native)
Built with β€οΈ and cutting-edge technology