Files
trackevery-day/README.md
2025-11-24 22:02:40 +01:00

5.7 KiB

📅 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:
git clone https://git.schulze.network/schulze/trackevery-day.git
cd trackevery-day
  1. Install dependencies:
pnpm install
  1. Set up environment variables:
# Create a .env.local file with:
POSTGRES_URL="your-postgres-connection-string"
  1. Set up the database:
# Generate migrations
pnpm db:generate

# Push schema to database
pnpm db:push

# Or run migrations
pnpm db:migrate
  1. Run the development server:
pnpm dev

Open 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

-- 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

# 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