Your daily habits, on the phone and nowhere else.
No account, no server and no connection: everything lives in a SQLite on the phone. It is React on Lynx, packaged as a native Android app with Sparkling, TikTok’s shell.
74 MB · Android 7.0 or later · arm64 and armv7 · signed · MIT license
Tuesday, November 10
Ana, you have 2 of 555 %
- Drink water2 / 2 liters
- Exercise0 / 30 minutes
- Read20 / 20 pages
- Meditate7.71 / 10 minutes
- Sleep early0 / 1 time
Press and hold a habit to record a part.




The five sample habits the app starts with. It works as on the phone: a tap marks, a long press records a part and the bar below switches screens.
The same product, rewritten four times
Rebuilt on purpose with four different architectures to learn each stack in depth, on a domain I already knew.
- Kivy / FletReplaced
- NiceGUI + SurrealDBReplaced
- FastAPI + SvelteKit 5Replaced
- React on Lynx, with SparklingIn service
What it does
A tap marks or unmarks a habit. A long press on the row opens the partial entry —did you read 15 of 20 pages?— and the habit's ring fills in proportion. Habits are edited and deleted by swiping the row, and completing the day sets off an achievement animation.
The calendar paints each day in its traffic-light color and filters by habit. The analysis covers 7, 14 or 30 days, a month or a year, compares against the previous period and draws eight zoomable SVG charts. Reminders arrive at one or several times of day, picked with a custom selector, and backups go to Downloads as JSON.



Screenshots with sample data, not real: the profile “Ana”, with the five habits the app seeds and a history generated with scripts/datos-demo.py. The app's interface is in Spanish.
How it is built
All the business logic lives in src/api/ against SQLite, one file per area —profile, habits, entries, calendar, analysis, categories, seed— with marco.ts as the barrel. The bridge src/db/native.ts only serializes and deserializes: it holds no logic.
On the Android side, MarcoDbHelper.kt defines the schema and NativeDatabaseModule.kt runs the queries. The daily reminder is four classes on top of AlarmManager —NativeReminderModule, ReminderScheduler, ReminderAlarmReceiver and BootReceiver— because surviving a phone restart is not free. LynxInputComponent.kt is a custom <input>.
Creating the profile brings five sample habits with their categories, so no screen starts empty.
Counted from the repository
- lines of TypeScript
- 6,146
- lines of Kotlin
- 950
- custom SVG charts
- 8
- servers involved
- 0
What it is made with
- React on Lynx · PrimJS
- Sparkling (TikTok)
- TypeScript
- Kotlin
- SQLite
- AlarmManager
- vitest
What it cost on the device
Lynx is a young runtime and its JavaScript engine, PrimJS, is not the browser. These seven cannot be worked out by reading the code: each came from a real failure and was documented in its file.
Writing the native module is not enough
It has to be registered in
SparklingApplication.ktthroughSparklingLynxConfig.Builder.addLynxModules(...). Without that,NativeModules.<Name>simply does not exist on the JS side.<svg>is not part of the Lynx coreIt is a separate X-Element,
org.lynxsdk.lynx:xelement-svg, forced to version 3.7.0 inbuild.gradle.ktsand registered by hand. The eight charts depend on it.No code splitting
A lazy import compiles into a separate Lynx bundle that does not inherit the global CSS: invisible text and screens that would not swap. The router goes without lazy on purpose.
The main thread cannot see data structures
Inside a
'main thread'handler only numbers arrive. Walking a table declared at the top of the file blows up silently, with no exception and no log.touchstartarrives late andtouchendsometimes never arrivesInside a
scroll-viewthe event is delivered once the gesture can no longer be a scroll; and if a modal mounts on top, the row that opened it never gets the end of the gesture. Hence the custom swipe component.<input>ignores CSScolorThe text color goes through the
text-colorprop, not the stylesheet. Centralized insrc/lib/colors.tsso it does not trip me again.No
IntlPrimJS does not guarantee internationalization support, so date formatting is manual in
src/lib/date.ts. NotoLocaleDateString.
What is missing
- iOS is not configured: it is a decision, Android only for now.Pending
- It has been tested on a single phone model, a Galaxy S23 Ultra.Pending
- The package identifier is still the scaffold's,
com.example.sparkling.go.Pending - Backups are exported as plain JSON, unencrypted.Pending
Install it on your Android
74 MB · Android 7.0 or later · arm64 and armv7 · signed · MIT license
New in 1.16
- A night style across the whole app, made for reviewing the day in low light.
- A renewed Analysis: the period against the previous one, the daily line and the ranking per habit.
- Reminders at several times of day, picked with a custom selector.
- Settings reorganized as a grouped list.
It installs outside the store: Android will ask permission to install apps from this source.
Other versions
- 1.16latestAndroid
- All on GitHub
Let’s talk
Curious how something here is solved, or have a similar problem?