Skip to content

simone98dm/lazy-trainer-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

647 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ‹οΈ Lazy Trainer

Easily track your workout activities throughout the week

A modern, progressive web application for managing workout plans, tracking activities, and monitoring your fitness progress. Built with Nuxt 4, Vue 3, and Supabase.

License: MIT Nuxt TypeScript Tailwind CSS

πŸš€ Live Demo β€’ πŸ“– Documentation β€’ 🀝 Contributing


✨ Features

🎯 Core Functionality

  • πŸ—“οΈ Activity Management: Create, edit, and organize workout activities
  • πŸ“… Weekly Planning: Plan your workouts throughout the week with an intuitive calendar
  • ⏱️ Timer System: Built-in timer for tracking exercise duration
  • πŸ“Š Progress Tracking: Monitor your fitness journey with activity history
  • πŸ‘₯ Trainer Mode: Share workout plans with clients (trainer feature)

πŸ’Ž User Experience

  • 🎨 Modern UI: Clean, minimalist design with gradients and glassmorphism
  • πŸŒ“ Dark Mode: (Coming soon)
  • πŸ“± Responsive: Optimized for mobile, tablet, and desktop
  • ⚑ Progressive Web App: Install and use offline
  • πŸ”” Toast Notifications: Real-time feedback for user actions
  • πŸ’€ Skeleton Loaders: Smooth loading states

πŸ› οΈ Technical Highlights

  • πŸ—οΈ 4-Layer Architecture: Clean separation of concerns (UI β†’ Pages β†’ Stores β†’ Repositories)
  • πŸ” Authentication: Secure user authentication via Supabase
  • πŸ’Ύ Offline Support: PWA with service worker caching
  • 🎭 Type Safety: Full TypeScript coverage
  • πŸ§ͺ Testing: Unit tests (Vitest) and E2E tests (Playwright)

πŸš€ Quick Start

Prerequisites

  • Node.js: v18.x or higher
  • Package Manager: yarn, npm, or pnpm
  • Supabase Account: For backend services (or use local development)

Installation

  1. Clone the repository

    git clone git@github.com:simone98dm/lazy-trainer-fe.git
    cd lazy-trainer-fe
  2. Install dependencies

    yarn install
    # or
    npm install
    # or
    pnpm install
  3. Set up environment variables

    Create a .env file in the root directory:

    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
    BASE_URL=http://localhost:3000
  4. Start the development server

    yarn dev
    # or
    npm run dev

    Open http://localhost:3000 in your browser.


πŸ—οΈ Architecture

This project follows a 4-Layer Architecture for clean separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Layer 1: Components (UI Only)              β”‚
β”‚  - Display data                             β”‚
β”‚  - Handle user interactions                 β”‚
β”‚  - Emit events                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Layer 2: Pages (Orchestration)             β”‚
β”‚  - Call store methods                       β”‚
β”‚  - Show/hide UI elements                    β”‚
β”‚  - Minimal logic                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Layer 3: Stores (Business Logic)           β”‚
β”‚  - State management                         β”‚
β”‚  - Data validation                          β”‚
β”‚  - Error handling                           β”‚
β”‚  - Call repositories                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Layer 4: Repositories (Data Access)        β”‚
β”‚  - Supabase queries                         β”‚
β”‚  - DTO mapping                              β”‚
β”‚  - API calls                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 UI Components

Design System

  • Colors: Custom green/purple palette with 50-950 shades
  • Typography: Lato font family
  • Shadows: Soft, glow, and inner shadows
  • Animations: Fade, slide, scale, and bounce transitions
  • Border Radius: 2xl, 3xl, 4xl, 5xl for modern rounded corners

Component Library

  • Atoms: BaseButton, Input, Card, Switch, Loading, MaterialIcon
  • Molecules: BaseModal, PageHeader, EmptyState, Toast, TimePicker
  • Organisms: ActivityForm, ActivityList, CustomCalendar, ToastContainer

πŸ“– View component demos at /components-demo


πŸ§ͺ Testing

Unit Tests (Vitest)

# Run unit tests
yarn test:unit

# Run with coverage
yarn test:coverage

# Watch mode
yarn test:unit --watch

E2E Tests (Playwright)

# Run E2E tests
yarn test:e2e

# Run in UI mode
yarn test:e2e --ui

# Run specific browser
yarn test:e2e --project=chromium

🚒 Deployment

Build for Production

# Build the application
yarn build

# Preview production build locally
yarn preview

Deployment Platforms

Vercel (Recommended)

# Deploy to Vercel
yarn vercel:deploy

Other Platforms

  • Netlify: Connect your repo and deploy automatically
  • CloudFlare Pages: Zero-config deployment
  • Node.js Server: Run .output/server/index.mjs

πŸ“– See Nuxt deployment docs for more options


πŸ“œ Available Scripts

Script Description
yarn dev Start development server
yarn build Build for production
yarn preview Preview production build
yarn lint Lint and format code
yarn test:unit Run unit tests
yarn test:coverage Run tests with coverage
yarn test:e2e Run E2E tests
yarn vercel:deploy Deploy to Vercel

πŸ”§ Configuration

Environment Variables

Variable Description Required
SUPABASE_URL Your Supabase project URL βœ…
SUPABASE_ANON_KEY Supabase anonymous key βœ…
SUPABASE_SERVICE_ROLE_KEY Supabase service role key βœ…
BASE_URL Application base URL ❌

Tailwind CSS

Custom configuration in tailwind.config.cts:

  • Extended color palette (primary/secondary)
  • Custom shadows and animations
  • Responsive breakpoints
  • Custom spacing values

PWA Configuration

Progressive Web App settings in nuxt.config.ts:

  • Offline support
  • Service worker caching
  • App manifest
  • Icons and splash screens

πŸ“– Documentation


🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Code of conduct
  • Development workflow
  • Coding standards
  • Pull request process

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Simone Dal Mas (@simone98dm)


πŸ™ Acknowledgments


Made with ❀️ by the Lazy Trainer Team

⭐ Star us on GitHub β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

About

Simplify track and do gym activities

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published