habistat-tracker Svelte Themes

Habistat Tracker

βœ… Habistat Tracker - Build habits. Track progress. Achieve goals.

Habistat Tracker

Build habits. Track progress. Achieve goals.

🌐 Open-SourceΒ | πŸ”„Β Cross-Platform | 🎯 Part-Gamified

Habistat is a free and open-source habit tracker productivity toolβ€”an alternative to apps like Everyday, Habitify, and Habitica. It is designed with privacy, transparency, and ease of use in mind. Built with Tauri and Svelte, it runs natively on Windows, macOS, Android, and iOS, and is fully accessible from any modern browser. You can track daily routines with either a points system or simple progress logs. All data can be exported or imported as JSON, giving you complete control. Build steady habits one day at a time, and let meaningful change grow naturally. 🌿

Why?

Tired of bloated apps and shaky privacy policies? Habistat keeps it simple. Inspired by "Don't Break the Chain," it turns habit tracking into a daily checkmark ritual.

Visit: habistat.app

[!NOTE] This app is currently in its alpha development stage and may not be stable until future versions. The currently available versions are Windows and web, with other versions coming soon.

Features

  • βœ… Positive & 🚫 Negative Habits: Keep track of what to do and what to avoid.
  • πŸ“Š Dashboard & πŸŽ‰ Visuals: View your trends and progress with sleek charts and an activity grid.
  • πŸ“… Custom Calendars: Group habits by themes.
  • πŸ›œ Offline-First with πŸ”„ Optional Sync: Fully functional offline and sync across devices only if you choose.
  • πŸ”’ Full Data Portability: Easily import or export your habit history anytime, no restrictions.
  • πŸ“± Clean, Adaptive UI: Enjoy light/dark modes, multilingual support, and a stylish design built with SvelteKit, Tailwind CSS, and shadcn-svelte.
  • 🌐 Local-First Architecture
  • ☁️ Cloud Sync
  • πŸ› Advanced Debug System
    • 🎯 Multiple Debug Levels
    • πŸ”§ Runtime Configuration
    • πŸ“Š Debug History
    • 🎨 Visual Indicators
    • πŸ“± Module Loggers
    • πŸš€ Production Optimized

Getting Started

  1. Create a Calendar: Name it (e.g., Hobbies, Fitness, Negative) and pick a color.
  2. Add Habits: Label them, choose positive or negative, and set timers (optional).
  3. Track & Grow: Check off daily.

Debug System

Habistat Tracker includes a powerful debug system for development and troubleshooting:

Quick Start

# Enable debug levels in your .env.local
VITE_DEBUG_LEVELS="error,warn,info,debug"
VITE_DEBUG_RUNTIME_TOGGLE="true"

Usage

import { debugLogger } from '$lib/utils/debug-logger';

// Simple logging
debugLogger.info('User logged in', { userId: '123' });
debugLogger.error('Something went wrong', { error: details });

// Module-specific loggers
const log = getModuleLogger('AuthService');
log.info('Authentication successful', { userId: user.id });

Features

  • 🎯 Multiple Debug Levels: Trace, Debug, Info, Warn, Error
  • πŸ”§ Runtime Configuration: Toggle settings without restart
  • πŸ“Š Debug History: In-memory message history
  • 🎨 Visual Indicators: Emoji indicators for different levels
  • πŸ“± Module Loggers: Dedicated loggers for different modules
  • πŸš€ Production Optimized: Automatic cleanup and tree-shaking

For detailed documentation, see Debug System Documentation.

Development

Prerequisites

  • Node.js 18+
  • Bun package manager
  • SQLite (for local development)

Setup

  1. Clone the repository

    git clone https://github.com/your-username/habistat-tracker.git
    cd habistat-tracker
    
  2. Install dependencies

    bun install
    
  3. Set up environment variables

    cp .env.example .env.local
    # Edit .env.local with your configuration
    
  4. Initialize the database

    bun run db:setup
    
  5. Start development server

    bun run dev
    

Available Scripts

# Development
bun run dev                    # Start dev server on port 3001
bun run check                  # Type-check with svelte-check
bun run check:watch            # Type-check in watch mode

# Code Quality
bun run lint                   # Lint with Biome
bun run format                 # Format with Biome + Prettier
bun run format:check           # Check formatting

