211 lines
5.7 KiB
Markdown
211 lines
5.7 KiB
Markdown
# 📅 Track Every Day
|
|
|
|
https://trackevery.day/
|
|
|
|
A simple, privacy-focused habit tracking web app. Track anything, every day.
|
|
|
|
## 🎯 Vision & Goal
|
|
|
|
**Goal**: To provide the most frictionless, privacy-respecting tool for users to build consistency in their lives without the barrier of complex sign-ups or data tracking concerns.
|
|
|
|
**Vision**: A world where self-improvement is accessible to everyone without trading their privacy for it. `trackevery-day` aims to become the standard for "unaccounted" personal tracking, eventually expanding into a broader minimalist "life logger" platform.
|
|
|
|
## 💼 Business Model
|
|
|
|
This project operates on a sustainable Open Source model:
|
|
|
|
1. **Core Product (Free & Open Source)**: The full application is available for free. Users can self-host or use the public instance.
|
|
2. **Supporter Tier (Future)**: Optional premium features for power users who want to support development:
|
|
- Advanced Data Analysis & Trends
|
|
- Encrypted Cloud Backups
|
|
- API Access for integrations
|
|
3. **Donations**: Community support via GitHub Sponsors / Ko-fi to cover hosting costs.
|
|
|
|
---
|
|
|
|
## 🗺️ Roadmap & Tasks
|
|
|
|
We are building this out in phases. Below is the breakdown of problems into small, actionable tasks.
|
|
|
|
### Phase 1: Core Refinement (Current Focus)
|
|
|
|
_Goal: Polish the existing functionality to be feature-complete._
|
|
|
|
- [ ] **Habit Management**
|
|
- [ ] Add "Edit Habit" functionality (rename, change type/color).
|
|
- [ ] Add "Delete/Archive Habit" functionality (UI implementation).
|
|
- [ ] Implement "Undo Log" (remove accidental logs).
|
|
- [ ] **Visualization**
|
|
- [ ] Add a "Contribution Graph" (GitHub style) heatmap for each habit.
|
|
- [ ] Add a simple line chart for "Frequency over Time".
|
|
- [ ] **UX Improvements**
|
|
- [ ] specific mobile-responsive tweaks for the dashboard grid.
|
|
- [ ] Add a "Settings" page to manage the token (regenerate, view).
|
|
|
|
### Phase 2: Data Sovereignty
|
|
|
|
_Goal: Ensure users truly own their data._
|
|
|
|
- [ ] **Export/Import**
|
|
- [ ] Create JSON export handler.
|
|
- [ ] Create CSV export handler (for spreadsheet analysis).
|
|
- [ ] Build a "Restore from Backup" feature (JSON import).
|
|
- [ ] **Local-First Enhancements**
|
|
- [ ] Cache habit data in `localStorage` for faster load times.
|
|
- [ ] Implement offline queuing for logs when network is unavailable.
|
|
|
|
### Phase 3: Engagement & Growth
|
|
|
|
_Goal: Help users stay consistent._
|
|
|
|
- [ ] **PWA Implementation**
|
|
- [ ] Add `manifest.json` and service workers.
|
|
- [ ] Enable "Add to Home Screen" prompt.
|
|
- [ ] **Gamification (Subtle)**
|
|
- [ ] Visual rewards for hitting streaks (confetti, badges).
|
|
- [ ] "Levels" based on total consistency score.
|
|
- [ ] **Notifications**
|
|
- [ ] Browser-based push notifications for reminders (optional).
|
|
|
|
### Phase 4: Advanced Features (Supporter Tier)
|
|
|
|
_Goal: Power features for data nerds._
|
|
|
|
- [ ] **Public Profile** (Optional public shareable link for specific habits).
|
|
- [ ] **API Access** (Generate API keys to log via curl/scripts).
|
|
- [ ] **Webhooks** (Trigger events when a habit is logged).
|
|
|
|
---
|
|
|
|
## ✨ Features
|
|
|
|
- **Token-based authentication** - No email or password required
|
|
- **Privacy-first** - Your data is tied to a unique token
|
|
- **Simple interface** - Click to log, see stats instantly
|
|
- **Habit types** - Track positive, neutral, or negative habits
|
|
- **Real-time statistics** - See averages, streaks, and time since last log
|
|
- **Cross-device sync** - Use your token to access data anywhere
|
|
|
|
## 🚀 Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- Node.js 18+
|
|
- PostgreSQL database (local or hosted)
|
|
- pnpm (or npm/yarn)
|
|
|
|
### Setup
|
|
|
|
1. Clone the repository:
|
|
|
|
```bash
|
|
git clone https://git.schulze.network/schulze/trackevery-day.git
|
|
cd trackevery-day
|
|
```
|
|
|
|
2. Install dependencies:
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
3. Set up environment variables:
|
|
|
|
```bash
|
|
# Create a .env.local file with:
|
|
POSTGRES_URL="your-postgres-connection-string"
|
|
```
|
|
|
|
4. Set up the database:
|
|
|
|
```bash
|
|
# Generate migrations
|
|
pnpm db:generate
|
|
|
|
# Push schema to database
|
|
pnpm db:push
|
|
|
|
# Or run migrations
|
|
pnpm db:migrate
|
|
```
|
|
|
|
5. Run the development server:
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
Open [http://localhost:3000](http://localhost:3000) to start tracking!
|
|
|
|
## 🏗️ Tech Stack
|
|
|
|
- **Next.js 15** - React framework with App Router
|
|
- **Drizzle ORM** - Type-safe database queries
|
|
- **PostgreSQL** - Database (works with Vercel Postgres, Neon, Supabase, etc.)
|
|
- **React Query** - Data fetching and caching
|
|
- **Tailwind CSS** - Styling
|
|
- **TypeScript** - Type safety
|
|
|
|
## 📱 How It Works
|
|
|
|
1. **First Visit**: A unique token is generated (e.g., `happy-blue-cat-1234`)
|
|
2. **Save Your Token**: This is your key to access your data
|
|
3. **Track Habits**: Click habit cards to log executions
|
|
4. **View Stats**: See real-time statistics and progress
|
|
5. **Access Anywhere**: Use your token to login from any device
|
|
|
|
## 🔒 Privacy
|
|
|
|
- No personal information required
|
|
- No email or password needed
|
|
- Your token is your only identifier
|
|
- Data is only accessible with your token
|
|
|
|
## 📝 Database Schema
|
|
|
|
```sql
|
|
-- Users table
|
|
users (
|
|
id SERIAL PRIMARY KEY,
|
|
token TEXT UNIQUE NOT NULL,
|
|
created_at TIMESTAMP DEFAULT NOW()
|
|
)
|
|
|
|
-- Habits table
|
|
habits (
|
|
id SERIAL PRIMARY KEY,
|
|
user_id INTEGER REFERENCES users(id),
|
|
name TEXT NOT NULL,
|
|
type TEXT CHECK (type IN ('positive', 'neutral', 'negative')),
|
|
is_archived BOOLEAN DEFAULT FALSE,
|
|
created_at TIMESTAMP DEFAULT NOW()
|
|
)
|
|
|
|
-- Habit logs table
|
|
habit_logs (
|
|
id SERIAL PRIMARY KEY,
|
|
habit_id INTEGER REFERENCES habits(id),
|
|
logged_at TIMESTAMP DEFAULT NOW(),
|
|
note TEXT
|
|
)
|
|
```
|
|
|
|
## 🛠️ Development
|
|
|
|
```bash
|
|
# Run development server
|
|
pnpm dev
|
|
|
|
# Type checking
|
|
pnpm check
|
|
|
|
# Database management
|
|
pnpm db:studio # Open Drizzle Studio
|
|
pnpm db:generate # Generate migrations
|
|
pnpm db:push # Push schema changes
|
|
```
|
|
|
|
## 📄 License
|
|
|
|
GPL-3.0 License - see LICENSE file for details
|