<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anton Malofeev on Medium]]></title>
        <description><![CDATA[Stories by Anton Malofeev on Medium]]></description>
        <link>https://medium.com/@antmalofeev?source=rss-22437fa6a980------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PXlc7hI5OqjJlGkq</url>
            <title>Stories by Anton Malofeev on Medium</title>
            <link>https://medium.com/@antmalofeev?source=rss-22437fa6a980------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:01:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@antmalofeev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flutter MCP Toolkit v3 — new CLI, semantic tools and architecture]]></title>
            <link>https://medium.com/@antmalofeev/flutter-mcp-toolkit-v3-new-cli-semantic-tools-and-architecture-ef6ff14d7a75?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef6ff14d7a75</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[agentic-harness]]></category>
            <category><![CDATA[ai-tools]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Thu, 21 May 2026 14:35:54 GMT</pubDate>
            <atom:updated>2026-05-21T14:35:54.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vtkuDaygg6Ay1M4HmWCYOQ.png" /><figcaption>disclaimer: generated image</figcaption></figure><p>After a couple of months I finally released v3 of Flutter MCP Toolkit (which complimentary for official Dart / Flutter MCP server) + CLI tools to work.</p><p>This release again completely changes its architecture (MCP and CLI just thin wrappers, everything is configurable from packages and customizable for usage). New tools are client side — first, they are optional, can be modified, verified or improved — and finally ai agents (LLM in the loop:)) starting catching up that how to use them.</p><p>Since there a lot of changes, there can be challenges and bugs, but I hopefully will fix everything as fast as it would be possible.</p><p>Huge thank you for contributors who inspired to make more (like web support) or contributed to the project in previous version!</p><p>Will be glad for any feedback:)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsAD3P1RyniQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsAD3P1RyniQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsAD3P1RyniQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7c37de9b2e95e94e4d67412efca46bf/href">https://medium.com/media/e7c37de9b2e95e94e4d67412efca46bf/href</a></iframe><p>The video is an experiment made with hyperframes and kokoro onnyx as tts :)</p><p>GitHub: <a href="https://github.com/Arenukvern/mcp_flutter">https://github.com/Arenukvern/mcp_flutter</a><br>website with docs for AI Agents and Humans: <a href="https://docs.page/arenukvern/mcp_flutter">https://docs.page/arenukvern/mcp_flutter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef6ff14d7a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[code is a “translation” | after 1.5 years of “vibe-coding” adventures thoughts]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@antmalofeev/code-is-a-translation-after-1-5-years-of-vibe-coding-adventures-thoughts-f2191ae1337d?source=rss-22437fa6a980------2"><img src="https://cdn-images-1.medium.com/max/1024/1*WaPAzn9CpIPacfdsXfMg1g.jpeg" width="1024"></a></p><p class="medium-feed-snippet">I have experimented with spec-driven, docs-driven, and guide-driven workflows&#x200A;&#x2014;&#x200A;I even tried developing &#x201C;semantic intent&#x201D;&#x200A;&#x2014;&#x200A;and as a&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@antmalofeev/code-is-a-translation-after-1-5-years-of-vibe-coding-adventures-thoughts-f2191ae1337d?source=rss-22437fa6a980------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@antmalofeev/code-is-a-translation-after-1-5-years-of-vibe-coding-adventures-thoughts-f2191ae1337d?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2191ae1337d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Sun, 25 Jan 2026 18:04:01 GMT</pubDate>
            <atom:updated>2026-01-25T18:07:57.412Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Flutter app AI centric architecture for small startups. Part 3 — Stages 3–5]]></title>
            <link>https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cbc9cc7ebf3</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[code-structure]]></category>
            <category><![CDATA[app-architecture]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 23:15:38 GMT</pubDate>
            <atom:updated>2025-08-27T23:57:59.490Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter app AI centric architecture for small startups. Part 3 — Stages 3–5</h3><h4>Thoughts about scalable code structure based on developer as user philosophy combined with iterative design using AI.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TQn69vuN4N24MZtErTsrQ.png" /><figcaption>ChatGPT generated image for mood:)</figcaption></figure><h4>Dev Architecture Series</h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes <br></a><a href="https://medium.com/p/f532a4774e0e">Part 2 — Stage 1 and 2 —Previous</a><br><a href="https://medium.com/p/2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion — <em>You are here:)</em></a><em><br>Part 4— Libraries as Agentic Executables (planned)<br>Part 5— Maintaining Libraries with AI Agents (planned)<br>Part 6— Building Foundation with Open Source in mind (planned)<br>Part 7— AI Project Bootstrapping (planned)<br>Part 8— Storage Layer as Reliability Foundation (planned)<br>Part 9— How to build for different Stores? (planned)<br>Part 10 — Dev Ethics as Dev Cornerstone (Decision Making) (planned)<br>Part 11 — Domain Knowledge (Agent Domain Context) (planned)<br>Part 12 —Building Tests with AI Agents (planned)</em></p><h3>Introduction</h3><p>In the first part of the series, we defined key terms and principles, in Part 2 - walked through Stage 1 and Stage 2. If you didn’t checkout — check <a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes</a> and <a href="https://medium.com/p/f532a4774e0e">Part 2 — Stage 1 and 2</a>.</p><blockquote><strong>Note</strong>: after using Cursor AI and other different agents for about a year it’s become obvious that some changes are needed, therefore I will continue architecture series in future (so the content become a plan xD) — if you have any thoughts — please leave comment:).</blockquote><p>Let’s continue our journey!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9_pYYDCVvnvdQRS2" /><figcaption>Photo by <a href="https://unsplash.com/@polarmermaid?utm_source=medium&amp;utm_medium=referral">Anne Nygård</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Stage 3 — Feature iterations.</h3><blockquote>Team: 2 Developers<br>Main focus: test and try features for specific domains to make these domains logically complete.</blockquote><p>While this part is quite small for changes — and may not contain any radical changes in structure, I think it’s quite important on this stage to follow two principles:</p><p>- Keep <em>refreshing, refining</em>, and <em>updating</em> domain knowledge from testing and using the application.</p><p>- Keep every small feature implementation separate from the screen where it is placed. Treat the screen <strong><em>as a layout</em></strong> where you place widgets, and it would be much easier to reuse any feature-related widgets, as they will behave as self-contained micro applications.</p><h3>Stage 4. Scaling.</h3><blockquote>Team: 2–3 Developers</blockquote><p>In my opinion, there are two paths:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*7o4jfVumcdUSGx4tWv1rNA.png" /></figure><h4>Path 1 — Scaling to other platforms.</h4><p>This stage means that we need to publish it to stores on several platforms simultaneously.</p><p>In that case, we will have to deal not only with different factors: platform, adaptive, responsive factors (<a href="https://docs.flutter.dev/ui/adaptive-responsive/best-practices">https://docs.flutter.dev/ui/adaptive-responsive/best-practices</a>)</p><p>That means, it would be better to make the following changes to the structure.</p><p><strong>First</strong>, move the whole data layer (folders with prefixes data) and core into a new package “core”.</p><pre><br>```<br>/packages/<br>├── core/ // or data layer<br>│   ├── core.dart<br>│   ├── src/<br>│   │   ├── core/ // I prefer to keep core as a separate package, as it often has tendency to be reused in other projects, and this way it would be easier to separate it in future to a separate package.<br>│   │   │   ├── utils/<br>│   │   │   ├── extensions/<br>│   │   │   ├── hooks/<br>│   │   │   ├── l10n/<br>│   │   │   └── side_services/<br>│   │   ├── data_local_api/<br>│   │   ├── data_remote_api/<br>│   │   ├── data_repositories/<br>│   │   ├── data_models/<br>│   │   │   ├── api_dto/<br>│   │   │   └── {domain}_models/<br>│   │   ├── data_states/<br>│   │   ├── di/<br>```</pre><p><strong>Second</strong>, move the whole <em>ui_kit</em> into a separate package.</p><pre><br>```<br>/packages/<br>├── ui_kit/<br>│   ├── ui_kit.dart<br>│   ├── UI_KIT_README.md<br>│   ├── atoms/<br>│   │   ├── ATOM_README.md<br>│   ├── molecules/<br>│   │   ├── MOLECULES_README.md<br>```</pre><p><strong>Third</strong>, take a look at domains and features and where they are placed.</p><p>What you can find is that if most of the features were separated from screens inside flows, it is quite easy to separate every screen to the following functionality:</p><p>1. <strong>View Layouts</strong> <strong>// </strong>&lt;- layout where features were placed.<br>2. <strong>Flow logic // </strong>&lt;- navigation between views<br>3. <strong>Features // </strong>&lt;- business implementation</p><p><strong>Then</strong>, move all domain-related logic — layouts (optional), flow (optional), features to a new package “<em>ui_domains</em>”.</p><p>This will be <em>your foundation,</em> where all features, sharable layouts, and flows for domains are written. Think of it like a box of blocks, which separately have some independent functionality within a scope of a specific domain.</p><p>Because every platform has its own layouts, flows can be different. For example, where in mobile you will push several screens, in desktop you may open just one window.</p><p><strong>Then,</strong> depending on your end goal, create a separate app for every platform you need.</p><p>For example, you can end up with the following structure:</p><p><strong>Abstract code structure</strong></p><pre><br>```<br>/<br>/apps/<br>├── {platform}_app/  // &lt;- separate applications with new entry main, which can use different layouts, based on ui_domains package.<br>/packages/<br>│   ├── core/<br>│   ├── ui_kit/<br>│   ├── ui_domains/ // &lt;- this new package will be used in all apps<br>│   │   ├── src/<br>│   │   │   ├── ui_{domain}/<br>│   │   │   │   ├── {DOMAIN}_KNOWLEDGE.md<br>│   │   │   │   ├── {flow}/<br>│   │   │   │   │   ├── {feature_name}/<br>│   │   │   │   │   ├── ├── {feature_name}.dart // barrel file with conditional exports, which are extremly useful for platform dependent features https://dart.dev/tools/pub/create-packages#conditionally-importing-and-exporting-library-files<br>│   │   │   │   │   ├── ├── {feature_name}_{platform}/<br>│   │   │   │   │   ├── layouts/ // &lt;- typically you may have different layouts for same features, so it is make sense to place it directly in the flow folder. But in same time, if you need to move to different place - thats fine too - since in my opinion, that&#39;s more business/design related decision.<br>```</pre><p><strong>Example code structure</strong></p><pre><br>```<br>/<br>/apps/<br>├── desktop_app/<br>├── web_app/<br>├── mobile_app/<br>/packages/<br>├── core/<br>├── ui_kit/<br>├── ui_domains/<br>│   ├── src/<br>│   │   ├── ui_payments/ // &lt;- domain<br>│   │   │   ├── ui_payments.dart // &lt;- barrel file with exports<br>│   │   │   ├── PAYMENTS_KNOWLEDGE.md // &lt;- domain knowledge<br>│   │   │   ├── pay/ // &lt;- flow<br>│   │   │   │   ├── qr_pay/ // &lt;- feature<br>│   │   │   │   │   ├── qr_pay_feature.dart // &lt;- feature barrel file with conditional imports<br>│   │   │   │   │   ├── qr_pay_ios/ // &lt;- platform feature implementation<br>│   │   │   │   │   ├── qr_pay_android/<br>│   │   │   │   │   ├── qr_pay_web/<br>│   │   │   │   ├── provider_pay/ // &lt;- feature<br>│   │   │   │   │   ├── provider_pay.dart // &lt;- feature barrel file<br>│   │   │   │   │   layouts/ // &lt;- flow layouts<br>│   │   │   │   │   ├── desktop/<br>│   │   │   │   │   ├── mobile/<br>│   │   │   ui_profile/ // &lt;- domain<br>│   │   │   ├── ui_profile.dart // &lt;- domain barrel file<br>│   │   │   ├── PROFILE_KNOWLEDGE.md // &lt;- domain knowledge<br>│   │   │   ├── auth/ // &lt;- flow, but as you can imagine, if it will outgrow just auth logical domain, the transform it into a domain and move up.<br>│   │   │   │   ├── login/ // &lt;- feature<br>│   │   │   │   ├── ├── login_ios/<br>│   │   │   │   ├── ├── login_android/<br>│   │   │   │   ├── ├── login_web/<br>│   │   │   │   ├── registration/<br>│   │   │   │   ├── ├── registration_ios/<br>│   │   │   │   ├── ├── registration_android/<br>│   │   │   │   ├── ├── registration_web/<br>│   │   │   │   │   layouts/ // &lt;- flow layouts<br>│   │   │   │   │   ├── desktop/<br>│   │   │   │   │   ├── mobile/<br>│   │   │   ├── settings/ // &lt;- flow<br>│   │   │   │   ├── settings.dart // &lt;- flow barrel file<br>│   │   │   │   ├── customization/ // &lt;- feature<br>│   │   │   │   ├── ├── customization_ios/<br>│   │   │   │   ├── ├── customization_android/<br>│   │   │   │   ├── ├── customization_web/<br>```</pre><p>The difference will depend on what features are represented. For example, some iOS native functionality may not just work or not exist on Linux desktop. Therefore, you will need create a Linux implementation specific to a feature or construct an entirely different experience using only some of iOS features and separate it into independent package.</p><p>The great documentation how to write native plugins and packages is described in flutter website (<a href="https://docs.flutter.dev/packages-and-plugins/developing-packages">https://docs.flutter.dev/packages-and-plugins/developing-packages</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ck4dLaEy6jq6pgpN" /><figcaption>Photo by <a href="https://unsplash.com/@diogenesgarzon?utm_source=medium&amp;utm_medium=referral">Diogenes Garzon de Vértiz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Path 2 — Same app — different configurations.</h4><p>Another way to scale your application by having different flavors. <a href="https://docs.flutter.dev/deployment/flavors">https://docs.flutter.dev/deployment/flavors</a> . But at the same time, if the differences are huge, it would be reasonable to reconstruct them as different apps.</p><p>So in contrast with Path 1, I think in this path you may have the same layouts, but new domains, new flows, and new specific to new apps features. The important part, that you may or may not include domains, flows or features to different apps.</p><p><strong>Abstract code structure</strong></p><pre>```<br>/<br>/apps/{mobile_app_with_different_flows}/<br>/packages/<br>│   ├── core/<br>│   ├── ui_kit/<br>│   ├── ui_domains/<br>│   │   ├── src/<br>│   │   │   ├── ui_{domain}/<br>│   │   │   │   ├── {DOMAIN}_KNOWLEDGE.md<br>│   │   │   │   ├── {flow}/<br>│   │   │   │   │   ├── {feature_name}/<br>│   │   │   │   │   ├── {experimental_feature_name}/<br>│   │   │   │   ├── {experimental_flows}/<br>│   │   │   │   │   ├── {feature_name}/<br>│   │   │   ├── ui_{experimental_domain}/<br>│   │   │   │   ├── {DOMAIN}_KNOWLEDGE.md<br>│   │   │   │   ├── {flow}/<br>│   │   │   │   │   ├── {feature_name}/<br>│   │   │   │   │   ├── ├── {feature_name}_{platform}/<br>```</pre><p><strong>Example code structure</strong></p><pre><br>```<br>/<br>/apps/<br>├── mobile_app_spring_edition // &lt;- separate applications with new entry main, which can use different layouts, based on ui_domains package.<br>├── mobile_app_with_gamification/<br>├── mobile_app_with_ai/<br>/packages/<br>├── core/<br>├── ui_kit/<br>├── ui_domains/<br>│   ├── src/<br>│   │   ├── ui_payments/<br>│   │   │   ├── ui_payments.dart<br>│   │   │   ├── PAYMENTS_KNOWLEDGE.md<br>│   │   │   ├── pay/ // &lt;- flow<br>│   │   │   │   ├── galactical_pay/ // &lt;- experimental feature<br>│   │   │   ├── scan_and_pay/ // &lt;- experimental flow<br>│   │   │   ui_ai_chatbot/ // &lt;- experimental domain<br>│   │   │   ├── ui_ai_chatbot.dart<br>│   │   │   ├── AI_CHATBOT_KNOWLEDGE.md<br>│   │   │   ui_waiting_game/<br>│   │   │   ├── ui_waiting_game.dart<br>│   │   │   ├── WAITING_GAME_KNOWLEDGE.md<br>│   │   │   ui_picture_board/<br>│   │   │   ├── ui_picture_board.dart<br>│   │   │   ├── PICTURE_BOARD_KNOWLEDGE.md<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jkhVNSfr7yr1i4TA" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Stage 5 — Scaling application domains.</h3><blockquote>Team: 3–6 Developers</blockquote><p><em>Lastly</em>, let’s talk about what you can do if a feature grows too big, and you have enough resources to maintain it independently.</p><p>Since from the start, you have separated the domains clearly, you have several options:</p><p>1. Extract the domain as a package<br>2. Extract specific flows as a package<br>3. Extract specific features as a package</p><p><strong>Abstract code structure:</strong></p><pre><br>```<br>/packages/<br>├── core/<br>├── ui_kit/<br>├── ui_{domain}/<br>│   ├── {DOMAIN}_KNOWLEDGE.md<br>│   ├── src/<br>│   │   ├── {flow}/<br>│   │   │   ├── {feature_name}/<br>│   │   │   │   ├── {feature_name}_{platform}/<br>│   │   │   ├── layouts/<br>│   │   │   │   ├── {layout_name}/<br>```</pre><p><strong>Example — moving ui_payments domain to packages:</strong></p><pre>```<br>/packages/<br>├── ui_payments/<br>│   ├── ui_payments.dart<br>│   ├── README.md<br>│   ├── PAYMENTS_KNOWLEDGE.md<br>│   ├── src/<br>│   │   ├── provider_pay/ // &lt;- flow<br>│   │   │   ├── provider_pay.dart // &lt;- feature<br>│   │   │   ├── ├── provider_pay_ios/ // &lt;- platform feature implementation<br>│   │   │   ├── ├── provider_pay_android/<br>│   │   │   ├── ├── provider_pay_web/<br>│   │   │   │   layouts/<br>│   │   │   │   ├── desktop/<br>│   │   │   │   ├── mobile/<br>│   │   │   pay/ // &lt;- flow<br>│   │   │   ├── qr_pay/ // &lt;- feature<br>│   │   │   │   ├── qr_pay_feature.dart // &lt;- feature<br>│   │   │   │   ├── ├── qr_pay_ios/ // &lt;- platform feature implementation<br>│   │   │   │   ├── ├── qr_pay_android/<br>│   │   │   │   ├── ├── qr_pay_web/<br>│   │   │   │   layouts/<br>│   │   │   │   ├── desktop/<br>│   │   │   │   ├── mobile/<br>```</pre><p>In any case, since on the previous stage you already have an independent data layer <em>as a package</em> + an independent <em>ui_kit</em>, your task is quite simple — treat all and plug them as APIs, and use them the same you use any Flutter widget or any pub package.</p><p>This way, you will still have non-broken dependencies (remember the combination: barrel files + clear and visible separated boundaries between data layers and ui, domains, flows and features), while maintaining flexibility to scale, research, and develop. Hooray!</p><h3>Conclusion</h3><p>In my opinion, if you are an indie developer, you can start small and grow. For a team with several developers, a designer, and analyst, and especially if you have a predefined design, it would be better to start from later stages, as you already have more resources at hand and can handle larger complexity.</p><p>But, also, I think this approach works both ways. For example, if your business is in crisis mode and your developer team is shrinking, basically that will mean that you do not have enough resources to keep huge infrastructure. In that case, in my opinion, it would be extremely helpful to go gently back to early stages and continue from there — that may save you from burnout. And don’t forget about your ideas in prototypes — maybe they will save your team one day:)</p><p>I hope this approach will give you inspiration to iterate, integrate, or to look at your projects from different perspectives and to give more quality to the end user.</p><p>Don’t forget to clap your hands — this way you will help the algorithms give this article to others to read, and it would be great support from you:)</p><p>Leave your thoughts in the comments, and have an amazing journey ahead!</p><blockquote><strong>Note</strong>: after using Cursor AI and other different agents for about a year it’s become obvious that some changes are needed, therefore I will continue architecture series in future (so the content become a plan xD) — if you have any thoughts — please leave comment:).</blockquote><h4>Dev Architecture Series</h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes <br></a><a href="https://medium.com/p/f532a4774e0e">Part 2 — Stage 1 and 2 — Previous</a><br><a href="https://medium.com/p/2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion — <em>You are here:)</em></a><em><br>Part 4 — Libraries as Agentic Executables (planned)<br>Part 5 — Maintaining Libraries with AI Agents (planned)<br>Part 6 — Building Foundation with Open Source in mind (planned)<br>Part 7 — AI Project Bootstrapping (planned)<br>Part 8 — Storage Layer as Reliability Foundation (planned)<br>Part 9 — How to build for different Stores? (planned)<br>Part 10 — Dev Ethics as Dev Cornerstone (Decision Making) (planned)<br>Part 11 — Domain Knowledge (Agent Domain Context) (planned)<br>Part 12 — Building Tests with AI Agents (planned)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cbc9cc7ebf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter  Cursor: setting up Background Agent]]></title>
            <link>https://medium.com/@antmalofeev/flutter-cursor-setting-up-background-agent-1bbc847ca60c?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bbc847ca60c</guid>
            <category><![CDATA[cursor-ai]]></category>
            <category><![CDATA[setup-flutter]]></category>
            <category><![CDATA[ai-agent-tutorial]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[cursor]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 21:56:59 GMT</pubDate>
            <atom:updated>2025-07-09T22:34:56.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pauBi_9_zJvX4sXyN15-yg.png" /></figure><p>If you prefer to use Jules (Google AI Agent ), check out <a href="https://medium.com/@antmalofeev/flutter-jules-setting-up-container-for-background-ai-agent-1cc7ce1d4c12">this article</a>.</p><p>Short story — Cursor introduced AI Agents which allows you to run any tasks in background the same way as in IDE with the same setup.</p><p>To give proper setup for AI Agent, we need to setup container the same way you would do for your own computer.</p><h3>Let’s get started:</h3><ol><li>Open Cursor Settings (the panel may be placed in different place, since it depends on how you customized your interface, so you could use Command+Shift+P to open command panel and type “cursor settings”).</li></ol><p>2. Open Background Agents panel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dt_sV1bzXegj1x8ZirTyfg.png" /></figure><p>3. Give Cursor GitHub Access for your sepcific repository. Click Go To GitHub to allow access to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzIhDiStyggQ1Et60z6x7Q.png" /></figure><p>4. Select your repository, to allow access to. Notice: for public repositories owned by organizations, you will have to fork the repository to your personal repositories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOdmj6W9tgj_4ykS7EaDxA.png" /></figure><p>5. After allowing access, make sure you click refresh and you should see Access Granted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xis2Mf4evQw469vvfm1mbA.png" /></figure><p>6. Click Base Environment and then Setup machine interactively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pfpnY3RFA9x7BmRM3h25jA.png" /></figure><p>7. Wait until you see the chat interface</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JZYPk367rbJSgNOLRj4Kg.png" /></figure><p>8. Write to agent the command to install required dependencies.</p><p>Use agent mode, so agent could verify setup and update other dependencies if needed.</p><p>I used the following script:</p><pre>Hi. Please install Flutter &amp; Dart.<br><br>Use the command below:<br>```<br># Install Dart SDK (using apt, official Google repo)<br>sudo apt-get update<br>sudo apt-get install -y apt-transport-https wget<br>wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /etc/apt/keyrings/dart.gpg<br>echo &quot;deb [signed-by=/etc/apt/keyrings/dart.gpg] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main&quot; | sudo tee /etc/apt/sources.list.d/dart_stable.list<br>sudo apt-get update<br>sudo apt-get install -y dart<br># Add Dart to PATH<br>export PATH=&quot;$PATH:/usr/lib/dart/bin&quot;<br># Clone Flutter<br>cd /opt &amp;&amp; sudo git clone https://github.com/flutter/flutter.git -b stable<br>sudo chown -R $USER:$USER /opt/flutter<br>export PATH=&quot;$PATH:/opt/flutter/bin&quot; &amp;&amp; cd /workspace<br>flutter pub get<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JC2nvTv_6PnG4vEd7ZHf0A.png" /></figure><p>9. After Agent finished the job, click Take Snapshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bjw70TdqpC4G1ub0P0Qwfw.png" /></figure><p>10. Add command flutter pub get or any script you usually use to get all dependencies in your project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5yQJ86Z-MWa4rsmRmFViQ.png" /></figure><p>11. After that, verify that everything works</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V220orUwQYggpd0tML5Rlg.png" /></figure><p>12. That’s it! Now you can use background agent from any accessible ui point (from settings, from tab, pwa app or cursor website).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aK3VW9-AQwfZq6NCdAyTNA.png" /></figure><p>I hope this concept proves useful :-)</p><p>Please share your thoughts in the comments :-) This will help make this article visible to others and will be great support and motivation :-)</p><p>Thank you for your time and have a good day!</p><p>Anton</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bbc847ca60c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My principles at work | Credo?]]></title>
            <link>https://medium.com/@antmalofeev/my-principles-at-work-credo-409d2d5da6f5?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/409d2d5da6f5</guid>
            <category><![CDATA[work-principles]]></category>
            <category><![CDATA[ai-principles]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 07:48:06 GMT</pubDate>
            <atom:updated>2025-10-26T21:30:45.870Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Ethical AI Dev Manifesto</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkY0yt5wrH0kwk-QgTdy8Q.png" /><figcaption>AI generated image to inspire:)</figcaption></figure><p>While it may sound strange why to publish, but while I was preparing to find new opportunities and challenges, it is started to sound like a manifesto. So I not share it:)</p><p><strong>Disclaimer</strong>: I have not used any AI tools for help this time:)</p><p>So here we go, my principles at work:</p><ol><li><strong>Ethical Principles</strong>. <br><strong>Why:</strong> when business have certain principles to design software, it usually prioritizes creating unique value for End User. This helps a lot with defining how team communicates with each other, how application looks and function, how code is written (by knowing constraints and freedoms within). Also by having ethical principles it is clear when AI can be used (in end product or in IDE), and when it shouldn’t.</li><li><strong>User &amp; Team Experience</strong>. In my work I prioritize impact for End User and sense of team while working with other people. <br><strong>Meaning</strong>: I value other people experience and believe that culture of experience sharing is worth the time.</li><li><strong>Value via Care &amp; Innovation.</strong> I believe that the app should be simple, focused and worth of people time who is using it. Combining with growing technologies, especially AI (cloud or on-device LLMs), I believe that so many things can be reimagined and fundamentally rethought making User experience as priority.</li><li><strong>AI:</strong> I use Cursor (mostly) for writing a code. But thinking of the code as co-colleague, who can teach me new things, reimagine old things. In the same time, every my decision where I use it and why is based on <a href="https://medium.com/@antmalofeev/small-thought-developer-ethics-may-be-a-bridge-to-work-with-ai-tools-cd60cf43c856">Ethical principles</a> — this allows me to build faster but with more quality for End User and Developer.</li><li><strong>Developer &amp; Designer &amp; QA as User.</strong> In my opinion that every person who can access a code is a user too. <br><strong>Meaning</strong>: writing useful documentation, making API useful, making Design System accessible for Designer, getting any feedback (via code review, or application preview) is extremely important for me. In my opinion this process makes not only product better, but every person who involved in its creation.</li><li><strong>Prototyping.</strong> From my experience many of the great ideas and practices are coming from iterations and fast prototyping — because it is not only allows to feel the idea, but to share, and experience it yourself and share with others. And hearing the feedback is most of important part of prototyping too 🙂</li><li><strong>Timing</strong>. Usually I use simple formula to get most correct time: Team + Known Knowledge + My Experience + My Experience in the codebase | domain. <br><strong>Meaning</strong>: when measuring how long feature/bug/app can be developed I usually need to know the people who works with me, then the codebase and then combine it with all I know.</li></ol><p>If you interested how why and how this idea came work — please see <a href="https://medium.com/@antmalofeev/small-thought-developer-ethics-may-be-a-bridge-to-work-with-ai-tools-cd60cf43c856">https://medium.com/@antmalofeev/small-thought-developer-ethics-may-be-a-bridge-to-work-with-ai-tools-cd60cf43c856</a></p><p>I hope this post inspires and proves useful in some way :-)</p><p>Please share your thoughts in the comments :-) this will help make this thread visible to others and will be great support and motivation :-)</p><p>Thank you for your time and have a good day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=409d2d5da6f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter  Jules (setting up container for background AI Agent)]]></title>
            <link>https://medium.com/@antmalofeev/flutter-jules-setting-up-container-for-background-ai-agent-1cc7ce1d4c12?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cc7ce1d4c12</guid>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 22:05:54 GMT</pubDate>
            <atom:updated>2025-06-18T22:05:54.035Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*8VMPUfQ5dojt9s2FYp8aQA.png" /></figure><p>At this Google I/O, Google introduced a new development tool: <a href="https://jules.google.com/">https://jules.google.com</a></p><p><strong>What are the advantages?</strong> It’s currently free, runs on Gemini, and it’s an AI Agent.</p><p><strong>What does this mean (example)?</strong> Often, there’s a problem where the number of modules or libraries you’d like to create or maintain in the project exceeds what can be maintained (if you are solo or small team), especially if you’re managing an open-source library in spare time.</p><p>Background agents help take on some of the work. I’ve found them useful for documentation, light refactoring, and implementing small features.</p><p>To get started, you can usually use a short prompt to pre-create a plan that Jules will partially follow (in reality, it will recreate the plan, but having references will make it easier):</p><blockquote>Please write a condensed plan for an AI Agent so it can execute it step by step. Make sure that the plan has only one final goal; otherwise, ask the user what to do.</blockquote><blockquote>Make sure that the plan contains original links to sources, a chosen configuration script, and is written in a way that allows for one-click copy &amp; paste.</blockquote><p>This plan can be created in any AI chat, but when working with the plan, it’s advisable to specify the project/documentation the agent will be working with.</p><p>An important part of the prompt that needs to be included in the prompt-plan is the Flutter installation in Ubuntu:</p><pre>Always add as first steps:<br>1. Branch &amp; Environment Setup<br>1.1 Create a new branch from the default branch (e.g., {name}).<br>1.2 Run the provided environment setup scripts to ensure Dart, FVM, and Flutter are correctly installed and configured.<br><br>- For flutter fvm (should be dependent from what user asks):<br>```<br># Install Dart SDK (using apt, official Google repo)<br>sudo apt-get update<br>sudo apt-get install -y apt-transport-https wget<br>wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -<br>sudo sh -c &#39;wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list &gt; /etc/apt/sources.list.d/dart_stable.list&#39;<br>sudo apt-get update<br>sudo apt-get install -y dart<br><br># Add Dart to PATH<br>export PATH=&quot;$PATH:/usr/lib/dart/bin&quot;<br><br># Install FVM globally<br>dart pub global activate fvm<br><br># Add FVM to PATH<br>export PATH=&quot;$PATH:$HOME/.pub-cache/bin&quot;<br><br># Install Flutter version from .fvmrc<br>fvm install<br><br># Get Flutter dependencies<br>fvm flutter pub get<br>```<br>- For flutter without fvm:<br>```<br># Install Dart SDK (using apt, official Google repo)<br>sudo apt-get update<br>sudo apt-get install -y apt-transport-https wget<br>wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -<br>sudo sh -c &#39;wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list &gt; /etc/apt/sources.list.d/dart_stable.list&#39;<br>sudo apt-get update<br>sudo apt-get install -y dart<br><br># Add Dart to PATH<br>export PATH=&quot;$PATH:/usr/lib/dart/bin&quot;<br><br>flutter pub get<br>```</pre><p><strong>Why is this important?</strong></p><p>Initially, Jules (like Cursor background agents and Codex) runs in an isolated environment. Since Dart &amp; Flutter are typically not present in the container, they need to be forcibly installed before starting work on a project. By declaring this in the initial prompt, we provide clearer instructions on how the agent should act, which enables it to complete the task with higher quality.</p><p>I hope this concept proves useful :-)</p><p>Please share your thoughts in the comments :-) This will help make this article visible to others and will be great support and motivation :-)</p><p>Thank you for your time and have a good day!</p><p>Anton</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cc7ce1d4c12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[small thought: Developer Ethics may be a bridge to work with AI tools]]></title>
            <link>https://medium.com/@antmalofeev/small-thought-developer-ethics-may-be-a-bridge-to-work-with-ai-tools-cd60cf43c856?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd60cf43c856</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[ideas]]></category>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Thu, 15 May 2025 13:15:12 GMT</pubDate>
            <atom:updated>2025-10-26T21:24:00.848Z</atom:updated>
            <content:encoded><![CDATA[<h3>idea: Developer Ethics may be a bridge to work with AI tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a6BXNkFvcQV4xebN0Uo_uQ.jpeg" /></figure><p>Last year, I intensely started using AI (LLM) tools and caught a terrible wave of sadness and melancholy after 5–6 months of use.</p><p>For me, the most difficult thing wasn’t that an LLM could write code in general, but the realization that, in fact, it’s not that important. A much more significant abstract question arose: why even write it if everything could change so quickly tomorrow that you wouldn’t even blink?</p><p>After feeling down and literally being sick of it, and wandering through bookstores, I stumbled upon an interesting book — “The Art of Excellent Products: Enchanting Customers with Premium Brand Experiences” by Riccardo Illy. And this book resonated so deeply that I understood how to resolve (for the time being) the moral dilemma with AI code, when you don’t write the code yourself, but AI does — through ethical principles.</p><p>In my opinion, ethical principles offer three possibilities:</p><p>1. Limitations or focus — by establishing principles, you can focus only on what is truly important and discard/deprioritize what does not align with these principles.</p><p>2. Flexibility in decision-making — knowing the limitations and having an ethical focus, you can, if necessary, make responsible decisions faster, but without sacrificing what is ethically important for the company/product.</p><p>3. Trust — having limitations in the form of chosen ethical principles, the values of the product/company can become more resilient to crises — which in the end can lead to more trust in the product for the end user. In theory :) Therefore, since the beginning of the year, I have started thinking about principles/values and trying to understand which ones are suitable — and why.</p><p>So I stepped away from digital to write by hand in a notebook. I’ve divided them into several groups, since I think they may change from the type of purpose.</p><p>I choose: Applications, Games, Personal Principles</p><p>For example for apps I came to: <br>— Convenience <br>— Simplicity <br>— Safety <br>— Longevity <br>— Usefulness</p><p>For games (since it’s my hobby, it a little different): <br>— Usefulness <br>— Creativity <br>— Fun <br>— Challenge</p><p>I feel they will change over time, but for a start it is enough.</p><p>Currently (May), the 5th month of testing — and I can honestly say that it has become much easier to focus on the problem and the solution than before. I am sure that a lot will change with the development of AI — but it seems like this could become a bridge for working with it from a moral and ethical standpoint (especially when you need to negotiate/choose between faster and better).</p><p>I hope this post inspires and proves useful in some way :-)</p><p>Please share your thoughts in the comments :-) this will help make this thread visible to others and will be great support and motivation :-)</p><p>Thank you for your time and have a good day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd60cf43c856" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dart — Non-Nullable Initialization Pattern]]></title>
            <link>https://medium.com/@antmalofeev/dart-non-nullable-initialization-pattern-a7465740e27c?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7465740e27c</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[patterns]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 20:01:29 GMT</pubDate>
            <atom:updated>2025-04-28T18:00:24.186Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dart — applying zero objects and isEmpty pattern to everything</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZiRGU2iqhBbPHiz0rLRONg.jpeg" /><figcaption>when using variables safe and feels like imaginary home:)</figcaption></figure><p>It’s more technical note, rather than article, so I will try to express idea more in condensed and clear approach.</p><p>Before getting started, if your way to see how it works, I’ve recently uploaded small package — <a href="https://pub.dev/packages/is_dart_empty_or_not#">see it here</a>.</p><p>Coming from JS/TS world, when I first used Dart, the most fascinated thing among others was to use <strong>isEmpty</strong> or <strong>isNotEmpty</strong> functions, and for strings, lists, maps etc.. It was amazingly simple just not write every time .length == 0.<br>Also it was very useful to use <strong>empty/zero</strong> values like <strong>Duration.zero, Offset.zero</strong> and many others that were nice addition to this pattern.</p><p>Over time I developed a habit to use same principle for different cases and came to though, what if we use zero values for most cases, eliminating a need in null for most cases (not all, but nonetheless)? I search and found similar pattern is used in Go, so I’ve started thinking:</p><h3>Problem</h3><p>imagine situation:</p><pre>String? value;<br><br>// do something<br><br>value = &quot;new value&quot;;</pre><p>What checks we should to make sure the value exists to assign some value to new variable?</p><pre>final String newValue;<br>if(value != null &amp;&amp; value.isEmpty){<br>  // do something<br>  newValue = &quot;defaultValue&quot;;<br>}  else {<br>  newValue = value;<br>}</pre><p>What the difference between null and isEmpty check in this situation?<br>What if we write</p><pre>String value = &quot;&quot;;<br>final String newValue;<br><br>if(value.isEmpty){<br>  // do something<br>  newValue = &quot;defaultValue&quot;;<br>} else {<br>  newValue = value;<br>}<br><br>// use newValue</pre><p>Nice but still verbose.</p><p>Would that would be nice to use it inline? Let’s try to rewrite it with new extension:</p><pre>extension StringX on String {<br>  String whenEmptyUse(String value) =&gt; isEmpty ? value : this;<br>}<br><br>final newValue = value.whenEmptyUse(&quot;defaultValue&quot;);</pre><p>What if we try to apply it to lists, maps, values, numbers</p><pre>extension ListX on List&lt;T&gt; {<br>  List&lt;T&gt; whenEmptyUse(List&lt;T&gt; values) =&gt; isEmpty ? values : this;<br>}<br><br>final newValues = values.whenEmptyUse([&quot;defaultValue&quot;]);<br><br>extension DoubleX on double {<br>  bool isZero =&gt; this == 0;<br>  double whenZeroUse(final double value) =&gt; isZero ? value : this;<br>}<br></pre><p>This pattern is extremely useful with zero/empty values for objects too. For example:</p><pre>class Person {<br>  const Person({this.name=&#39;&#39;});<br>  final String name;<br><br>  static const empty = Person();<br><br>  bool get isEmpty =&gt; name.isEmpty;<br>  bool get isNotEmpty =&gt; name.isNotEmpty;<br>  // or use different names for to read nicer<br>  bool get isInitialized =&gt; name.isNotEmpty;<br>  bool get isNotInitialized =&gt; name.isEmpty;<br>}<br><br>extension PersonX on Person {<br> Person whenEmptyUse(Person value) =&gt; isEmpty ? value : this;<br>}<br></pre><p>Then we could use it everywhere the same simple way as checking string:</p><pre>var person = Person.empty;<br><br>// do something dangerous<br><br>final newPerson = person.whenEmptyUse(Person(name:&#39;Frodo&#39;));</pre><p>We could do same for IDs, Lists with types, etc. etc..</p><p>This way we use simpler API, we always make sure that we have value, we know default (empty, zero) value.</p><p>Hopefully it helps:)</p><p>Please don’t forget to clap hands and share your thoughts in comments:) it really helps the algorithms give this article to others to read, and it would be great support from you:)</p><p>Have a nice day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7465740e27c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter app AI centric architecture for small startups. Part 2 — Stage 1 & 2]]></title>
            <link>https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-2-stage-1-2-f532a4774e0e?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/f532a4774e0e</guid>
            <category><![CDATA[code-structure]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[app-architecture]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Fri, 31 Jan 2025 11:36:04 GMT</pubDate>
            <atom:updated>2025-09-30T17:33:28.895Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter app AI centric architecture for small startups. Part 2 — Stage 1 &amp; 2</h3><h4>Thoughts about scalable code structure based on developer as user philosophy combined with iterative design using AI.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgBbkcS1p_UpjiYDDD5eig.jpeg" /><figcaption><em>Imaginary Gantt chart depicting astronomical growth and burnout:) Generated in </em><a href="http://leonardo.ai/"><em>leonardo.ai</em></a><em> by feelings of building project.</em></figcaption></figure><h4>App Architecture Series</h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes — Previous<br></a><a href="https://medium.com/p/f532a4774e0e">Part 2 — Stage 1 and 2 — <em>You are here:) </em></a><br><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion — Next</a></p><h3>Introduction</h3><p>In the first part of the series, we defined key terms and principles. If you didn’t checkout — check <a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes</a>.</p><p>Let’s continue our journey!</p><h3>Stage 1 — Prototyping.</h3><blockquote>Team: 1 (or at best 2) Developers<br>Main focus: develop fast and throw away every piece you don’t like as a ClientUser (or call it business).</blockquote><p>Treat your repo as a <em>workbench</em> — you don’t know what will work, so expect multiple projects at the same time, even in different frameworks, different languages.</p><p>I suggest the following folder structure in that stage.</p><p><strong>Abstract code structure</strong></p><pre><br>```<br>/<br>├── prototypes<br>│   ├── {prototype_name}<br>│   │   ├── idea.md  // This file contains the initial ideas and AI-generated insights for the prototype.<br>├── prompts<br>│   ├── agents<br>│   │   ├── {name}_agent.md  // Rules and guidelines for AI agents used in the project.<br>│   ├── ideas<br>│   │   ├── {idea}_gen.md  // Only AI-generated answers - ideas and prompts.<br>│   │   ├── {idea}.md  // Handwritten notes and domain knowledge. May include AI-generated answers too.<br>```</pre><p><strong>Example code structure</strong></p><pre><br>```<br>/<br>├── prototypes<br>│   ├── flutter/todo_with_amazing_animation<br>│   │   ├── idea.md<br>│   ├── typescript/yjs_prototype<br>│   │   ├── idea.md<br>│   ├── dart/frog_server<br>│   │   ├── idea.md<br>│   ├── just_cool_feature<br>│   │   ├── idea.md<br>├── prompts<br>│   ├── agents<br>│   │   ├── flutter_agent.md<br>│   │   ├── flutter_architector_agent.md<br>│   │   ├── rust_agent.md<br>│   ├── ideas<br>│   │   ├── charmed_animated_scroll_gen.md<br>│   │   ├── that_gradient_shader.md<br>```</pre><p>If you don’t like the word <em>prototype</em>, use <em>playground</em> or <em>experiments</em> — this word is important because in later stages you will want to make sure that these pieces are playable, even for newcomers, but not movable, so your git commit will not explode xD</p><blockquote>Every prototype should be as small as possible — it can be one to three files just to test and experience your idea.</blockquote><p>I would advise not to set up strict lints for this stage to keep code as simple and small as possible, but in case you are testing them or using a new language — certainly go for it.</p><h3>Stage 2 — Domain iterations.</h3><blockquote>Team: 1–2 Developers<br>Main focus: set up such an architecture that will support and help fast iterations in domains and do so.</blockquote><p>The stage when you have at least one idea, and you are about to start development of the MVP (Minimum Viable Product).</p><p>And you iterate over and over domains to find the best (at this particular moment) experience for end users.</p><h4>A note about linter rules</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GPD_VrLn_bYlnZ95w-BhTA.jpeg" /><figcaption>Strangely, just a couple of linter rules — and your path to create or eliminate your technical debt is set..</figcaption></figure><p>Choose your linter rules even before you look into the code, and choose wisely. These rules will affect not only you, but your AI-generated code, code quality, and technical debt as eventually, your codebase will grow, and if you decide to change just one rule, you may trigger a huge amount of linter warnings, errors, and team discussions.</p><h4>UI Kit</h4><blockquote>This stage highly depends on the question — are you a completely lone developer, or a team with a designer, because the first thing to do is to create some, maybe not perfect, but usable ui_kit.</blockquote><p>To make this, try to look into different techniques for organizing it. Personally, I prefer to use at least two steps from the <a href="https://atomicdesign.bradfrost.com/chapter-2/">Atomic Design methodology</a>: <em>atoms</em> and <em>molecules</em>, but in my opinion, it highly depends on <em>what you expect to achieve with the design, for what platforms the product is developing, etc</em>. For one product, it can have only atoms and molecules. Another one — specific repeatable patterns for complex product cards, layout templates, pages templates, for another — Material, Human Guidelines, FluentUI approach (usually in that case, it is quite convenient to find official design in Figma or Sketch, etc.).</p><p>Treat it as a <em>completely standalone library</em> to not tie to any business requirements and focus on how it would be convenient to use, to develop, and maintain not only by you but by other developers and AI too.</p><blockquote>Hopefully, to get it into the right words — that doesn’t mean it should be perfect, rather it should have well-documented READMEs around to explain the principles of how to create a new component of this library and make it useful.</blockquote><p>From my experience, it is critically important how well you organize and define taxonomy, documentation, and convenience — this will affect any developer’s decision in the future, how fast you will be able to iterate (develop new, maintain, fix, and change old) for features, screens, etc.</p><p><strong>UI Kit relations &amp; workflow example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sDP02_Ca0wFG04lR-zn3CA.png" /></figure><p>Then create the basic app code structure.</p><p><strong>Abstract code structure</strong></p><pre><br>```<br>├── core // everything that is not API, data, state, and ui. May contain isolated business logic, but not tied to any specific domain.<br>│   ├── utils  // Utility functions, some duplicate isolated logic that is more related to the framework than the app, such as serialization, etc.<br>│   ├── extensions  // Extensions for types.<br>│   ├── hooks  // Optional hooks for logic duplication reduction. Usually handy for small portions of logic that are used in build methods.<br>│   ├── l10n  // Optional localization files.<br>│   ├── side_services  // Optional third-party services like Firebase, Analytics, etc.<br>├── data_local_api  // I use word API, as it is just shorter:) but it has the same meaning as services, sources). Prefer to treat it as your local backend server.<br>├── data_remote_api  // (services, sources) Remote APIs, preferably generated from backend schemas (REST or GraphQL or any other).<br>├── data_repositories  // (optional) Handles both local and remote APIs.<br>├── data_models<br>│   ├── api_dto  // (optional) Data Transfer Objects for APIs. Preferably generated for remote APIs, can be useful for local APIs too.<br>│   ├── {domain}_models  // (optional) Domain-specific models.<br>├── data_states  // Global level states for runtime data (notifiers, controllers, blocs, commands, etc.). Its purpose mostly to keep runtime data prepared to use in UI. These states can be used in all domains.<br>├── di  // Dependency injection setup (it may be provider, get_it, inherited_models, etc.). Will be available for all domains in the app. Here you can set up API, states + methods to initialize them and use in `ui_root`.<br>├── ui_root  // Place here everything that is needed for the app to start: bootstrap methods, data_state and side_services initialization, error catching (Firebase, Sentry), Analytics, etc.<br>├── ui_kit // uses below two Atomic Design principles: atoms and molecules, but you can use any other principles, such as Material, Human Guidelines, FluentUI, etc.<br>│   ├── UI_KIT_README.md  // Short Rules and main principles defining how and why you made certain choices in underlying structure and links to the underlying READMEs. The last part is important, because as I found out, AI tools like to use README for designing or development.<br>│   ├── atoms<br>│   │   ├── ATOM_README.md  // Domain knowledge for atoms.<br>│   ├── molecules<br>│   │   ├── MOLECULE_README.md  // Domain knowledge for molecules.<br>├── ui_{domain} // all ui domains<br>│   ├── {DOMAIN}_KNOWLEDGE.md  // Domain knowledge for the specific UI domain.<br>│   ├── {flow} // one or more screens or views united into one flow. Every flow has one entry point screen (or at least one) and every screen has one or more features.<br>│   │   ├── {flow}_screen.dart  // Entry point for the flow.<br>│   │   ├── {feature_name}  // Domain and flow-specific features.<br>├── envs.dart  // [Environment variables](https://codewithandrea.com/tips/dart-define-from-file-env-json/)<br>├── router.dart  // Your preferred router setup with defined routes<br>├── {platform}_app.dart  // Entry point for the platform-specific app.<br>├── common_imports.dart  // Optional. Place here all imports that are used in the whole app. Also, it is handy to place here all exports from barrel files from each top folder.<br>```</pre><p>And finally, create domains <em>ui_{domains} </em>which will include the most critical app experience and iterate over them.</p><p><strong>A note about UI Domains</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iTVblkvCH5SWgG4s1EIx6Q.png" /><figcaption>Schematic example of what can be shared, and what — can’t inside domains.</figcaption></figure><p>Inside domain, you may work with different types of <em>data layer, screen states, widget states</em> (in Flutter it is called <a href="https://docs.flutter.dev/data-and-backend/state-mgmt/ephemeral-vs-app#ephemeral-state">Ephemeral state</a>), some business logic, specific to feature models which you never intend to share with other domains.</p><p>I suggest a small decision to manage relations between domains — <strong>reuse only widgets</strong> (<em>flows, screens, features</em>), <strong>do not share/reuse data</strong>. If you need to share something from domain <em>local data</em> layer — move it <em>to global data</em> layer, from which it will be available for all domains. For example, a <em>local</em> <em>model</em> may go to <em>data_models,</em> <em>screen state</em> maybe refactored and go to <em>data_states</em>.</p><p>A word about <em>data_state</em> — Flutter documentation calls it App State <a href="https://docs.flutter.dev/data-and-backend/state-mgmt/ephemeral-vs-app#app-state.">https://docs.flutter.dev/data-and-backend/state-mgmt/ephemeral-vs-app#app-state.</a> In other words, you can define it as global-level states for runtime data (notifiers, controllers, blocs, commands, etc.). Its purpose is mostly to keep runtime data prepared to use in UI. These states can be used in all domains.</p><p>Now let’s move back to global project structure.</p><h4>Relations between global layers</h4><blockquote><em>Option 1 — with common_imports</em></blockquote><figure><img alt="Basic app relationships diagram using common imports for any ui domains folder" src="https://cdn-images-1.medium.com/max/1024/1*A1daq2fGCPtTz_zHYiBDpA.png" /><figcaption>Basic app relationships diagram using common imports for any ui domains folder</figcaption></figure><blockquote><em>Option 2 — without common_imports</em></blockquote><figure><img alt="Basic app relationships diagram without common imports for any ui domains folder" src="https://cdn-images-1.medium.com/max/1024/1*Fs6S1xGROVZy2HzUUgQ7HQ.png" /><figcaption>Basic app relationships diagram without using common imports for any ui domains folder</figcaption></figure><h4>Note. Barrel File.</h4><blockquote><em>I find it very convenient to create barrel files on each top folder by exporting underlying classes in the same manner as Dart does for package export </em><a href="https://dart.dev/tools/pub/create-packages."><em>https://dart.dev/tools/pub/create-packages.</em></a><em> This makes future refactoring easier and gives the ability to not mess with git changes when some file moves later.</em></blockquote><blockquote><em>Also, this practice makes it easier to think of all global folders as packages / libraries which are independent and may change their content, internal structure, but will maintain consistency with their external API.</em></blockquote><blockquote><em>At the same time, currently I have no experience in how it affects the ability of deferred imports. </em><a href="https://dart.dev/language/libraries#lazily-loading-a-library"><em>https://dart.dev/language/libraries#lazily-loading-a-library</em></a><em> I think at least you may expect that it will have no effect on this stage, but since it is a way to load libraries — it may become more effective with stage 4.</em></blockquote><h4>Second note. Domain Knowledge.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5RFFsbEuzNIrZBQPuupbCQ.png" /><figcaption>UI Domain relations &amp; workflow example</figcaption></figure><blockquote><em>Optionally, I recommend trying to place in all data and ui layer folders a </em>Domain Knowledge<em> </em>file<em>. It should be simple enough to regenerate and iterate with AI — this may give you context to work with particular domain features, develop, or maintain.</em></blockquote><blockquote><em>Semantically, to make it easy to get this context and navigate, it would be great if you align it with the above folder’s name, for example,</em></blockquote><blockquote><em>If the folder above is </em>ui_guide<em>, then below you may place a file </em>UI_GUIDE_CONTEXT.md<em> or </em>UI_GUIDE_KNOWLEDGE.md. <em>The reason is simple: when you use file search — you will be able to quickly find this file, when you communicate with AI tool — you will much faster find required context.</em></blockquote><h4><strong>Now let’s take a note on semantics.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPxuwLgJ2I5hpMNB683NTg.png" /><figcaption>Visual representation of layers separation, its relations and building order</figcaption></figure><p>First, the whole data layer has a prefix <em>data</em> for two reasons:<br>- to keep it at the top of the lib folder, so we could easily access it<br>- to keep always in mind that it is a data layer only</p><p>Second, domains (or UI layer) have a prefix <em>ui</em>. This makes this layer<br>- on visual and physical distance from the data layer<br>- stack all ui related domains together.</p><p>While it may seem an over-engineering attempt, defining the organization of data and ui layers <em>visually distinctive</em> from each other, will affect how you develop your application, because you will see it differently — more from an end-user perspective.</p><p>Finally, let’s summarize all words into graphics:</p><p><strong>Abstract code structure</strong></p><pre><br>```<br>/<br>├── pubspec.yaml  // &lt;- define workspace to use the whole space as monorepo https://dart.dev/tools/pub/workspaces<br>├── apps/<br>│   └── {platform}_app/  // &lt;- platform can be replaced by your first target platform, for example mobile_app<br>│       ├── core/<br>│       │   ├── core.dart<br>│       │   ├── utils/<br>│       │   ├── extensions/<br>│       │   ├── hooks/<br>│       │   ├── l10n/<br>│       │   └── services/<br>│       ├── data_local_api/<br>│       ├── data_remote_api/<br>│       ├── data_repositories/<br>│       ├── data_models/<br>│       │   ├── api_dto/<br>│       │   └── {domain}_models/<br>│       ├── data_states/<br>│       ├── di/<br>│       ├── ui_root/<br>│       ├── ui_kit/<br>│       │   ├── ui_kit.dart  // &lt;- place ui kit initially as a folder of mobile_app to keep initial simplicity<br>│       │   ├── UI_KIT_README.md<br>│       │   ├── atoms/<br>│       │   │   └── ATOM_README.md<br>│       │   └── molecules/<br>│       │       └── MOLECULES_README.md<br>│       ├── ui_{domain}/<br>│       │   ├── {DOMAIN}_KNOWLEDGE.md<br>│       │   ├── {flow}/<br>│       │   │   └── {feature_name}/<br>│       ├── envs.dart<br>│       ├── router.dart<br>│       ├── common_imports.dart<br>│       └── {platform}_app.dart<br>└── prototypes/<br>    └── {prototype_name}/<br>        └── idea.md  // This file contains the initial ideas and AI-generated insights for the prototype.<br>    └── prompts/<br>        ├── agents/<br>        │   └── {name}_agent.md<br>        └── ideas/<br>            ├── {idea}_gen.md<br>            └── {idea}.md<br>```</pre><p><strong>Example code structure</strong></p><pre><br>```<br>/<br>├── pubspec.yaml<br>├── apps/<br>│   └── mobile_app/<br>│       ├── core/<br>│       │   ├── core.dart<br>│       │   ├── utils/<br>│       │   ├── extensions/<br>│       │   ├── hooks/<br>│       │   ├── l10n/<br>│       │   └── services/<br>│       ├── data_local_api/<br>│       ├── data_remote_api/<br>│       ├── data_repositories/<br>│       ├── data_models/<br>│       │   ├── data_models.dart<br>│       │   ├── api_dto/<br>│       │   ├── payments_models/<br>│       │   ├── chat_models/<br>│       │   └── profile_models/<br>│       ├── data_states/<br>│       │   ├── data_states.dart<br>│       │   ├── app_settings_notifier.dart<br>│       │   └── user_profile_cubit.dart<br>│       ├── di/<br>│       │   ├── di.dart<br>│       │   ├── dependency_injector.dart<br>│       │   ├── global_initializer.dart<br>│       │   ├── global_state_initializer.dart<br>│       │   └── global_state_providers.dart<br>│       ├── ui_root/<br>│       │   ├── ui_root.dart<br>│       │   ├── app_scaffold.dart<br>│       │   └── bootstrap.dart<br>│       ├── ui_kit/<br>│       │   ├── ui_kit.dart<br>│       │   ├── UI_KIT_README.md<br>│       │   ├── atoms/<br>│       │   │   ├── atoms.dart<br>│       │   │   ├── ATOM_README.md<br>│       │   │   ├── ui_text_field.dart<br>│       │   │   ├── ui_icon.dart<br>│       │   │   └── ui_badge.dart<br>│       │   └── molecules/<br>│       │       ├── molecules.dart<br>│       │       ├── MOLECULES_README.md<br>│       │       ├── ui_search_field.dart<br>│       │       ├── ui_app_bar.dart<br>│       │       └── ui_animated_grid.dart<br>│       ├── ui_payments/<br>│       │   ├── ui_payments.dart<br>│       │   ├── PAYMENTS_KNOWLEDGE.md<br>│       │   ├── transactions_flow/<br>│       │   │   ├── transactions_screen.dart<br>│       │   │   ├── features/ // consider making this name adaptive; if a screen lacks features, it may not need them. If features are complex, naming them may be more efficient than grouping them.<br>│       │   │   │   ├── transactions_list.dart<br>│       │   │   │   └── edit_transaction_popup.dart<br>│       │   └── pay/<br>│       │       ├── pay_screen.dart<br>│       │       ├── qr_pay/<br>│       │       │   ├── *<br>│       │       │   └── qr_pay_feature.dart<br>│       │       ├── provider_pay/<br>│       │       │   ├── *<br>│       │       │   └── provider_pay.dart<br>│       │       └── crypto_provider_pay/<br>│       │           ├── *<br>│       │           └── crypto_provider_pay.dart<br>│       ├── ui_profile/<br>│       │   ├── ui_profile.dart<br>│       │   ├── PROFILE_KNOWLEDGE.md<br>│       │   ├── auth/<br>│       │   └── settings/<br>│       ├── envs.dart<br>│       ├── router.dart<br>│       └── mobile_app.dart<br>└── prototypes/<br>    ├── flutter/todo_with_amazing_animation/<br>    │   └── idea.md<br>    ├── typescript_yjs_prototype/<br>    │   └── idea.md<br>    ├── dart_frog_server/<br>    │   └── idea.md<br>    └── just_cool_feature/<br>        └── idea.md<br>/prompts/<br>├── agents/<br>│   ├── flutter_agent.md<br>│   ├── flutter_architector_agent.md<br>│   └── rust_agent.md<br>└── ideas/<br>    ├── charmed_animated_scroll_gen.md<br>    └── that_gradient_shader.md<br>```</pre><p>Personally, I find it difficult to nest flows too deep, so there we have two choices:</p><p>- when the flow becomes too huge or feels logically complete — it seems more convenient to acknowledge it as a domain and move it on a global level as a domain.<br>- or break this flow into several flows, if it feels there is too much different functionality in one place.</p><p>I think the most important part of this stage is to accumulate enough <em>Domain Knowledge</em> before diving too deep into endless features.</p><h3>Stage 3 — Feature iterations.</h3><blockquote>Team: 2 Developers<br>Main focus: test and try features for specific domains to make these domains logically complete.</blockquote><p>While this part is quite small for changes — and may not contain any radical changes in structure, I think it’s quite important on this stage to follow two principles:</p><p>- Keep refreshing, refining, and updating <em>domain knowledge</em> from testing and using the application.</p><p>- Keep every small feature <em>implementation separate</em> from the screen where it is placed. Treat the screen as a layout where you place widgets, and it would be much easier to reuse any feature-related widgets, as they will behave as self-contained micro applications.</p><p>This ends the first three stages of thoughts about scalable architecture approach.</p><p>Thank you for your time, to continue, use a link below.</p><p>Please don’t forget to clap hands and share your thoughts in comments:) it really helps the algorithms give this article to others to read, and it would be great support from you:)</p><p><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3">Next -&gt; Stage 3,4,5 and Conclusion</a></p><h4>App Architecture Series</h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes — Previous</a><br><a href="https://medium.com/p/f532a4774e0e">Part 2 — Stage 1 and 2 — <em>Y</em>ou are here:)</a><br><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion — Next</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f532a4774e0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter app AI centric architecture for small startups. Intro notes.]]></title>
            <link>https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-intro-notes-99a028adc9e5?source=rss-22437fa6a980------2</link>
            <guid isPermaLink="false">https://medium.com/p/99a028adc9e5</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[code-structure]]></category>
            <category><![CDATA[app-architecture]]></category>
            <dc:creator><![CDATA[Anton Malofeev]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 09:22:43 GMT</pubDate>
            <atom:updated>2025-08-27T23:37:59.051Z</atom:updated>
            <content:encoded><![CDATA[<h4>Thoughts about scalable code structure based on developer as user philosophy combined with iterative design using ai.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIAMy3QXfckP_622icEVXQ.jpeg" /><figcaption><em>Imaginary futuristic device running clock:) Who knows how devices end up looking? 👀 Generated in </em><a href="http://leonardo.ai/"><em>Leonardo</em></a><em> AI and </em><a href="https://computer.tldraw.com/"><em>computer.tldraw.com</em></a></figcaption></figure><p>In a series of articles, I would like to share my thoughts about how to structure codebase and use different approaches for architecture structure scaling through different stages of product growth.</p><h4><strong>App Architecture Series</strong></h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes — <em>You are here:)</em><br></a><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-2-stage-1-2-f532a4774e0e">Part 2 — Stage 1 and 2 — <em>Next</em></a><br><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion</a></p><h3><strong>Note One. </strong><em>Inspire and adapt.</em></h3><p>All my thoughts are based on my own experience from having made some decisions and over time watching some of those decisions prevail or fail. It is my reflection of what is possible to do and how, not strict guidelines to follow, but rather instead — to <em>inspire and adapt</em>.</p><p>It may or may not complement in some cases general development approaches, especially in large companies or recently published <a href="https://docs.flutter.dev/app-architecture">https://docs.flutter.dev/app-architecture</a> amazing guide.</p><p>Instead, I will <em>focus only on startup early stages</em>, for those who take a journey starting from a single Flutter developer and look for a way ahead to scale it up to several (let’s take a five-six) developers in the company when needed.</p><h3>Second Note. Different perspective.</h3><p>Product development and ordered product in-studio paths can be completely different, so my advice is to skip stages if needed, aligning with your personal experience.</p><h3><strong>Third Note. Developer as a user.</strong></h3><p>During texts, I will treat developer as a user — imagine project code structure via folders and file structures first — in the same way most developers look at their code. For me, it was a great discovery that it is the most convenient way to hand your work over for maintenance or feature changes.</p><p>Part of that discovery was watching a video of <a href="https://youtu.be/Nsjsiz2A9mg?t=527">Clean Architecture and Design</a> , other parts include <a href="https://en.wikipedia.org/wiki/Domain-driven_design">Domain Drive Development or DDD</a> <a href="https://en.wikipedia.org/wiki/Domain-driven_design,">,</a> Test Drive Development or TDD<strong>,</strong> and just a <em>development routine</em>, and I hope to continue this journey along the way:)</p><blockquote>Simply put, you define the code structure, which declares how your code will communicate, and then apply your preferred architecture patterns to it.</blockquote><h3><strong>Fourth Note. Prompts.</strong></h3><p>As of January 27, 2025, it is evident that many developers utilize AI tools to explain code or quickly prototype solutions. Therefore, when the term ‘prompt’ is mentioned, it refers to a saved question or response generated by an AI tool in text format.</p><h3><strong>Fifth Note. AI.</strong></h3><p><em>Before development or at any stage.</em></p><p>Create your own AI preferences / agent-rules for your favorite AI tool and project-wide preferences, so other developers can use it in the future. For example, if you use Cursor, you can find useful rules <a href="https://cursor.directory/">https://cursor.directory</a>.</p><p>Keep in mind that it should always be part of your architecture — you will iterate over these rules, roll back, write, rewrite, test it, etc. So, treat it just as a part of your codebase.</p><p>In the same time, since this is quite a new approach, it’s a quite experimental technique to use it and may produce unpredictable results. Be careful and always rely on your skills.</p><h3><strong>Sixth Note. </strong>Terminology.</h3><p>Let’s <em>define the meanings of several key terms</em> (while there are many, we need to focus on these to ensure a clear context for the notes):</p><h4><strong>1. End user</strong></h4><p>a user, who uses the application on any platform available — iOS, Android, macOS, Windows, Linux, web, etc.</p><h4><strong>2. Domain</strong></h4><p>logically defined and restricted by its subject area (scope) in your application, defined by end user experience combined with application functionality.</p><p><a href="https://en.wikipedia.org/wiki/Domain_(software_engineering)">https://en.wikipedia.org/wiki/Domain_(software_engineering)</a></p><blockquote><strong><em>Complex App Example:</em></strong></blockquote><blockquote>Imagine a financial app and you are the end user.</blockquote><blockquote>You may expect the following logical domains:</blockquote><blockquote>- <strong>Intro.</strong> Guide how to use the application, or quiz, or news — some screens that may appear before Home appears.</blockquote><blockquote>- <strong>Home.</strong> Specific to home functionality, most frequent features that the user uses. This domain may or may not use features from other domains. As the user expects it to be fast to use, let’s call it fast functions experience.</blockquote><blockquote>- <strong>Payments.</strong> You may expect that the main screen will lead to other screens, such as bank providers, digital transfers etc.. but all these screens will be logically tied to a single subject (scope) of payment experience.</blockquote><blockquote>- <strong>Profile.</strong> The end user can expect that he can sign in/ sign out, can delete his account, go to privacy settings, check some documents. Let’s call it profile experience.</blockquote><blockquote>- <strong>Support.</strong> This domain may have a screen with chat, it may have different conversations in different screens, but at the same time all of them will define a subject of support experience.</blockquote><p>To develop each domain, you will have to capture how end users or experts, specialists experience it or experience it by themselves.</p><p>Or in other words — you will have to define and research domain knowledge.</p><h4><strong>3. Domain knowledge</strong></h4><p>“is knowledge of a specific discipline”, captured from domain experts/specialists by analytics, designers or through iterative design, your own experience or work.</p><blockquote><em>In our case it would be </em>the experience of the end user<em> who uses your app.</em></blockquote><p><a href="https://en.wikipedia.org/wiki/Domain_knowledge">https://en.wikipedia.org/wiki/Domain_knowledge</a></p><h4>4. Flow</h4><p>a one screen or series of screens, pages or views orginized in certain direction from user perspective. For example — Auth Flow.</p><h4>5. Screen</h4><p><em>a widget, partially or fully covering a screen, consists of features placed on that screen / page / view.</em></p><p>Personally, I like the concept to treat any screen as a page as a view, which can be seen fullscreen or take part of the layout which is buildable with nested navigation (<a href="https://pub.dev/documentation/go_router/latest/go_router/ShellRoute-class.html">go_router navigation in Flutter</a>) and similar to how JS frameworks work in the web (<a href="https://router.vuejs.org/guide/essentials/nested-routes">vue-router</a>).</p><h4>6. Feature</h4><p><em>“distinguishing characteristic of a software item (e.g., performance, portability, or functionality)”.</em></p><p>Applying to the domain, let’s define it as a <em>single-purpose</em> particular capability/functionality, which in combination with other features helps the end user to experience the domain as a whole.</p><p><a href="https://en.wikipedia.org/wiki/Software_feature">https://en.wikipedia.org/wiki/Software_feature</a></p><p>Thank you for your time, to continue, use a link below.</p><p>Please don’t forget to clap hands and share your thoughts in comments:) it really helps the algorithms give this article to others to read, and it would be great support from you:)</p><p><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-2-stage-1-2-f532a4774e0e">Next -&gt; Stage 1 and 2</a></p><h4>App Architecture Series</h4><p><a href="https://medium.com/p/99a028adc9e5">Part 1 — Intro Notes — <em>You are here:)</em></a><br><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-2-stage-1-2-f532a4774e0e">Part 2 — Stage 1 and 2 — <em>Next</em></a><br><a href="https://medium.com/@antmalofeev/flutter-app-ai-centric-architecture-for-small-startups-part-3-stages-3-5-2cbc9cc7ebf3">Part 3 — Stage 3,4,5 and Conclusion</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99a028adc9e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>