# Database (SQLite + Drizzle ORM)
bun run db:generate            # Generate migrations from schema
bun run db:migrate             # Apply migrations
bun run db:push                # Push schema changes directly
bun run db:studio              # Open Drizzle Studio
bun run db:reset               # Reset database (development only)
bun run db:setup               # Generate + migrate (initial setup)

# Tauri (Desktop App)
bun run tauri dev              # Run Tauri development build
bun run tauri build            # Build Tauri production app

# Build
bun run build                  # Build for production
bun run preview                # Preview production build

Architecture

Dual-Database System

Habistat uses a hybrid local-first architecture:

  • Local Database: SQLite (via Drizzle ORM) for offline-first functionality
  • Cloud Database: Convex for optional synchronization when authenticated

Key Technologies

  • Frontend: SvelteKit 2 with Svelte 5 (runes mode)
  • Styling: Tailwind CSS v4 with shadcn-svelte components
  • Database: SQLite with Drizzle ORM
  • Backend: Convex for cloud synchronization
  • Authentication: Clerk
  • Desktop: Tauri
  • Build: Vite with SvelteKit adapter-static

Environment Variables

Required

# Clerk Authentication
PUBLIC_CLERK_PUBLISHABLE_KEY="your_publishable_key"
CLERK_SECRET_KEY="your_secret_key"

# Convex Configuration
VITE_CONVEX_URL="https://your-project.convex.cloud"
CONVEX_DEPLOYMENT="your-project-name"
CLERK_JWT_ISSUER_DOMAIN="https://your-clerk-domain.clerk.accounts.dev"

Debug Configuration

# Debug levels (comma-separated): error,warn,info,debug,trace
VITE_DEBUG_LEVELS="error,warn,info"

# Debug options
VITE_DEBUG_RUNTIME_TOGGLE="true"
VITE_DEBUG_INCLUDE_TIMESTAMPS="true"
VITE_DEBUG_INCLUDE_CALLER_INFO="false"
VITE_DEBUG_MAX_HISTORY_SIZE="1000"

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Ensure code passes linting and type checking
  6. Submit a pull request

Code Quality

  • Use the provided debug system for logging
  • Follow the existing code style (2 spaces, max 100 chars/line)
  • Add comments for complex logic
  • Use TypeScript for type safety

License

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

Support

For issues and questions:

  1. Check the Debug System Documentation
  2. Review existing issues on GitHub
  3. Create a new issue with detailed information

Built with ❀️ using Svelte, Tauri, and modern web technologies.


Tech Stack

Habistat is built with a modern and robust technology stack:


Project Structure

habistat/
β”œβ”€β”€ docs/                          # Documentation & development guides
β”œβ”€β”€ src/                          # Main SvelteKit application
β”‚   β”œβ”€β”€ convex/                   # Convex backend functions & schema
β”‚   β”œβ”€β”€ i18n/                     # Internationalization files
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ components/           # Svelte UI components
β”‚   β”‚   β”œβ”€β”€ db/                   # Database client & schema
β”‚   β”‚   β”œβ”€β”€ hooks/                # Custom Svelte hooks
β”‚   β”‚   β”œβ”€β”€ services/             # Business logic & data services
β”‚   β”‚   β”œβ”€β”€ stores/               # Svelte stores for state management
β”‚   β”‚   └── utils/                # Utility functions
β”‚   β”œβ”€β”€ params/                   # SvelteKit parameter matchers
β”‚   β”œβ”€β”€ routes/                   # SvelteKit pages & API routes
β”‚   β”‚   β”œβ”€β”€ dashboard/            # Main dashboard pages
β”‚   β”‚   β”œβ”€β”€ settings/             # Settings page
β”‚   β”‚   β”œβ”€β”€ stats/                # Statistics page
β”‚   β”‚   └── premium/              # Premium features page
β”‚   β”œβ”€β”€ app.html                  # Main HTML template
β”‚   └── hooks.{client,server}.ts  # SvelteKit hooks
β”œβ”€β”€ src-tauri/                    # Tauri Rust backend
β”‚   β”œβ”€β”€ src/                      # Rust source code
β”‚   β”œβ”€β”€ capabilities/             # Tauri capabilities configuration
β”‚   └── Cargo.toml                # Rust dependencies
β”œβ”€β”€ static/                       # Static assets (icons, images, etc.)
└── scripts/                      # Build and utility scripts

To view the complete file structure, refer to file-structure.txt.



License

This project is licensed under the GNU AGPL v3. See the LICENSE file for details.


Happy tracking! 😎

Top categories

Loading Svelte Themes