<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mark Thayer</title>
    <description>The latest articles on DEV Community by Mark Thayer (@f0rest8).</description>
    <link>https://dev.to/f0rest8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3180631%2F268029bc-d75c-42e6-9467-b9ecb04995bb.jpeg</url>
      <title>DEV Community: Mark Thayer</title>
      <link>https://dev.to/f0rest8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/f0rest8"/>
    <language>en</language>
    <item>
      <title>The Science Behind Your Habits (And Why Most Trackers Ignore It)</title>
      <dc:creator>Mark Thayer</dc:creator>
      <pubDate>Wed, 06 May 2026 13:10:31 +0000</pubDate>
      <link>https://dev.to/mosspigletcorp/the-science-behind-your-habits-and-why-most-trackers-ignore-it-2mdo</link>
      <guid>https://dev.to/mosspigletcorp/the-science-behind-your-habits-and-why-most-trackers-ignore-it-2mdo</guid>
      <description>&lt;p&gt;Most habit trackers are built on vibes. Streaks. Green checkmarks. A dopamine hit when the number goes up. A guilt trip when it resets to zero.&lt;/p&gt;

&lt;p&gt;It works — for about two weeks. Then you miss a day, the streak breaks, and the app that was supposed to help you change quietly becomes the thing you avoid opening.&lt;/p&gt;

&lt;p&gt;We built Metamorphic differently. Not because we think streaks are bad, but because the behavioral science says there's a lot more going on — and almost none of it shows up in the apps people actually use.&lt;/p&gt;

&lt;p&gt;Here's what the research says. And here's what we did about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Missed days don't destroy habits
&lt;/h2&gt;

&lt;p&gt;This is the big one. The popular belief is that habits are fragile — miss a day and you're back to square one. The research says otherwise.&lt;/p&gt;

&lt;p&gt;Lally et al. (2010) ran a study tracking how habits actually form in real life. The average time to automaticity was 66 days, not the 21-day myth that won't die. More importantly: missing a single day had no measurable effect on habit formation. The curve barely blinked.&lt;/p&gt;

&lt;p&gt;Most habit trackers punish you for missing a day. Your streak resets. Your progress visualization drops. The implicit message is: you failed.&lt;/p&gt;

&lt;p&gt;Metamorphic has streak forgiveness. A single missed day doesn't break your streak. Skip days are first-class — you set them when you create the habit, and they're respected, not penalized. Because the science says flexibility predicts long-term success better than rigidity does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The strongest behavior change technique isn't tracking
&lt;/h2&gt;

&lt;p&gt;If you had to pick one intervention — one single thing that moves the needle on whether someone follows through — it's implementation intentions. "When X happens, I will do Y."&lt;/p&gt;

&lt;p&gt;Gollwitzer (1999) found an effect size of d=0.65. That's large. Larger than goal setting alone. Larger than motivation. Larger than tracking.&lt;/p&gt;

&lt;p&gt;The reason is simple: decisions are expensive. Every time you have to decide &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;where&lt;/em&gt; and &lt;em&gt;how&lt;/em&gt; to do a habit, you're spending willpower. Implementation intentions pre-load the decision. You've already decided. The cue fires, the behavior follows.&lt;/p&gt;

&lt;p&gt;Metamorphic has a first-class "When → Then" field on every goal. Not buried in a settings menu. Not a tooltip. It's right there when you create the goal, with a timed reminder attached. Because the most effective technique in behavior change deserves more than an afterthought.&lt;/p&gt;

&lt;p&gt;We also built contextual cue prompts directly onto habits — an "After I…" field that links your habit to the thing you already do before it. &lt;em&gt;After morning coffee → Meditate. After I sit down at my desk → Review my goals.&lt;/em&gt; Wood &amp;amp; Neal (2007) showed that contextual cues — preceding activities, locations — are stronger triggers than time-based reminders alone. Your life already has a rhythm. We want to hook into it, not override it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Habits and goals are not the same thing
&lt;/h2&gt;

&lt;p&gt;This sounds obvious. Most apps ignore it anyway.&lt;/p&gt;

&lt;p&gt;A habit is something you do repeatedly. A goal is something you're working toward. The connection between them — how daily actions compound into outcomes — is where behavior change actually happens. And it's where most people get stuck.&lt;/p&gt;

&lt;p&gt;Locke &amp;amp; Latham (2002) spent decades studying goal-setting. Their central finding: specific, challenging goals with clear feedback mechanisms outperform vague intentions by a wide margin. But the mechanism matters. You need the bridge between "I want to run a marathon" and "I ran 3 miles today."&lt;/p&gt;

&lt;p&gt;Metamorphic lets you link habits directly to goals. Not as a tag. Not as a folder. As an explicit connection: &lt;em&gt;this habit serves this goal&lt;/em&gt;. You can see how your daily actions feed into your larger aims. That bridge — from action to outcome — is the hardest thing to build into a product because it requires the system to understand that a check-in today is part of a trajectory that spans months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Emotions aren't decoration
&lt;/h2&gt;

&lt;p&gt;Most habit trackers either ignore mood entirely or give you a 3-point smiley face scale. Happy, neutral, sad. Done.&lt;/p&gt;

&lt;p&gt;Barrett et al. (2001) found that emotion differentiation — the ability to make fine-grained distinctions between emotional states — is directly linked to better emotion regulation. People who can distinguish between "frustrated" and "anxious" and "overwhelmed" handle those states more effectively than people who lump them all into "bad."&lt;/p&gt;

&lt;p&gt;Metamorphic has a 9-point mood scale and 46 distinct emotions. Not because complexity is a virtue, but because granularity is a skill. The act of choosing between "restless" and "anxious" is itself a form of self-awareness. The tracker becomes a mirror, not just a ledger.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reflection without action is just venting
&lt;/h2&gt;

&lt;p&gt;Pennebaker (1997) showed that expressive writing — writing about your emotional experiences — has measurable psychological and even physical health benefits. Journaling works. This is well-established.&lt;/p&gt;

&lt;p&gt;What's less discussed is the gap between reflection and behavior change. You can journal every day and never change a thing. The insight stays on the page.&lt;/p&gt;

&lt;p&gt;Kolb's Experiential Learning Cycle describes the loop: experience → reflection → conceptualization → action → experience. Most apps give you the reflection step and stop there.&lt;/p&gt;

&lt;p&gt;Metamorphic has habits, goals, reflections, journal entries, and a daily schedule — and they're connected. A reflection can surface a pattern. A pattern can become a goal. A goal can spawn a habit. A habit gets a cue, a reminder, a link back to the goal it serves. The system is designed to close the loop, not just document it.&lt;/p&gt;

&lt;p&gt;We're building this further. After you write a reflection, we'll gently ask: &lt;em&gt;Want to carry something forward?&lt;/em&gt; You can create a habit, set an intention on a goal, or add something to tomorrow's priorities. Or dismiss it with a tap. The prompt only appears when the reflection suggests deeper processing — certain mood states, longer entries. It's never forced. Because autonomy matters more than engagement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gamification should celebrate, not control
&lt;/h2&gt;

&lt;p&gt;There's a fine line between motivation and manipulation. Variable ratio reinforcement — unpredictable positive feedback — is the most psychologically engaging reward schedule (Schultz, 1997). It's also the mechanism behind slot machines.&lt;/p&gt;

&lt;p&gt;Metamorphic has 18 tiered achievements across 6 categories. We use gamification deliberately. Celebrations are earned, not manufactured. They acknowledge what you've done without creating anxiety about what you haven't.&lt;/p&gt;

&lt;p&gt;The design principle we follow: whispered, not shouted. A subtle glow, not a modal. A brief animation, not a notification. Confetti for genuine milestones, silence for ordinary check-ins. The app should feel like a quiet ally, not a needy coach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy isn't a feature. It's the foundation.
&lt;/h2&gt;

&lt;p&gt;Becoming a parent inspired me to create &lt;a href="https://mosslet.com" rel="noopener noreferrer"&gt;Mosslet&lt;/a&gt;, our privacy-first space online for social and journaling, where people could be safe from the surveillance economy.&lt;/p&gt;

&lt;p&gt;The first version of Mosslet was actually called Metamorphic, but when Facebook rebranded to Meta, I felt we needed to change and my partner came up with Mosslet from our public benefit company's name Moss Piglet. Later, when Meta announced removing E2E encryption from Instagram DMs, I was inspired to implement zero-knowledge messaging in Mosslet. This would become the inspiration for our zero-knowledge, quantum resistant, architecture on Metamorphic today.&lt;/p&gt;

&lt;p&gt;With a privacy-first architecture in hand and the Metamorphic brand on the shelf, I was in need of a new idea. And that was when inspiration found me.&lt;/p&gt;

&lt;p&gt;My partner is passionate about psychology, particularly behavioral science, and self-improvement. Observing her, I was struck with a thought: a habit tracker built around behavioral science could be helpful for people, even people like me who traditionally forgo any kind of habit tracking and forming. And a habit tracker is something that &lt;em&gt;should be private&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And that was how Metamorphic transformed itself into a privacy-first app to help us transform ourselves.&lt;/p&gt;

&lt;p&gt;Every mechanism I've described — mood tracking, emotion differentiation, honest reflection, habit-goal linking, streak forgiveness — depends on one thing: honesty. The data is only useful if it's true. And the data is only true if you feel safe entering it.&lt;/p&gt;

&lt;p&gt;Your habits reveal what you're trying to change about yourself. Your mood logs reveal your emotional patterns. Your reflections reveal your inner life. Your goals reveal your vulnerabilities. This is some of the most intimate data a person can generate.&lt;/p&gt;

&lt;p&gt;Most habit trackers can read all of it. The company, its employees, its partners, its acquirers, and — depending on jurisdiction — law enforcement. Your behavioral data sits on their servers, readable, queryable, sellable.&lt;/p&gt;

&lt;p&gt;Metamorphic uses zero-knowledge encryption. Your data is encrypted on your device before it ever reaches our servers. We can't read it. Not because we promise not to — because we're technically unable to. The architecture doesn't allow it.&lt;/p&gt;

&lt;p&gt;We also use post-quantum encryption — designed to resist not just today's threats but the quantum computing attacks that researchers expect within the next decade. Your habits from 2026 should still be private in 2036.&lt;/p&gt;

&lt;p&gt;This isn't a premium feature. It's not an add-on. It's how the entire system works, free tier included. Because the behavioral science is clear: self-tracking only works when it's honest, and honesty requires safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  We built what the research said to build
&lt;/h2&gt;

&lt;p&gt;We didn't want Metamorphic to be another app where marketing picked the features and science got a footnote. We wanted it to actually work — to do what the literature says matters, not what looks good in a screenshot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Habit strength indicators.&lt;/strong&gt; Lally's research shows habit formation follows a curve — rapid gains early, plateau around 66 days. Every habit shows a strength percentage on your dashboard. Not just "14-day streak" but "78% formed." Realistic expectations based on actual science instead of arbitrary streak counts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contextual reflection prompts.&lt;/strong&gt; Reflection prompts respond to your current state — a different prompt after a streak break than after a milestone, a different tone after a tough mood than after a good one. All of this runs on metadata alone — dates, counts, scores — never on your encrypted content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WOOP-based goal setting.&lt;/strong&gt; Oettingen &amp;amp; Gollwitzer (2010) developed Mental Contrasting with Implementation Intentions — wish, outcome, obstacle, plan. It outperforms positive visualization alone by 2-3x for goal completion. Goals include obstacle identification and confidence calibration, so you're thinking about what might get in the way &lt;em&gt;before&lt;/em&gt; it does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contextual cue prompts.&lt;/strong&gt; Every habit has an "After I…" field that links it to the thing you already do before it. &lt;em&gt;After morning coffee → Meditate.&lt;/em&gt; Your cue shows right on the habit card and in your reminders — anchoring new behaviors to your existing routine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottom line
&lt;/h2&gt;

&lt;p&gt;Behavior change is hard. The research says it's also predictable — not perfectly, but enough to build better tools. Most apps don't bother. They give you a checkbox and a streak counter and call it done.&lt;/p&gt;

&lt;p&gt;We think you deserve more than that. And we think you deserve it without giving up the most personal data you have.&lt;/p&gt;

