Skip to content

Murqin/rep-counter

Repository files navigation

🌍 Translations: English | Türkçe


Rep Counter ⚡

A minimalist, AMOLED-first Rep Counter PWA designed for peak training focus and zero distractions. Built using Svelte 5 and Tailwind CSS v4.

Svelte 5 badge Tailwind CSS v4 badge TypeScript badge Vercel Deployed status

Live Demo Portal


📱 Screenshots

Counter Screen Portrait Rest Timer Portrait Success Screen Portrait Settings & Presets Portrait


✨ Features

  • 🖤 AMOLED-First Layout: Pure pitch-black background (#000000) designed to minimize battery drain on modern mobile OLED/AMOLED screens.
  • 💾 Smart State Persistence: Never lose active workout states. Session metrics and timers survive browser refreshes or closures by calculating precise delta timestamps (lastTick).
  • 📱 PWA Ready (Rich Installation UI): Installs as a native standalone application on iOS, Android, and Desktop. Includes app screenshots and descriptions inside the native prompt.
  • ⚙️ Custom Workout Presets: Instantly configure, save, edit, and delete custom exercise routine templates.
  • 🔄 Zero-Second Rest Support: Designed for high-intensity interval training (HIIT), featuring a fluid 600ms transition pause to keep UI pacing visual and natural.
  • 🔊 Haptic & Audio Feedback: Physical vibration feedback for registered reps and high-frequency sound alerts for set completions (fully toggleable).
  • 🔒 Privacy Guaranteed: Zero ads, zero background tracking, and no database synchronization. All session data resides exclusively inside your local browser storage.

🏗️ State Architecture

This PWA utilizes Svelte 5 Runes combined with persistent writable stores to maintain an offline-first state structure:

graph TD
    UI[App.svelte & Components] -->|Trigger Actions| Store[store.ts]
    Store -->|Update State| Session[SessionState Store]
    Store -->|Update Config| Settings[Settings Store]
    
    Session -->|Reactivity via Svelte Runes| UI
    Settings -->|Apply Theme & Sound| UI
    
    Store -->|Auto-save / Auto-load| LS[(LocalStorage)]
    
    Timer[Timer.svelte] -->|Unix Timestamp Delta| SmartTick[updateTimer]
    SmartTick -->|Prevent Ghost Ticks| Session
    
    Feedback[feedback.ts] -->|Haptic & Audio Beep| User((User))
Loading

🛠️ Technology Stack

  • Framework Core: Svelte 5 (leveraging Svelte runes: $state, $derived, $effect)
  • Styling Engine: Tailwind CSS v4 + native CSS Custom Variables for flexible dark theming
  • PWA Service Worker: vite-plugin-pwa utilizing an offline-first Workbox caching strategy
  • Bundler: Vite
  • Testing Engine: Vitest + Testing Library + JSDom

📲 PWA Installation Guide

Mobile Environments (Android & iOS)

  • Brave / Chrome (Android): Open the live link and tap the floating "Install" button. The browser will present a rich, card-style install prompt.
  • Firefox (Android): Open the site, tap the menu, and select "Install".
  • Safari (iOS): Open the site, tap the Share button, and select "Add to Home Screen". (Note: If shortcuts fail to appear on Android, verify that your browser has the Add home screen shortcuts system permission enabled inside App Settings).

Desktop Environments

  • Open the application portal inside any modern Chromium browser (Brave, Chrome, Edge), click the Install icon situated on the right side of the address bar, and confirm the installation prompt.

🚀 Local Development

Prerequisites

  • Node.js (Version 18 or higher)
  • Package Manager: npm / pnpm / yarn

Setup Steps

  1. Clone the repository:
    git clone https://github.com/Murqin/rep-counter.git
    cd rep-counter
  2. Install dependency registry:
    npm install
  3. Boot the local development server:
    npm run dev
  4. Compile production bundles:
    npm run build

🧪 Testing Registry

Rep Counter is verified via comprehensive unit and integration testing pipelines situated inside /tests:

Run the test suite:

npm test

Execute Svelte static type checking:

npm run check

❤️ Support the Developer

If you find this PWA useful, consider supporting its open-source maintenance:

Buy Me a Coffee


🔮 Roadmap

  • Workout History & Charts: Persistent calendar tracking, heatmaps, personal records, and statistical trends.
  • Data Export & Import: Export custom presets and history to lightweight JSON files to backup data offline.
  • Alternative Timer Protocols: Support for EMOM (Every Minute on the Minute), Tabata, and AMRAP (As Many Rounds As Possible) routines.
  • Synthesized Vocal Guide: High-quality synthesized speech guidance detailing reps and rest milestones.

Made with ❤️ by Murqin

About

A minimalist, AMOLED-first Rep Counter PWA designed for peak performance and zero distractions. Built with Svelte 5 and Tailwind CSS v4.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors