Skip to content

FalkenDev/Trainity

Repository files navigation

Trainity

A self-hosted fitness tracking web application built with NestJS and Vue 3.

License Backend Frontend Database


Overview

Trainity is a full-stack workout application designed for users who want full ownership of their data without subscription fees or connectivity requirements. It offers a complete suite of tools to plan routines, log sessions in real-time, and visualize progress over time. The platform is designed to be mobile-first for gym usage while providing a robust desktop interface for planning and analysis.

Features

  • Workout Management: Create and organize custom workout routines with specific exercises, sets, and targets.
  • Session Tracking: Log workouts in real-time with an interface optimized for mobile devices.
  • Exercise Library: Manage a database of exercises with support for custom images and muscle group categorization.
  • Progress Analytics: View detailed statistics including volume, frequency, and personal records per exercise.
  • Body Metrics: Track weight logs and upload progress photos to monitor physical changes.
  • Privacy Focused: Complete data ownership with no third-party tracking or external dependencies.

Technology Stack

Backend

  • Framework: NestJS (v11)
  • Database: PostgreSQL 17
  • ORM: TypeORM
  • Authentication: Passport.js (JWT & Local Strategies)
  • Validation: class-validator & class-transformer
  • Media: Sharp (Image processing) & Multer (File uploads)
  • Documentation: Swagger/OpenAPI

Frontend

  • Framework: Vue 3 (Composition API)
  • Build Tool: Vite
  • UI Library: Vuetify 3
  • State Management: Pinia (with persistence)
  • Visualization: Chart.js & Vue-Chartjs
  • Routing: Vue Router

Getting Started

Prerequisites

  • Docker & Docker Compose (Recommended)
  • OR
  • Node.js v18+
  • PostgreSQL v15+

Installation (Docker - Recommended)

  1. Clone the repository

    git clone https://github.com/FalkenDev/Trainity.git
    cd Trainity
  2. Start the application

    docker compose up -d --build

    The database migrations will run automatically on startup.

  3. Seed initial data (optional) Population of default exercises and muscle groups:

    docker exec -it trainity_backend npm run seed
  4. Access the application

Installation (Manual)

  1. Clone the repository

    git clone https://github.com/FalkenDev/Trainity.git
    cd Trainity
  2. Configure Environment Copy the example environment file and configure your database credentials:

    cp .env.example .env
  3. Backend Setup

    cd backend
    npm install
    
    # Ensure PostgreSQL is running and update .env with credentials
    
    npm run build
    npm run start:prod
  4. Frontend Setup

    cd frontend
    npm install
    npm run build
    npm run preview

Development

Project Structure

Trainity/
├── backend/          # NestJS API application
│   ├── src/          # Source code
│   └── test/         # E2E tests
├── frontend/         # Vue 3 application
│   └── src/          # Source code
├── docker-compose.yml # Development orchestration
└── Dockerfile.*      # Container definitions

Running in Development Mode

To start both services with hot-reload enabled:

docker compose -f docker-compose.yml up
  • Backend changes will trigger a transparent restart.
  • Frontend changes will be reflected instantly via Vite HMR.

Contributing

Contributions are welcome. Please read our Contributing Guidelines before submitting a Pull Request.

By contributing to Trainity, you agree to our Contributor License Agreement (CLA).

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

This software is provided "as is", without warranty of any kind.

About

A free web application for individuals to create personalized gym passes, track workout statistics (e.g., weight lifted, reps, sets), and more. Designed to provide the functionality of premium fitness apps without the cost.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages