3
7 Comments

How I rebuilt a Flutter app with Codex AI in 17 days

Hello IH!

I'm the solo dev behind MoodTrend, a mood tracker for overworkers prone to burnout. The app is currently used by 340 MAU and generating $9/mo in ad revenue.

But my legacy codebase was trapping me.

The core mission is helping people stay functional, but my old code—with 0% test coverage and scattered logic—made adding new features a terrifying risk. I needed to break free to truly iterate.

Here's the wild part: I rebuilt my entire codebase from scratch in just 17 days using Codex AI—and only AI wrote the code. But it wasn't a hands-off process.

Why I went all-in on an AI rebuild:

I'm someone who can't stop. When there's a task and I have even a sliver of energy, I feel compelled to push until it's done. That pressure? It's sent me to burnout collapse twice. So I built MoodTrend to catch the warning signs before I hit rock bottom. That's the core mission—help people like me stay functional.

But my codebase was holding me back from iterating. Old riverpod patterns, outdated Flutter versions, massive linting violations, no test coverage, and logic scattered everywhere. Every time I tried to add features, I risked breaking something I couldn't see coming.

Codex Experiment: Rebuilding an AI in 17 Days

I've been running a side experiment testing different AI code editors every few months. Antigravity actually launched just 3 days into my rebuild, but things were going so smoothly with Codex that I saw no reason to switch.

Here's what I did:

  • Constant supervision: I didn't just let Codex loose. From 11/15 to 12/1, taking weekends off, I invested 100 hours of active monitoring and iteration. Every commit mattered.

  • AGENTS.md for quality control: I documented linting rules and architectural patterns in an AGENTS.md file so Codex could self-correct. PR reviews? I let Codex handle those too.

  • Dependency graph obsession: Using DeepWiki, I mapped out the whole dependency tree. This wasn't just cleanup—it let me finally write meaningful test code. Now I know what breaks when something changes.

Shocking Before/After:

Before the rebuild, it was in a terrible state:

  • Linting warnings: Uncountable

  • Test coverage: 0%

  • Flutter version: Stuck on outdated

  • Code responsibility: Scattered (multiple domain models and logic crammed into single files)

  • Testability: Impossible

After more than 100 hours of continuous monitoring and iteration, here's the result:

  • Linting warnings: Zero (even with stricter DCM linting rules enabled)

  • Test coverage: 67%

  • Flutter version: Now on stable

  • Architecture: Clean separation of concerns

  • Testability: Built-in from the start

The real moment:

I just shipped a subscription feature last night. Zero paid users yet (fresh release), and the $9/mo is purely from interstitial ads. But here's what matters: I can now iterate without fear. I can add features. I can maintain this long-term.

For the community:

AI rebuild enthusiasts—what tools are you using? What surprised you? MoodTrend users—what mood patterns do you see? What habits actually help?

App link here. Feedback appreciated!

