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.
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 files npm run lint
- Run ESLint with Svelte supportnpm run lint:fix
- Run ESLint with auto-fixnpm run type-check
- Run SvelteKit sync and Svelte type checkingConnect Repository to Cloudflare Pages:
Bruno-366/Unbroken
repositoryConfigure Build Settings:
SvelteKit
(or None
if SvelteKit is not available)npm run build
.svelte-kit/output/client
/
(leave empty)18
or higherEnvironment Variables (if needed):
Deploy:
Build the project locally:
npm run build
Upload the .svelte-kit/output/client
folder contents to Cloudflare Pages using:
npx wrangler pages deploy .svelte-kit/output/client
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:
The repository includes GitHub Actions workflow that runs on every push and pull request:
src/index.css
to customize Tailwind configurationsrc/index.css
if 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
tailwind.config.js
to extend the theme, add custom colors, or configure pluginssrc/app.css
Create .env
files for different environments:
.env
- Environment variables for all environments.env.local
- Local development (git ignored).env.production
- Production buildsgit checkout -b feature-name
npm run lint && npm run type-check && npm run build
git commit -m 'Add feature'
git push origin feature-name
This project is open source and available under the MIT License.