← All templates

Habit Tracker

Productivity · React + Node (Express) · 17 @molecule/* packages

Habitica-like habit tracking with streaks, statistics, reminders, and achievements — with built-in Stripe-backed subscription tiers

Open in Molecule

What is inside

  • auth
  • notifications
  • streaks
  • statistics
  • reminders
  • subscriptions

Screens (15)

  • Landing /
  • Login /login
  • Signup /signup
  • ForgotPassword /forgot-password
  • ResetPassword /reset-password
  • Dashboard /dashboard (signed in)
  • Habits /habits (signed in)
  • HabitDetail /habits/:id (signed in)
  • Achievements /achievements (signed in)
  • Stats /stats (signed in)
  • Settings /settings (signed in)
  • Calendar /calendar (signed in)
  • Profile /profile (signed in)
  • Notifications /notifications (signed in)
  • NewHabit /habits/new (signed in)

Data model (10 tables)

  • habits — id, user_id, name, emoji, description, category, cadence, days_of_week, …
  • habit_entries — id, habit_id, user_id, date, completed_at, count, was_freeze, note, …
  • habit_freezes — id, user_id, habit_id, granted_at, used_for_date, created_at
  • achievements — id, code, name, description, icon, threshold_days, tier, created_at
  • user_achievements — id, user_id, achievement_id, unlocked_at, progress_days, created_at
  • reminders — id, user_id, habit_id, time_of_day, days_of_week, channel, active, created_at, …
  • notifications — id, user_id, type, title, body, href, read, created_at
  • devices — id, createdAt, updatedAt, userId, name, pushPlatform, pushSubscription, hasPushSubscription
  • tags — id, name, slug, color, description, createdAt, updatedAt
  • resource_tags — id, tagId, resourceType, resourceId, createdAt

API (10 handlers)

  • \_streaks api/src/handlers/_streaks.ts
  • achievements api/src/handlers/achievements.ts
  • entries api/src/handlers/entries.ts
  • freezes api/src/handlers/freezes.ts
  • habits api/src/handlers/habits.ts
  • notifications api/src/handlers/notifications.ts
  • profile api/src/handlers/profile.ts
  • reminders api/src/handlers/reminders.ts
  • reports api/src/handlers/reports.ts
  • stats api/src/handlers/stats.ts

Subscription tiers

free / pro / team — gated by: maxEntries, maxHabits, maxStats, advancedFeatures, canExport, retentionDays

Built from 17 @molecule/* packages

Browse all @molecule/* packages →

Required secrets

  • DATABASE_URL PostgreSQL connection string
  • VAPID_PUBLIC_KEY VAPID public key for push notifications
  • VAPID_PRIVATE_KEY VAPID private key for push notifications

The @molecule/* packages are Apache-2.0. The app you build from this template is yours to export and self-host. Licensing