Tactical Barbell Tracker - A modern SvelteKit application for tracking strength training, cardio workouts, and training blocks following the Tactical Barbell methodology. Built with TypeScript, featuring a comprehensive REST API and server-side rendering, ready for deployment on Cloudflare Pages.
- Training Block Management: Organize workouts into structured training blocks (Endurance, Powerbuilding, Strength, Bodybuilding)
- Comprehensive Workout Tracking: Support for strength, hypertrophy, LISS cardio, HIIT, rest, and deload workouts
- Exercise Database: Track 1RM and 10RM personal records with automatic weight calculations
- Smart Warm-up Sets: Automatically calculated warm-up progressions for strength workouts
- Rest Timer: Built-in timer with notifications and extend options
- Workout History: Complete tracking of all completed workouts
- Drag & Drop Planning: Reorder training blocks with intuitive drag-and-drop interface
- Responsive Design: Works seamlessly on desktop and mobile devices
- Node.js 18.0.0 or higher
- npm (comes with Node.js)
-
Clone the repository:
git clone https://github.com/Bruno-366/Unbroken.git cd Unbroken -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run dev- Start SvelteKit development server with hot module replacementnpm run build- Build for production (includes SSR bundle generation)npm run preview- Preview production build locallynpm run sync- Sync SvelteKit generated filesnpm run lint- Run ESLint with Svelte supportnpm run lint:fix- Run ESLint with auto-fixnpm run type-check- Run SvelteKit sync and Svelte type checking
- SvelteKit - Full-stack web framework with server-side rendering and API routes
- Svelte 5 - Modern reactive framework with runes for state management
- TypeScript - Type safety and enhanced developer experience
- Vite - Build tool and dev server with hot module replacement
- Tailwind CSS - Utility-first CSS framework for responsive design
- ESLint v9 - Code linting with flat config structure
- Cloudflare Adapter - Deployment as Cloudflare Workers with assets binding
- REST API - Comprehensive API endpoints for workout management
- Tactical Barbell Methodology - Structured training approach for strength and conditioning
-
Connect Repository to Cloudflare Pages:
- Go to Cloudflare Pages
- Click "Create a project"
- Connect your GitHub account
- Select the
Bruno-366/Unbrokenrepository
-
Configure Build Settings:
- Framework preset:
SvelteKit(orNoneif SvelteKit is not available) - Build command:
npm run build - Build output directory:
.svelte-kit/output/client - Root directory:
/(leave empty) - Node.js version:
18or higher
- Framework preset:
-
Environment Variables (if needed):
- Go to Settings > Environment variables
- Add any required environment variables
-
Deploy:
- Click "Save and Deploy"
- Your site will be built and deployed automatically
- Future pushes to the main branch will trigger automatic deployments
-
Build the project locally:
npm run build
-
Upload the
.svelte-kit/output/clientfolder contents to Cloudflare Pages using:- Cloudflare Pages dashboard (drag and drop)
- Wrangler CLI:
npx wrangler pages deploy .svelte-kit/output/client
- In Cloudflare Pages dashboard, go to your project
- Navigate to "Custom domains"
- Add your domain and follow DNS configuration instructions
Unbroken/
βββ static/ # Static assets (icons, favicons)
βββ src/ # Source code
β βββ routes/ # SvelteKit file-based routing
β β βββ +layout.svelte # Main layout with navigation
β β βββ +layout.ts # Layout data loading
β β βββ +page.svelte # Overview page (home)
β β βββ api/ # REST API endpoints
β β β βββ exercises/ # Exercise management endpoints
β β β βββ training-blocks/ # Training block endpoints
β β β βββ training-plan/ # Training plan endpoints
β β β βββ workout/ # Workout state and completion endpoints
β β β βββ history/ # Workout history endpoints
β β βββ workout/ # Workout page
β β β βββ +page.svelte # Strength/cardio workout interface
β β β βββ +page.ts # Workout page data loading
β β βββ history/ # History page
β β β βββ +page.svelte # Workout history display
β β βββ settings/ # Settings page
β β βββ +page.svelte # Exercise database and training plan management
β βββ lib/ # Shared library code (SvelteKit convention)
β β βββ blockTemplates.ts # Training block templates and configurations
β β βββ stores.ts # Client-side reactive stores
β β βββ types.ts # Centralized TypeScript interfaces
β β βββ utils.ts # Shared utility functions (weight calculations, notifications)
β βββ app.html # HTML template with PWA meta tags
β βββ app.d.ts # SvelteKit app type definitions
β βββ app.css # Global styles with Tailwind CSS
βββ .github/ # GitHub Actions workflows
βββ .svelte-kit/ # SvelteKit generated files (git ignored)
βββ eslint.config.js # ESLint v9 flat configuration
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration with SvelteKit
βββ wrangler.jsonc # Cloudflare Pages configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ postcss.config.js # PostCSS configuration
βββ svelte.config.js # Svelte and SvelteKit configuration
The application has been built with SvelteKit's full-stack architecture and Svelte 5's modern reactive patterns:
- SvelteKit Framework: File-based routing with dedicated pages for each section
- REST API: Comprehensive server-side API endpoints for all data operations
- Server-Side Rendering: Optimized initial page loads with SSR capabilities
- Reactive State Management: Svelte 5 runes ($state, $derived, $effect) with client-side stores
- Type Safety: Comprehensive TypeScript interfaces shared between client and server
- Modular Architecture: Clear separation between routes, API endpoints, and shared utilities
- Progressive Enhancement: Works with and without JavaScript enabled
The repository includes GitHub Actions workflow that runs on every push and pull request:
- Linting: ESLint v9 checks for code quality (Svelte components and TypeScript)
- Type Checking: SvelteKit sync and Svelte type checking validates components and TypeScript
- Build: Ensures the project builds successfully with SSR bundle generation
- Artifact Upload: Stores build output for review
- Built with Tailwind CSS for rapid UI development
- Utility-first approach with responsive design support
- Dark mode support included out of the box
- Modify
src/index.cssto customize Tailwind configuration - Use Tailwind classes directly in your components for styling
- Custom CSS can be added to
src/index.cssif needed
# Example: Add a UI library (compatible with Tailwind and SvelteKit)
npm install @floating-ui/dom
# Example: Add form handling and validation for SvelteKit
npm install @sveltejs/enhanced:$form
# Example: Add database integration
npm install drizzle-orm @libsql/client
# Example: Add authentication
npm install @auth/sveltekit
# Example: Add date/time utilities
npm install date-fns
# Example: Add additional SvelteKit adapters
npm install @sveltejs/adapter-vercel @sveltejs/adapter-netlify- Modify
tailwind.config.jsto extend the theme, add custom colors, or configure plugins - Add custom utilities or components in
src/app.css - Use Tailwind IntelliSense extension in VS Code for better development experience
- SvelteKit pages and components work seamlessly with Tailwind's utility classes
Create .env files for different environments:
.env- Environment variables for all environments.env.local- Local development (git ignored).env.production- Production builds
- SvelteKit Documentation
- Svelte 5 Documentation
- Vite Documentation
- Cloudflare Pages Documentation
- Cloudflare Workers Documentation
- TypeScript Documentation
- Tailwind CSS Documentation
- Tactical Barbell Official - Learn about the training methodology
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
npm run lint && npm run type-check && npm run build - Commit your changes:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is open source and available under the MIT License.