&lt;p&gt;Metamorphic is free to start. Your data is encrypted before it leaves your device. And the science is built into the product, not bolted onto the marketing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://metamorphic.app/users/register" rel="noopener noreferrer"&gt;Create your free account →&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Barrett, L. F., Gross, J., Christensen, T. C., &amp;amp; Benvenuto, M. (2001). Knowing what you're feeling and knowing what to do about it. &lt;em&gt;Cognition &amp;amp; Emotion&lt;/em&gt;, 15(6), 713–724.&lt;/p&gt;

&lt;p&gt;Fogg, B. J. (2009). A behavior model for persuasive design. &lt;em&gt;Proceedings of the 4th International Conference on Persuasive Technology&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Gollwitzer, P. M. (1999). Implementation intentions: Strong effects of simple plans. &lt;em&gt;American Psychologist&lt;/em&gt;, 54(7), 493–503.&lt;/p&gt;

&lt;p&gt;Lally, P., van Jaarsveld, C. H. M., Potts, H. W. W., &amp;amp; Wardle, J. (2010). How are habits formed: Modelling habit formation in the real world. &lt;em&gt;European Journal of Social Psychology&lt;/em&gt;, 40(6), 998–1009.&lt;/p&gt;

&lt;p&gt;Locke, E. A., &amp;amp; Latham, G. P. (2002). Building a practically useful theory of goal setting and task motivation. &lt;em&gt;American Psychologist&lt;/em&gt;, 57(9), 705–717.&lt;/p&gt;

&lt;p&gt;Oettingen, G., &amp;amp; Gollwitzer, P. M. (2010). Strategies of setting and implementing goals. In &lt;em&gt;Social psychological foundations of clinical psychology&lt;/em&gt; (pp. 114–135).&lt;/p&gt;

&lt;p&gt;Pennebaker, J. W. (1997). Writing about emotional experiences as a therapeutic process. &lt;em&gt;Psychological Science&lt;/em&gt;, 8(3), 162–166.&lt;/p&gt;

&lt;p&gt;Schultz, W. (1997). Dopamine neurons and their role in reward mechanisms. &lt;em&gt;Current Opinion in Neurobiology&lt;/em&gt;, 7(2), 191–197.&lt;/p&gt;

&lt;p&gt;Wood, W., &amp;amp; Neal, D. T. (2007). A new look at habits and the habit-goal interface. &lt;em&gt;Psychological Review&lt;/em&gt;, 114(4), 843–863.&lt;/p&gt;

</description>
      <category>behavioralscience</category>
      <category>habits</category>
      <category>privacy</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Your Habit Tracker Knows More About You Than Your Therapist. Mine Can’t Read Any of It.</title>
      <dc:creator>Mark Thayer</dc:creator>
      <pubDate>Fri, 17 Apr 2026 16:10:58 +0000</pubDate>
      <link>https://dev.to/mosspigletcorp/your-habit-tracker-knows-more-about-you-than-your-therapist-mine-cant-read-any-of-it-3if0</link>
      <guid>https://dev.to/mosspigletcorp/your-habit-tracker-knows-more-about-you-than-your-therapist-mine-cant-read-any-of-it-3if0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa9ciudh1hsm8f0tsqu0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa9ciudh1hsm8f0tsqu0.png" alt="Screenshot of the landing page for Metamorphic, with its blue egg logo of geometric striations of color." width="800" height="629"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built a habit tracker where the server has no idea what you’re tracking.&lt;/p&gt;

&lt;p&gt;Every habit app I looked at stores your data in plaintext on their servers. Your daily check-ins, your goals, your mood journal, your streaks — sitting in a database, readable by anyone with access. That felt wrong to me.&lt;/p&gt;

&lt;p&gt;So I built Metamorphic: a habit and self-improvement tracker where all your data is encrypted in your browser before it ever reaches the server. The server only stores opaque blobs of ciphertext. Not even your email address is stored in plaintext.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why encrypt a habit tracker?
&lt;/h3&gt;

&lt;p&gt;Think about what a habit tracker actually contains. It’s not just “drink more water” and a checkbox. Over time, it becomes a detailed map of what you’re trying to change about yourself — your struggles, your patterns, the things you fail at repeatedly. That’s more intimate than most of what you’d share on social media.&lt;/p&gt;

&lt;p&gt;The idea came from watching my partner, who has a background in psychology and behavior science. She’s always thinking about how to break old habits and build better ones. It clicked: if your habits, goals, and self-reflections are this personal, they should be private to only you. And you shouldn’t have to worry about whether they are.&lt;/p&gt;