posted to Icon for MoodTrend
MoodTrend
  1. 1

    YOU CAN RECOVER YOUR STOLEN FUNDS WITH THE HELP OF // THE HACK ANGELS RECOVERY EXPERT

    The most reputable and trustworthy recovery experts available today. THE HACK ANGELS RECOVERY EXPERT. They can help you retrieve your stolen crypto funds. They have technical expertise resources to track down and recover lost crypto. I had lost £973,000 to fraud and at first I thought it was gone for good. I went online to search for recovery, I saw numerous testimonies regarding THE HACK ANGELS RECOVERY EXPERT and how they had assisted other people in getting their money back. I didn't hesitate to contact them, in just a few days the experts returned all my money. They said that they did an investigation and returned my money immediately. They can never ask you for any upfront payment. They can help you track your funds. They are cyber security experts doing great jobs out there. Be wise and do your research to avoid being scammed again. For anyone in a similar situation seeking to recover funds lost to online scams, contact THE HACK ANGELS RECOVERY EXPERT through

    WhatsApp +1520200-2320

  2. 1

    Really impressive work, Midori. As someone who spends a lot of time helping founders share their journey on Reddit, I can tell you posts like this stand out because they actually show the process not just the outcome. The AGENTS.md approach, the dependency mapping, and the constant supervision you did with Codex make the rebuild feel intentional instead of “I let AI write my app.”

    The part that hits hardest is how your new codebase finally gives you room to breathe. A lot of indie devs are stuck in that same loop—wanting to ship, but feeling trapped by legacy decisions they made months or years ago. Your breakdown shows a path forward that’s actually practical.

    If you keep sharing updates like this, especially the test coverage improvements and how you iterate now, you’ll build a strong following both here and across tech communities. Posts that combine transparency + technical detail tend to perform really well.

    Curious what you think the next “unlock” will be now that you’ve rebuilt the foundation.

    1. 1

      Wow, thank you so much for this incredibly thoughtful and detailed feedback! Coming from someone with your experience helping founders on Reddit, that really means a lot.

      I'm glad the AGENTS and supervision process resonated with you. My goal was exactly that: making it an intentional rebuild for long-term maintainability, not just a disposable AI experiment.

      It’s truly encouraging to know that this breakdown provides a practical path for others.

      Regarding your question on the next "unlock":

      That’s a perfect question, and it immediately leads to the next major challenge: Monetization and Backend Consolidation.

      My current biggest pain point is a messy Firebase migration I just finished. I made a huge mistake that forced me to write code that connects to three separate Firebase projects (A, B, and C) to manage anonymous and Google auth users, leading to significant technical debt. (I am currently seeking help on this exact issue on Reddit.)

      The Next Roadmap

      For the next two months, I will focus on delivering value with this new codebase:

      1. Immediate Focus (Feature Development): Implementing new features (home widgets, data download, Watch integration) to improve usability and creating new Premium Subscription tiers.

      2. One Year Out (Debt Resolution): My goal is to consolidate the Firebase debt into a single project (C). Unfortunately, this will involve phasing out support for legacy users who haven't touched the app in over a year. This is a significant operational challenge I need to manage carefully.

      Thank you again for the kind words and the insightful question. I will absolutely keep sharing updates on the subscription rollout and the ongoing technical challenges!

      1. 1

        Really appreciate the thoughtful reply and honestly, the level of clarity you have around your next steps is something most founders struggle with. The Firebase situation sounds intense, but the fact that you already have a one-year consolidation plan puts you way ahead of the curve. Most people just let that kind of debt rot in the background.

        From what I’ve seen managing Reddit growth for founders, the way you document your process is already setting you up for long-term visibility here. Posts that show both the technical hurdles and the reasoning behind them tend to build trust fast. If you keep sharing updates like this, you’re going to attract the right kind of early supporters.

        And if you ever want a second pair of eyes on how to package your progress for Reddit or other founder communities, feel free to reach out to me anytime at my Google email [[email protected]] happy to help however I can.

        1. 1

          Thank you so much for this wonderful proposal. I am truly grateful.

          Feedback from someone with extensive experience in Reddit's growth sector gives me confidence that we are focusing on what matters most for the community.

          I would very much like to take you up on your kind offer.

          I will reach out to your Email.

          Thank you again for taking the time to offer thoughtful advice and for your willingness to support fellow entrepreneurs.

          1. 1

            Thank you for your kind message I really appreciate it. I’m glad the proposal was helpful and that it gave you confidence moving forward.

            I’ve just replied to your email as well, so feel free to check your inbox when you have a moment.

            Looking forward to supporting your project and helping you get the best possible results on Reddit.

            Let’s build something great together!

  3. 1

    Thank you all for reading! The focus of this article is a 17-day AI-driven rebuild.

    While the Codex AI handled the majority of the writing, the human effort was the most challenging. We spent over 100 hours monitoring the code and manually committing the changes.

    So, I have a question for you all.

    To those who have experience leveraging AI for large-scale refactoring or rebuilding: what was the most time-consuming, labor-intensive, or frustrating part of the process that AI couldn't solve? I'm curious to know if my experience is unique!