Habit Coach App Blueprint

A complete architecture for an AI-powered habit coaching app — daily check-ins, personalized AI coaching prompts, streak tracking, weekly reviews, and a Postgres-backed progress database. 9 nodes, ready to export to Cursor or Claude Code.

Mobile app Health & wellness 9 nodes

What this app does

A habit coaching app helps users build and maintain daily habits through a simple check-in flow, AI-generated coaching messages, and visual progress tracking. Users log whether they completed their habit each day. The AI analyzes their streak data and check-in patterns to deliver personalized encouragement, identify when motivation is dipping, and suggest adjustments.

This blueprint maps out 9 nodes across frontend pages, backend APIs, AI prompts, a database, and a scheduler. It's designed as a mobile-first PWA that works offline and syncs when connected.

Architecture diagram

Daily Check-in (Page) Progress Dashboard (Page) Settings (Page)
Habits API Streaks API
AI Coach Prompt Weekly Review (AI)
Progress DB (PostgreSQL) Reminder Scheduler

Node breakdown

Frontend pages

Backend APIs

AI prompts

Database & services

How it works end-to-end

  1. User creates a habit in Settings (e.g. "Read 20 pages daily") and sets a reminder time
  2. Each day at the reminder time, the Reminder Scheduler fires
  3. The AI Coach Prompt generates a personalized message based on the user's streak and recent check-ins
  4. User receives a push notification with the coaching message
  5. User opens the Daily Check-in page and taps to mark the habit complete
  6. The Habits API records the check-in in the Progress DB
  7. The Streaks API recalculates the current streak and updates it
  8. The Progress Dashboard updates in real time with the new streak count and calendar heatmap
  9. On the user's configured review day, the Weekly Review AI prompt generates a summary of the week's progress with insights and a focus suggestion for next week

The AI Coach Prompt is the heart of this app. It's not a generic "good job" message — it takes the user's actual streak data, recent patterns, and tone preference to generate something that feels personal. A user on a 30-day streak gets a different message than one who missed the last two days.

Cursor export prompt

Open this blueprint in Bluemoonkey and export it, or copy the prompt below directly into Cursor's Agent mode:

Ready to paste
Build this app exactly as described.
Start with database schema and auth, then APIs, then frontend pages.

## Daily Check-in (Frontend Page)
Simple, fast screen for logging daily habits. One tap to mark complete,
optional notes field. Shows current streak count and today's AI
coaching message. Mobile-first PWA design.

## Progress Dashboard (Frontend Page)
Visual overview: calendar heatmap, streak statistics, longest streak,
completion rate, and weekly AI review summaries. Charts for 7/30/90 days.

## Settings (Frontend Page)
Manage habit list (add/edit/remove), set reminder times, configure
coaching tone (encouraging, direct, humorous), set weekly review day.

## Habits API (REST Endpoint)
- GET /api/habits — list user's habits
- POST /api/habits — create new habit
- POST /api/habits/:id/checkin — log daily check-in
- GET /api/habits/:id/history — paginated check-in history

## Streaks API (REST Endpoint)
- GET /api/streaks — current streaks for all habits
- GET /api/streaks/:habitId — detailed streak data
- POST /api/streaks/recalculate — recompute from check-in history

## Progress DB (PostgreSQL)
- habits: id, user_id, name, frequency, color, created_at
- check_ins: id, habit_id, date, completed, note, created_at
- streaks: id, habit_id, current_count, longest_count, last_completed_date, updated_at
- users: id, email, name, coaching_tone, reminder_time, review_day, created_at
- weekly_reviews: id, user_id, week_start, summary_text, suggestion, created_at

## AI Coach Prompt (AI Prompt)
Input: habit name, current streak, last 7 days of check-ins, tone preference
Task: generate a personalized coaching message for today
Output: 1-2 sentence encouraging message tailored to streak status

## Weekly Review (AI Prompt)
Input: 7 days of check-in data, streak changes, completion rates, user notes
Task: generate weekly summary with insights and one actionable suggestion
Output: 3-4 paragraph review with what went well, what slipped, and focus area

## Reminder Scheduler (Cron Job)
Daily job at user's configured reminder time. Triggers AI Coach Prompt
to generate the day's message, then sends push notification. Also triggers
Weekly Review on the user's configured review day.

For more prompt templates and tips, see our Cursor app prompt template guide. New to app architecture? Start with our guide on how to plan an app before coding.

Fork this blueprint

Open the free canvas, import this architecture, and customize it for your habit coaching app.

Open Canvas — Free →
← AI Support Triage Contract Review Assistant → All community blueprints →

FAQ

What is a habit coaching app?

A habit coaching app helps users build and maintain habits through daily check-ins, AI-generated coaching messages, streak tracking, and weekly progress reviews. The AI provides personalized encouragement and adjusts its coaching based on the user's streak data and check-in patterns.

Can I export this blueprint to Cursor?

Yes. Open this blueprint in Bluemoonkey's free canvas and export it as a structured AI prompt formatted for Cursor's Agent mode. Paste it into Cursor, add "Build this app exactly as described," and it generates the full project.

How many nodes does this blueprint have?

This blueprint has 9 nodes: 3 frontend pages, 2 APIs, 2 AI prompts, 1 database, and 1 scheduler. Every node is editable in the free canvas.

Does the app work offline?

The blueprint is designed as a mobile-first PWA. Check-ins should be cached locally and synced to the Progress DB when the device reconnects. The AI prompts run server-side when the scheduler triggers or when the user opens the app while connected.