&lt;h3&gt;
  
  
  The backstory
&lt;/h3&gt;

&lt;p&gt;I run &lt;a href="https://mosspiglet.dev" rel="noopener noreferrer"&gt;Moss Piglet&lt;/a&gt;, a bootstrapped public benefit company. Our other product, &lt;a href="https://mosslet.com" rel="noopener noreferrer"&gt;MOSSLET&lt;/a&gt;, is a privacy-first social platform built with Elixir. When I was becoming a new dad, I’d just finished reading &lt;em&gt;The Age of Surveillance Capitalism&lt;/em&gt; by Shoshana Zuboff — and I wanted a better digital world for my daughter. When Meta rolled back end-to-end encryption on its messaging, I was pushed to implement real E2EE in MOSSLET.&lt;/p&gt;

&lt;p&gt;Metamorphic takes that work further. Instead of encrypting just messages, the entire application is zero-knowledge. The server can’t read your habits, your goals, your reflections, your schedule, your group data — none of it. If our database were fully breached tomorrow, an attacker would get nothing useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Metamorphic actually does
&lt;/h3&gt;

&lt;p&gt;It’s a complete self-improvement platform, not just a checkbox app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Habit tracking&lt;/strong&gt;  — Daily and weekly check-ins, streaks, drag-and-drop reordering, categories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-reflections&lt;/strong&gt;  — A journal with mood tracking and daily prompts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Goal setting&lt;/strong&gt;  — Milestones, progress bars, and the ability to link goals to habits so check-ins automatically advance your progress&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule and calendar&lt;/strong&gt;  — Recurring events, a day planner, and printable views for people who like paper&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Family and group accountability&lt;/strong&gt;  — Shared habits, shared goals, a group dashboard, and member spotlights&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progress insights&lt;/strong&gt;  — Activity heatmaps and completion stats&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data export&lt;/strong&gt;  — JSON and CSV, decrypted entirely in your browser. The server never sees the plaintext, even during export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I feel strongly about: &lt;strong&gt;encryption is not a premium feature.&lt;/strong&gt; Every tier — including the free one — gets full end-to-end encryption. Paid tiers unlock convenience features like unlimited habits, reminders, data export, and groups. But privacy is not something you should have to pay extra for.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/fGA40p1Fqew"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  How the privacy works (without the jargon)
&lt;/h3&gt;

&lt;p&gt;When you create a habit, type a journal entry, or set a goal, your browser encrypts that data before sending it to the server. The server stores it, but has no way to read it. When you load the page later, the server sends the encrypted blobs back, and your browser decrypts them using keys that only exist on your device.&lt;/p&gt;

&lt;p&gt;Your password is never stored or transmitted in a usable form. Instead, it’s used to derive a cryptographic key locally, and that derived key unlocks everything else. If you lose your password and haven’t set up a recovery key, your data is gone — by design. That’s the real trade-off of zero-knowledge, and it’s the correct one.&lt;/p&gt;

&lt;p&gt;For the more technically inclined:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client-side encryption&lt;/strong&gt; uses libsodium (XSalsa20-Poly1305)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key distribution&lt;/strong&gt; uses a hybrid post-quantum scheme: ML-KEM-768 combined with X25519 — the same approach Signal and Apple iMessage have adopted to protect against future quantum computers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three independent encryption layers at rest&lt;/strong&gt; : client-side E2E, AES-256-GCM in Postgres, and LUKS disk encryption on the hosting infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-knowledge email&lt;/strong&gt; : no plaintext email column in the database. Only a one-way hash for lookups and an encrypted blob&lt;/li&gt;
&lt;li&gt;A detailed architecture writeup is at &lt;a href="https://metamorphic.app/encryption" rel="noopener noreferrer"&gt;metamorphic.app/encryption&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The interesting tension
&lt;/h3&gt;

&lt;p&gt;Metamorphic is built with Phoenix LiveView, a framework where the server renders the page. But in a zero-knowledge system, the server can’t render the &lt;em&gt;content&lt;/em&gt; — it doesn’t know what it says. The result is a choreography: the server sends the page structure with placeholder skeletons, and JavaScript hooks decrypt and fill in the real content on arrival.&lt;/p&gt;

&lt;p&gt;It works. The skeletons flash in briefly, then the real data appears. UX-wise, it’s not dramatically different from any app with a loading state. Architecturally, it’s a very different beast — 15+ JavaScript hooks managing the encrypt/decrypt lifecycle across habits, goals, reflections, events, groups, and export.&lt;/p&gt;

&lt;h3&gt;
  
  
  The real trade-offs
&lt;/h3&gt;

&lt;p&gt;I won’t pretend zero-knowledge doesn’t have costs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No server-side search.&lt;/strong&gt; If you want to filter habits by name or search your reflections, that happens client-side after decryption. Fine at our current scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you lose your password and your recovery key, your data is unrecoverable.&lt;/strong&gt; This is a real UX concern. The recovery key flow mitigates it, but the fundamental constraint is by design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing is harder.&lt;/strong&gt; You can’t assert on decrypted content in server-side tests because decryption only happens in JavaScript. Tests verify DOM structure and that encrypted fields are stored correctly — the decrypt-and-display pipeline is the gap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are trade-offs I’m willing to make. Your habit data being unreadable to everyone except you — including me — is worth it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;p&gt;I’m not very good at habit tracking myself, which is partly why I built this. I’ve been using Metamorphic to get back into yoga, meditation, and running. So far, so good.&lt;/p&gt;

&lt;p&gt;Check it out at &lt;a href="https://metamorphic.app/" rel="noopener noreferrer"&gt;metamorphic.app&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>security</category>
      <category>elixir</category>
      <category>privacy</category>
    </item>
    <item>
      <title>I Built a Zero-Knowledge Encrypted Habit Tracker with Elixir &amp; Phoenix LiveView</title>
      <dc:creator>Mark Thayer</dc:creator>
      <pubDate>Thu, 16 Apr 2026 23:16:47 +0000</pubDate>
      <link>https://dev.to/mosspigletcorp/i-built-a-zero-knowledge-encrypted-habit-tracker-with-elixir-phoenix-liveview-3jc9</link>
      <guid>https://dev.to/mosspigletcorp/i-built-a-zero-knowledge-encrypted-habit-tracker-with-elixir-phoenix-liveview-3jc9</guid>
      <description>&lt;p&gt;I'm the solo dev at &lt;a href="https://mosspiglet.dev" rel="noopener noreferrer"&gt;Moss Piglet&lt;/a&gt;, a bootstrapped public benefit company. I've been building &lt;a href="https://metamorphic.app" rel="noopener noreferrer"&gt;Metamorphic&lt;/a&gt; — a habit and self-improvement tracker where all personal data is encrypted client-side before it ever reaches the server. The server only stores opaque cipher-text blobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why encrypt a habit tracker?
&lt;/h2&gt;

&lt;p&gt;I was inspired by my partner's background in psych and behavior science. It clicked that something as personal as your habits, goals, and self-reflections — basically a map of what you're trying to change about yourself — should be private to only you, and you shouldn't have to worry about it being otherwise.&lt;br&gt;
Every other habit tracker I looked at stores your data in plaintext. Metamorphic doesn’t.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it does
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Habit tracking&lt;/strong&gt; — daily/weekly check-ins, streaks, drag-and-drop reordering&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Self-reflections&lt;/strong&gt; — mood tracking and daily prompts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Goal setting&lt;/strong&gt; — milestones, progress bars, habit linking&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Schedule/calendar&lt;/strong&gt; — recurring events, day planner, printable views&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Family/group accountability&lt;/strong&gt; — shared habits, shared goals, group dashboard&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Progress insights&lt;/strong&gt; — activity heatmaps, completion stats&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data export (JSON/CSV)&lt;/strong&gt; — decrypted entirely client-side, server never sees plaintext&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encryption is not a premium feature.&lt;/strong&gt; Every tier gets full E2E encryption. Paid tiers gate convenience (unlimited habits, reminders, export, groups), not privacy.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the crypto works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Client-side encryption via &lt;code&gt;libsodium-wrappers-sumo&lt;/code&gt; — XSalsa20-Poly1305 for data, NaCl box/seal for key distribution&lt;/li&gt;
&lt;li&gt;Hybrid post-quantum key encapsulation (ML-KEM-768 + X25519 via &lt;code&gt;@noble/post-quantum&lt;/code&gt;) — the same approach as Signal and Apple iMessage&lt;/li&gt;
&lt;li&gt;Three independent encryption layers at rest: client-side E2E, Cloak AES-256-GCM in Postgres, and LUKS disk encryption on &lt;a href="https://fly.io" rel="noopener noreferrer"&gt;Fly.io&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Zero-knowledge email: no plaintext email column in the database — only an HMAC blind index for lookups and an E2E-encrypted blob&lt;/li&gt;
&lt;li&gt;Password never touches sessionStorage — only the Argon2id-derived session key&lt;/li&gt;
&lt;li&gt;Persistent key cache using Web Crypto API (non-extractable AES-256-GCM wrapping key in IndexedDB) so browser restarts don't require re-entering your password&lt;/li&gt;
&lt;li&gt;Recovery key flow for password reset without server access to private keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More detail on the architecture: &lt;a href="https://metamorphic.app/encryption" rel="noopener noreferrer"&gt;metamorphic.app/encryption&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The interesting tradeoff: LiveView + zero-knowledge
&lt;/h3&gt;

