A beautiful, local-first habit tracker and task manager designed to help you build momentum, track consistency, and share progress with accountability partners. Built as a Progressive Web App (PWA) using Next.js 15, TypeScript, Dexie.js (IndexedDB), and Firebase.
- Visual Calendar Grid: Monthly interactive calendar with quick status toggling (
Done/Missed/Excused). - Flexible Frequencies: Daily, weekly, bi-weekly, monthly, or custom day selection.
- Streak & Analytics: Current streak, best streak, total completions, and overall completion rate calculations.
- Contribution Heatmap: 16-week GitHub-style activity grid visualizing consistency over time.
- Weekly Progress Charts: 8-week completion bar chart built with pure CSS animations.
- Quick Logging: Fast status popup with optional journal notes and a dedicated "Done" button.
- Share Codes: Generate unique 6-character share codes for any habit.
- Native In-App Viewing: Friends can enter your share code in their Shared tab to view your habits, streaks, calendar, and heatmaps in a clean, read-only interface.
- Security & Privacy: Enforced by an access-mirror security model in Firestore β only users who have claimed an active share code can view your data.
- Revoke Anytime: Owners can view who claimed their code and instantly revoke access.
- Date Navigation & Organization: Daily view with simple next/previous day navigation and a "Today" quick-jump button.
- Priorities & Reminders: Categorize tasks by priority (
Low,Medium,High) and set scheduled time reminders. - Browser Notifications: Native client-side notification reminders triggered at scheduled times.
- Detailed Notes: Expandable notes for task context and sub-items.
- Instant UI (Offline-First): Powered by IndexedDB via Dexie.js. All changes write locally first for zero-latency interactions without spinners.
- Cloud Sync: Multi-device sync backed by Firebase Auth (Google & Email/Password) and Firestore with a robust last-write-wins merge strategy.
- Sanitized Synchronization: Automatic filtering of undefined fields to ensure clean Firestore transactions.
- Theme Modes: Light, Dark, and System modes with smooth transitions.
- Accent Color System: Choose from 6 curated palettes:
Purple,Blue,Teal,Rose,Amber, andEmerald. - Hero Dashboard: Branded landing page with accent glow, greeting, and summary metrics.
- Data Portability: Export your complete habit and task data anytime as JSON (full backup) or CSV (spreadsheet-ready).
- Fully installable on iOS, Android, macOS, and Windows.
- Service Worker with offline asset caching and network-first strategies.
- Standalone app experience with mobile-optimized bottom navigation tab bar.
| Layer | Technology |
|---|---|
| Framework | Next.js 15 (App Router, Turbopack) |
| Language | TypeScript |
| Styling | Vanilla CSS Modules & CSS Variables (zero runtime CSS-in-JS) |
| Local Database | Dexie.js (IndexedDB wrapper) |
| Authentication & Cloud | Firebase v11 (Auth & Firestore) |
| Icons | Lucide React |
| Date Utilities | date-fns |
git clone https://github.com/your-username/trackme.git
cd trackmenpm installCreate a .env.local file in the root directory with your Firebase project credentials:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_idnpm run devOpen http://localhost:3000 in your browser.
To support secure multi-user data isolation and habit sharing, deploy the following Firestore security rules in your Firebase Console:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// User's own data β full read/write access
match /users/{userId}/habits/{habitId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
// Allow read if an access mirror doc proves an active share
allow read: if request.auth != null
&& exists(/databases/$(database)/documents/users/$(userId)/sharedWith/$(request.auth.uid));
}
match /users/{userId}/habitEntries/{entryId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
allow read: if request.auth != null
&& exists(/databases/$(database)/documents/users/$(userId)/sharedWith/$(request.auth.uid));
}
match /users/{userId}/tasks/{taskId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /users/{userId}/preferences/{prefId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Access mirror subcollection
match /users/{ownerId}/sharedWith/{viewerId} {
allow create: if request.auth != null && request.auth.uid == viewerId;
allow read, delete: if request.auth != null && request.auth.uid == ownerId;
allow read: if request.auth != null && request.auth.uid == viewerId;
}
// Habit shares collection
match /habitShares/{shareId} {
allow read: if request.auth != null;
allow create: if request.auth != null
&& request.resource.data.ownerUserId == request.auth.uid;
allow update: if request.auth != null;
}
}
}trackme/
βββ public/ # Static assets, PWA manifest, service worker
β βββ manifest.json
β βββ sw.js
β βββ icons/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ auth/ # Authentication page (Google / Email)
β β βββ settings/ # Settings, themes, sync, and data export
β β βββ shared/ # Shared habits feed & share code claim
β β βββ tasks/ # Daily task manager
β β βββ layout.tsx # Root layout with Theme & Auth providers
β β βββ page.tsx # Landing page & Habits dashboard
β βββ components/ # Modular UI components
β β βββ auth/ # Auth forms & state
β β βββ habits/ # Habit cards, calendar, charts, heatmap, share modal
β β βββ layout/ # TabBar navigation & header
β β βββ tasks/ # Task items, modals, priority controls
β βββ hooks/ # Custom React hooks (useHabits, useTasks, usePreferences)
β βββ lib/ # Utilities (db, sync, sharing, auth, export, notifications)
β βββ types/ # TypeScript definitions
βββ PROGRESS.md # Comprehensive session-by-session development log
This project is licensed under the MIT License.