A simple, privacy-focused web app to track your car lease mileage. Know exactly how many miles per day you can drive without going over your limit.
- Features
- Use as a Progressive Web App
- Quick Start (GitHub Pages)
- Custom Domain
- Customizing the Icons
- How It Works
- Development
- License
- 📊 Real-time calculations - See your daily mile allowance based on remaining time and miles
- 🎯 Pace tracking - Know if you're ahead or behind your expected usage
- 🔗 Shareable - Generate links to share lease terms with others (they track their own mileage)
- 📱 Installable - Add to your phone's home screen like a native app
- 🔒 Private - All data stays on your device (localStorage), nothing sent to servers
- 🌐 Works offline - Service worker caches the app for offline use
A Progressive Web App (PWA) is a website that can be installed on your phone or computer like a regular app. You don't need to download anything from an app store—just visit the site and add it to your home screen.
Once installed, Lease Tracker:
- Opens in its own window (no browser toolbar)
- Works offline
- Launches from your home screen or dock with its own icon
It's the convenience of a native app without the hassle of app store downloads or updates.
- Open your site URL in Safari (not Chrome or another browser—iOS only allows PWA installs from Safari)
- Tap the Share button (the square with an arrow pointing up)
- Scroll down and tap "Add to Home Screen"
- Give it a name (or keep "Lease Tracker") and tap Add
Now it appears on your home screen with its own icon, opens without Safari's browser chrome, and works offline.
- Open the site in Safari
- Click File → Add to Dock
- It now lives in your Dock and opens in its own window
- Open the site in Chrome
- Click the three-dot menu (top right)
- Click "Install Lease Mileage Tracker..." or Save and Share → Install
- It appears in your Applications folder and Launchpad
- The app caches itself after first load, so it works even without internet
- Your mileage data stays in that specific browser/install's storage—if you install on both your iPhone and Mac, they'll track separately
- If you ever need to "reset" the PWA, you can delete it and re-add it from the website
- Go to github.com/new
- Name your repository (e.g.,
lease-trackerormileage-tracker) - Set it to Public (required for free GitHub Pages)
- Click Create repository
Option A: Upload via GitHub Web Interface
- On your new repo page, click "uploading an existing file" or the Add file → Upload files button
- Drag and drop all files from this folder:
index.htmlmanifest.jsonsw.jsicon-192.pngicon-512.png
- Click Commit changes
Option B: Use Git Command Line
# Clone your new empty repo
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAME
# Copy all the app files into this folder, then:
git add .
git commit -m "Initial commit - Lease Tracker app"
git push origin main- Go to your repository on GitHub
- Click Settings (tab at the top)
- Scroll down to Pages in the left sidebar
- Under Source, select Deploy from a branch
- Under Branch, select
mainand/ (root) - Click Save
After a minute or two, your app will be live at:
https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/
For example: https://jordankrueger.github.io/lease-tracker/
If you want to use a custom domain like lease.yourdomain.com:
- In your repo, create a file called
CNAMEcontaining just your domain:lease.yourdomain.com - In your DNS settings, add a CNAME record pointing to
YOUR_USERNAME.github.io - In GitHub Pages settings, enter your custom domain
The included icons are simple placeholders. To create custom icons:
- Create a 512x512 PNG image with your design
- Use a tool like favicon.io or realfavicongenerator.net to generate all sizes
- Replace
icon-192.pngandicon-512.pngin your repo
- Lease configuration and current mileage are stored in your browser's
localStorage - Data persists across sessions but is device-specific
- Clearing browser data will reset the app
- The Share button generates a URL with lease parameters (dates, total miles, starting odometer)
- When someone opens a shared link, those values pre-fill the setup form
- Each person's mileage entries stay on their own device
You can manually construct URLs with these parameters:
start- Lease start date (YYYY-MM-DD)end- Lease end date (YYYY-MM-DD)miles- Total miles allowedstartOdo- Odometer reading at lease start
Example:
https://yoursite.com/?start=2024-01-15&end=2027-01-15&miles=36000&startOdo=15
This is a single-page app with no build step required. To modify:
- Edit
index.html- contains all React code inline - Test locally by opening
index.htmlin a browser (some features like service worker need a local server) - For local testing with full PWA features:
npx serve .
GNU General Public License v3.0 - Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.
Built with React, Tailwind CSS, and localStorage. No backend required.