Logo

Team Training

Fitness workout management system with leaderboards and public sharing

Overview

Team Training is a fitness workout management system where master instructors create workouts with videos, resources, and instructions. Instructors can view workouts and members can submit results through linked forms.

Key Features

Workout Management

  • Rich Content Creation:

    • Title and SEO-friendly slug
    • Cover image for thumbnails and social sharing
    • HTML rich text instructions
    • Gallery with images and videos (drag-and-drop ordering)
    • Downloadable resources (PDFs, spreadsheets)
    • Status management (active/archived)
  • WYSIWYG Gallery:

    • Visual preview with 16:9 aspect ratio
    • Thumbnail strip for navigation
    • Drag-and-drop reordering
    • Double-click to edit items
    • Support for images and video embeds
  • Tag System:

    • Organize workouts by tags
    • Color-coded tags for visual identification
    • Multi-select filtering
    • Tag management dialog

Form Integration

  • Linked Forms:
    • Each workout links to a results submission form
    • Members submit workout results
    • Staff can view submissions as leaderboard data
    • Export functionality for analysis

Public Sharing

  • Public Workout Pages:
    • SEO-optimized URLs with slugs
    • No authentication required
    • Full workout details with gallery
    • "Submit Your Results" button linking to form
    • Social media previews with cover images

Instructor Access

  • Workout Library:
    • Card-based list view with thumbnails
    • Filter by tags
    • Search functionality
    • View count tracking
    • Quick access to forms and leaderboards

Database Models

Core Models

model TeamTrainingWorkout {
  id                String   @id @default(cuid())
  createdAt         DateTime @default(now())
  updatedAt         DateTime @updatedAt
  appId             String
  tenantId          String
  title             String
  slug              String
  status            String   // "active" | "archived"
  formId            String?
  config            String   // JSON: instructions, coverImage, gallery, resources
  createdByUserId   String
  updatedByUserId   String?
  tags              TeamTrainingWorkoutTag[]
}

model TeamTrainingTag {
  id        String   @id @default(cuid())
  tenantId  String
  name      String
  color     String
  workouts  TeamTrainingWorkoutTag[]

  @@unique([tenantId, name])
}

Workout Configuration (JSON)

{
  instructions: string;        // HTML rich text
  coverImage?: string;         // URL for thumbnails and SEO
  gallery: Array<{
    order: number;
    title: string;
    type: "image" | "video";
    src: string;
  }>;
  resources: Array<{
    title: string;
    src: string;              // URL to downloadable file
  }>;
}

Routes

Admin Routes

  • /app/{tenant}/apps/team-training - Workouts list with filtering
  • /app/{tenant}/apps/team-training/new - Create workout (super admin only)
  • /app/{tenant}/apps/team-training/{id} - Workout overview
  • /app/{tenant}/apps/team-training/{id}/edit - Edit workout
  • /app/{tenant}/apps/team-training/{id}/submissions - View form submissions

Public Routes

  • /__team-training/{tenant}/workout/{slug} - Public workout page
    • Accessible by slug or ID
    • No authentication required
    • SEO optimized with meta tags
    • Shows full workout details

User Roles

Master Instructor (Super Admin)

  • Create, edit, and delete workouts
  • Manage tags
  • View all submissions
  • Access analytics

Instructor (Regular User)

  • View all active workouts
  • Access public workout pages
  • Submit to linked forms
  • View workout details

Member (Public)

  • Access public workout pages
  • Submit results via linked forms
  • No authentication required

UI Components

InputGallery Component

  • Reusable WYSIWYG gallery management
  • Main preview area with 16:9 aspect ratio
  • Thumbnail strip with selection and reordering
  • Add/Edit/Delete functionality with dialogs
  • Support for images and video embeds
  • Visual feedback with hover states

WorkoutForm Component

  • Unified form for create/edit operations
  • Integrated InputGallery for media management
  • Cover image field for SEO
  • TableSimple for resources management
  • Rich text editor for instructions
  • Tag selection with management dialog

WorkoutPreview Component

  • Gallery with thumbnail navigation
  • Formatted instructions display
  • Resources list with external links
  • Cover image display

CardsList Component

  • Card-based list view with thumbnails
  • Responsive design with action dropdowns
  • Load more pagination pattern
  • Quick access to actions

Tag Management

Features

  • Create, edit, and delete tags
  • Color selection from predefined palette
  • Unique tag names per tenant
  • Multi-select for filtering workouts
  • Settings button for quick tag management

API Endpoints

  • POST /api/tags - Create tag
  • PUT /api/tags - Update tag
  • DELETE /api/tags - Delete tag

Use Cases

Master Instructor Workflow

  1. Create new workout with title and slug
  2. Add cover image for thumbnails
  3. Write detailed instructions in rich text editor
  4. Add gallery items (images/videos) with drag-and-drop
  5. Upload resources (PDFs, spreadsheets)
  6. Select tags for organization
  7. Link to results submission form
  8. Publish as active
  9. Share public URL with instructors/members

Instructor Workflow

  1. Log in to Team Training app
  2. Browse workouts list
  3. Filter by tags if needed
  4. Click workout to view details
  5. Access public page for sharing
  6. Submit to linked form if participating

Member Workflow (Public)

  1. Receive workout URL from instructor
  2. View workout details (no login required)
  3. Watch videos in gallery
  4. Download resources
  5. Click "Submit Your Results"
  6. Fill out form
  7. View leaderboard (future feature)

Configuration

Installation

  1. Navigate to Apps section
  2. Install "Team Training" app
  3. Grant permissions to instructors

Setup

  1. Create tags for workout organization
  2. Set up result submission forms
  3. Configure any custom fields needed
  4. Train master instructors on workout creation

Best Practices

Content Creation

  • Use descriptive titles and slugs for SEO
  • Always add a cover image for better sharing
  • Keep instructions clear and concise
  • Order gallery items logically
  • Provide relevant downloadable resources
  • Tag workouts consistently

Organization

  • Use tags to categorize by:
    • Difficulty level
    • Equipment needed
    • Body focus area
    • Duration
    • Program name
  • Archive old workouts instead of deleting
  • Link every workout to a results form

Public Sharing

  • Use slugs for clean, shareable URLs
  • Test public pages before sharing
  • Ensure all media loads properly
  • Verify form links work correctly

SEO Optimization

Meta Tags

  • Title: Workout title
  • Description: First 160 characters of instructions
  • Open Graph image: Cover image or first gallery item
  • Canonical URLs for better indexing
  • Twitter Card support

URL Structure

  • Clean slugs: /workout/october-endurance-challenge
  • Fallback to ID: /workout/{id} also works
  • No special characters in slugs

Future Enhancements

Planned Features

  • Public leaderboard widget for websites
  • Advanced analytics dashboard
  • Email notifications for new workouts
  • Mobile app for workout viewing
  • Integration with fitness tracking devices
  • Member-to-member sharing
  • Social media auto-posting

Leaderboard System

  • Automatic rankings from form submissions
  • Filterable by location or time period
  • Embeddable widget for websites
  • Real-time updates
  • Gamification features

Integration Points

  • Form System: Links to form submissions for results
  • User System: Permission-based access control
  • Public Routes: SEO-optimized public pages
  • Analytics: View count tracking
  • Search: Tag-aware search functionality

Implementation Status

Completed Features ✅

  • Workout CRUD operations
  • Rich text editor for instructions
  • WYSIWYG gallery management with drag-and-drop
  • Cover image support
  • Resources management
  • Tag system with multi-select
  • Public workout pages with SEO
  • Form integration
  • Card-based list view
  • Search and filtering

In Development

  • Public leaderboard widget
  • Advanced analytics
  • Email notifications
  • Mobile app

We respect your privacy.

TLDR: We use cookies for language selection, theme, and analytics. Learn more.