0d0ba9d5f1c3b67d941ca2e02d2348a43fefd92c
				
			
			
		
	📅 Track Every Day
A simple, privacy-focused habit tracking web app. Track anything, every day.
✨ 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
- Clone the repository:
 
git clone https://git.schulze.network/schulze/trackevery-day.git
cd trackevery-day
- Install dependencies:
 
pnpm install
- Set up environment variables:
 
# Create a .env.local file with:
POSTGRES_URL="your-postgres-connection-string"
- Set up the database:
 
# Generate migrations
pnpm db:generate
# Push schema to database
pnpm db:push
# Or run migrations
pnpm db:migrate
- 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
- First Visit: A unique token is generated (e.g., 
happy-blue-cat-1234) - Save Your Token: This is your key to access your data
 - Track Habits: Click habit cards to log executions
 - View Stats: See real-time statistics and progress
 - 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
Description
				
					Languages
				
				
								
								
									TypeScript
								
								92%
							
						
							
								
								
									CSS
								
								4.9%
							
						
							
								
								
									JavaScript
								
								3.1%