&lt;p&gt;This is the part I think other Elixir/Phoenix devs will find most relevant.&lt;/p&gt;

&lt;p&gt;LiveView is server-rendered by design. Zero-knowledge encryption means the server can't see the content it's rendering. These are fundamentally in tension.&lt;/p&gt;

&lt;p&gt;The result: brief placeholder skeletons that JS hooks fill in after client-side decryption, and a lot of &lt;code&gt;push_event/handleEvent&lt;/code&gt; choreography (15+ hooks). It's not too different UX-wise from a trust-the-server model — the skeletons flash in briefly — but architecturally it's a very different beast.&lt;/p&gt;

&lt;p&gt;Other tradeoffs:&lt;/p&gt;

&lt;p&gt;No server-side search on encrypted fields. Filtering by habit name or reflection text happens client-side after decryption. Fine at current scale.&lt;/p&gt;

&lt;p&gt;Testing is harder. You can't assert on decrypted content in LiveView tests since decryption is JS-only. Tests focus on DOM structure and data attributes. Context-level tests verify encrypted fields are stored and retrieved correctly — the decrypt-and-display pipeline is the gap.&lt;/p&gt;

&lt;p&gt;If you lose your password and haven't set up a recovery key, your data is gone. By design. Real UX tradeoff, but correct for zero-knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Elixir/Phoenix LiveView&lt;/strong&gt; — full-stack web app&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecto + Postgres&lt;/strong&gt; (&lt;a href="https://fly.io" rel="noopener noreferrer"&gt;Fly.io&lt;/a&gt; Managed Postgres)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;libsodium-wrappers-sumo + &lt;a href="https://github.com/paulmillr/noble-post-quantum" rel="noopener noreferrer"&gt;@noble/post-quantum&lt;/a&gt;&lt;/strong&gt; — client-side crypto&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloak/cloak_ecto&lt;/strong&gt; — application-level at-rest encryption&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oban&lt;/strong&gt; — background jobs (reminders)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS v4 + daisyUI&lt;/strong&gt; — UI/theming&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sortable.js&lt;/strong&gt; — drag-and-drop&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSZip&lt;/strong&gt; — export packaging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tidewave&lt;/strong&gt; — AI-assisted development (runtime introspection, live SQL/eval, a11y diagnostics)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A lot was shared from my work on &lt;a href="https://mosslet.com" rel="noopener noreferrer"&gt;MOSSLET&lt;/a&gt;, a privacy-first social platform with private journal and Bluesky interop, also built with Elixir.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;p&gt;I'm not very good at habit tracking myself, so I've been using Metamorphic to get back into yoga, meditation, and running. So far so good.&lt;/p&gt;

&lt;p&gt;Check it out at &lt;a href="https://metamorphic.app" rel="noopener noreferrer"&gt;metamorphic.app&lt;/a&gt;. Happy to answer questions about the architecture, the zero-knowledge approach, bootstrapping a public benefit company, or anything Elixir-related.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>showdev</category>
      <category>security</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
