A simple, offline-first daily routine tracker built with React, TypeScript, and IndexedDB.
- ✅ Track daily routines with two types:
- Check: Simple completion checkbox
- Time: Track time spent with +5/+10/+30 minute buttons
- 📊 View history and track your streak
- 💾 All data stored locally in IndexedDB
- 📱 Mobile-friendly responsive design
- 🚀 No server required - works completely offline
- 📦 Export/Import data as JSON
- 🔄 GitHub Pages deployment ready
- Vite - Build tool
- React 18 - UI framework
- TypeScript - Type safety
- React Router (HashRouter) - Client-side routing
- Dexie - IndexedDB wrapper
- CSS - Simple, mobile-first styling
- Node.js 18+ and npm
- Clone the repository:
git clone <your-repo-url>
cd daily-loop- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:5173 in your browser
src/
├── pages/
│ ├── Today.tsx # Today's routine checklist
│ ├── Routines.tsx # Manage routines
│ ├── History.tsx # View history and streak
│ └── Settings.tsx # Export/Import/Reset
├── lib/
│ ├── db.ts # Dexie database setup
│ ├── models.ts # TypeScript interfaces
│ └── date.ts # Date utility functions
├── App.tsx # Main app with HashRouter
├── main.tsx # Entry point
└── App.css # Styles
Routine
{
id: string;
title: string;
isActive: boolean;
sortOrder: number;
createdAt: string;
type: 'check' | 'time';
targetMinutes?: number;
}DailyLog
{
date: string; // YYYY-MM-DD
routineId: string;
done: boolean;
updatedAt: string;
spentMinutes?: number; // for time-type routines
}- Update
vite.config.tswith your repository name:
export default defineConfig({
plugins: [react()],
base: '/your-repo-name/', // Change this
})- Install gh-pages (already in devDependencies):
npm install- Build and deploy:
npm run deploy- Enable GitHub Pages in your repository settings:
- Go to Settings > Pages
- Source: gh-pages branch
- Your app will be available at:
https://yourusername.github.io/your-repo-name/
- Build the project:
npm run build- The
dist/folder contains all static files ready for deployment to any static hosting service.
- Go to Routines page
- Enter routine title
- Select type:
- Check: Simple completion checkbox
- Time: Track time with target minutes
- Click Add
- Open Today page
- For check routines: Click checkbox to mark as done
- For time routines: Use +5/+10/+30 buttons to add minutes
- Progress is saved automatically
- Go to History page
- View last 14 days of activity
- See your current streak (consecutive days with all routines completed)
- Go to Settings page
- Export: Download all data as JSON
- Import: Upload previously exported JSON file
- Reset: Delete all data (cannot be undone)
- Chrome/Edge (recommended)
- Firefox
- Safari (iOS and macOS)
Requires IndexedDB support (available in all modern browsers).
MIT
This is an MVP project. Feel free to fork and customize for your needs!