An intentional journaling app for Android using a tiered AI analysis system — daily insights with Gemini Flash, monthly and yearly synthesis with Gemini Pro. Uses a summarization chaining strategy that reduces token usage by ~98% vs naive approaches.
Number Your Days is a journaling app for Android, published on the Google Play Store, and accompanied by a web companion at number-your-days.web.app. It is designed around intentional, reflective journaling — not a diary, but a structured tool for self-awareness. What differentiates it from generic journaling apps is an AI layer that analyzes entries over time and surfaces patterns, habits, emotional trends, and personalized recommendations — turning private writing into actionable self-insight.
Generic journaling apps (Google Keep, Apple Notes, Day One) treat entries as isolated text. There is no synthesis, no pattern recognition, no feedback loop. A user can journal every day for a year and have no structured insight into what their writing reveals about their life. Number Your Days turns the accumulated writing into a personal intelligence layer.
Firestore security rules ensure users can only read and write their own data — no entry from one user is ever accessible to another, even by accident.
This is the most technically interesting part of the app. The challenge: AI analysis of journal entries is expensive if done naively (sending all entries every time). The solution is a layered summarization approach that mirrors how humans think about time.
Daily Analysis (Gemini 2.5 Flash Preview — fast and cheap):
daily_summary is a compressed 2-3 sentence synthesis of the day — this is stored separatelyWeekly Analysis (Gemini 2.5 Flash Preview):
Monthly Analysis (Gemini 3 Pro — more capable for longer synthesis):
Yearly Analysis (Gemini 3 Pro):
Why this architecture matters: Without summarization chaining, a monthly analysis would need to process 30 days × multiple entries = potentially 50,000+ tokens. With chaining, the monthly analysis processes 4 weekly summaries = roughly 800 tokens. Cost reduction: ~98%. Quality is maintained because each summary captures the essence of that period.
Cloud Functions on Firebase have cold start latency. The midnight analysis jobs occasionally have a 3-5 second cold start. For background jobs this is acceptable; for user-facing features it would not be. This shaped my preference for dedicated backend services (FastAPI) for latency-sensitive AI features.