<?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 Nitay Rabinovich on Medium]]></title>
        <description><![CDATA[Stories by Nitay Rabinovich on Medium]]></description>
        <link>https://medium.com/@nitayrabi?source=rss-e8ca8e298858------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mcOGIo21q1TS-b1j6wAZUg.jpeg</url>
            <title>Stories by Nitay Rabinovich on Medium</title>
            <link>https://medium.com/@nitayrabi?source=rss-e8ca8e298858------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:26:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nitayrabi/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[Agentic Software Delivery in a Single Command: I Swear, It’s That Simple]]></title>
            <link>https://medium.com/wix-engineering/agentic-software-delivery-in-a-single-command-i-swear-its-that-simple-0795752d4e25?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/0795752d4e25</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[harness-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 06:57:56 GMT</pubDate>
            <atom:updated>2026-06-16T06:57:56.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSfjGvuNl2LH-Stre-SVXw.png" /></figure><p><strong>Follow this article and you’ll end up with an AI agent that fixes GitHub issues for you: from issue to verified pull request, without touching your personal computer. (and with with a coding agent of your choice)</strong></p><ol><li>Here’s what it looks like in action:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0onYdjXURVsYUpzo6F46tg.gif" /></figure><p>2. And here’s the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gM4l60uO63axJ2e1TwiXtA.png" /></figure><p>If you have spent any time in the developer ecosystem recently, you know that <strong>“loops”</strong> are the hyped word of the month (as discussed in this <a href="https://x.com/mvanhorn/article/2063865685558903149">deep dive on agentic loops</a>).</p><p>This shift was captured perfectly by Peter Steinberger, who shared:</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/steipete/status/2063697162748260627&amp;image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fpbs.twimg.com%252Fprofile_images%252F1131851609774985216%252FOcsssQ9J_200x200.png%26key%3Da19fcc184b9711e1b4764040d3dc5c07" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ba9a6249f2161bc9033c7cb17c3b082/href">https://medium.com/media/7ba9a6249f2161bc9033c7cb17c3b082/href</a></iframe><p>Instead of manually prompting an inline chat assistant, the real power of AI comes from closed-loop systems: agents that can pick up an issue, work on it in an isolated environment, validate the result, and open a verified pull request.</p><p>In this article, we’ll show how to move from AI-assisted development to an automated, agentic software delivery workflow: in a single command.</p><h3>What is an Agentic SDLC (Software development lifecycle)?</h3><p>An Agentic SDLC is a software development lifecycle where AI agents do more than suggest code. They execute work.</p><p>Instead of asking developers to manually handle every small bug fix, documentation update, test case, or refactor, we delegate those tasks to specialized agents. Each agent operates in a controlled environment, follows a defined workflow, validates its own changes, and produces a pull request that a human can review.</p><p>In a traditional setup, when a bug is reported:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKkP9vRHbhmHtx7cIfG0HA.png" /></figure><ol><li>A human developer stops what they are doing and context-switches.</li><li>They checkout a new branch, reproduce the issue, and prompts an agent to fix the issue.</li><li>They run the compiler, run the tests, and fix any secondary errors.</li><li>They commit, push, and open a pull request.</li></ol><p>In an Agentic SDLC, the developer’s role shifts from <em>execution</em> to <em>orchestration and review</em>. The agent handles the tedious execution loop, leaving the human to make high-level design decisions.</p><p>An <strong>awesome</strong> example of a <strong>local-first</strong> agentic SDLC is <a href="https://github.com/mattpocock/sandcastle">Sandcastle</a> by Matt Pocock.</p><p>Defined as “A TypeScript library for orchestrating AI coding agents in isolated sandboxes”, but it’s so much more and If you’re not familiar, I recommend watching: <a href="https://www.youtube.com/watch?v=E5-QK3CDVQM">https://www.youtube.com/watch?v=E5-QK3CDVQM</a></p><p>Sandcastle serves as an incredible showcase of running code modifications, tests, and validations inside a safe, local sandbox: proving just how powerful and seamless local-first developer automation can be.</p><h3>Using GitHub Actions and ACPX</h3><p>While local-first workflows are great, the real goal of an agentic SDLC is running in a fully unattended, “no-pilot” background mode: For example, allowing the automation to run in the cloud asynchronously whenever there is repository activity on GitHub. This is where GitHub Actions and ACPX come together..</p><p>To make this remote, autonomous loop work seamlessly, two components are required:</p><ol><li>a dedicated flow that combines deterministic and agentic steps (built using ACPX)</li><li>An automation engine to execute it. (that’s where GH actions come in)</li></ol><h3>What are ACP and acpx?</h3><p>To understand how this setup works, it helps to separate the protocol from the tool:</p><ul><li><a href="https://agentclientprotocol.com/"><strong>ACP (Agent Client Protocol)</strong></a> is the underlying open standard designed to standardize communication and facilitate coding agents and their host environments.</li><li><strong>acpx</strong> (hosted at <a href="https://github.com/openclaw/acpx">openclaw/acpx</a>) is the CLI client that runs, manages, and combines multiple ACP-compliant agents. You can learn more about its core principles at <a href="https://acpx.sh/">acpx.sh</a>.</li></ul><p>The superpower of ACPX lies in its <strong>flows</strong>. An ACPX flow is a state machine that allows developers to seamlessly combine:</p><ul><li><strong>Agentic steps</strong>: Cognitive tasks where an LLM inspects the codebase, reasons about a problem, and writes a code modification.</li><li><strong>Deterministic steps</strong>: Reliable, script-based actions like fetching issue details from an API, running a test suite, committing files to Git, or making a HTTP request.</li></ul><h3>GitHub Actions</h3><p>While GitHub Actions are traditionally used for standard Continuous Integration (CI), they are actually the perfect environment for a closed-loop agentic workflow.</p><p>By utilizing GitHub’s event-driven infrastructure, we can easily configure a runner to spin up whenever a specific event occurs — such as a developer labeling an issue with auto-fix. The runner checks out the repository, initializes an ACPX flow, hands the context over to your chosen AI coding agent, and lets it work in the cloud. Once the agent is done, the runner commits the changes and opens a PR.</p><h3>My Single Command Offer for You</h3><p>Setting up the configuration files, workflows, and secret sharing for such a loop from scratch can be tricky. That is why <strong>ghloop</strong> was created to get you started.</p><p>With a single, simple command, you can scaffold a fully-functioning, agentic loop in your repository:</p><pre>npx ghloop init</pre><p><a href="https://github.com/code-rabi/ghloop"><strong>It’s fully open-sourced and available.</strong></a></p><h3>How It Works</h3><p>When you run npx ghloop init in your terminal, an interactive CLI guides you through a few quick questions:</p><ol><li><strong>Flow Name</strong>: Give your automation flow a name (e.g., issue-label-agent).</li><li><strong>Choose your Coding Agent</strong>: Select your preferred AI companion. ghloop lets you select any <a href="https://github.com/openclaw/acpx#built-in-agents-and-custom-servers">ACPX-supporting coding agent</a>.</li><li><strong>GitHub Issue Label</strong>: Decide which label will trigger the loop (defaulting to auto-fix).</li></ol><h3>What It Generates</h3><p>ghloop scaffolds two files directly into your repository:</p><h4>1. .github/workflows/&lt;flow-name&gt;.yml</h4><p>This is your remote orchestrator. It listens for the labeled event on your repository issues. If the label matches your target (e.g., auto-fix), it spins up a runner, installs Node.js, sets up your selected coding agent, and runs our reusable GitHub Action: code-rabi/ghloop/.github/actions/run-acpx-flow@main.</p><h4>2. flows/&lt;flow-name&gt;.ts</h4><p>This is a state-of-the-art ACPX flow written in TypeScript. It defines a clean, 3-stage state machine:</p><ul><li><strong>load_issue</strong>: A deterministic shell command that uses the GitHub CLI (gh) to pull down the issue&#39;s title, body, and labels.</li><li><strong>implement</strong>: The agentic step where your chosen coding agent is loaded. It is given full access to the workspace and the issue context, allowing it to modify code and verify its work.</li><li><strong>publish</strong>: A deterministic step that inspects the workspace for modifications. If changes are detected, it creates a new Git branch, commits the files, pushes them to origin, opens a beautiful pull request, and leaves a descriptive comment on the original issue. If no changes were needed, it gracefully comments on the issue explaining why.</li></ul><h3>Secret Configuration</h3><p>To run the workflow, you need to configure two main pieces of authentication in your repository:</p><ol><li><strong>GitHub Token</strong>: A token with repository access to view issues, create branches, and open pull requests. You can follow GitHub’s guide on <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens">managing personal access tokens</a> to set this up.</li><li><strong>Agent API Key</strong>: The authentication key required by your chosen coding agent (e.g., GEMINI_API_KEY, ANTHROPIC_API_KEY).</li></ol><p>Both credentials should be securely configured as repository secrets. For details on storing these keys, see GitHub’s guide on <a href="https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions">using secrets in GitHub Actions</a>.</p><h3>Make it yours</h3><p>Once you have your first issue-to-PR loop running, the possibilities are virtually limitless. You can easily extend this model to build a highly-sophisticated, self-healing software factory:</p><ul><li><strong>Specialized Multi-Flows</strong>: Create separate flows for different tasks. You could have a write-tests flow triggered by a label, a code-review flow triggered on PR creation, or a generate-docs flow to keep your markdown pages updated.</li><li><strong>Automated Issue Generation</strong>: Right now, a human labels an issue to start the loop. But what if the issues themselves were generated by machines?</li></ul><p><strong>The “Self-Healing” Production Loop</strong>: You can set up a simple CRON-scheduled GitHub Action that periodically gathers logs or queries your error-monitoring tools (like Sentry or Datadog).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-7A6t7puVFsib12mvGWhw.png" /></figure><p>When it detects a spike in unresolved 500 Internal Server Errors, the action automatically opens a GitHub issue containing the stack trace and labels it auto-fix.</p><p>This instantly triggers your workflow letting the coding agent isolate the bug, write a regression test, implement the fix, and submit a verified pull request for your review.</p><h3>Bottom line</h3><p>When you open your laptop in the morning with your cup of coffee, you aren’t greeted with an emergency production fire. Instead, you’re greeted with a polite, fully-tested pull request that resolves the issue. All that’s left for you to do is review the code and click <strong>Merge</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TJq-X9guzZ0CLrcHHrwlRA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0795752d4e25" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wix-engineering/agentic-software-delivery-in-a-single-command-i-swear-its-that-simple-0795752d4e25">Agentic Software Delivery in a Single Command: I Swear, It’s That Simple</a> was originally published in <a href="https://medium.com/wix-engineering">Wix Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taking background agents to the foreground]]></title>
            <link>https://medium.com/@nitayrabi/taking-background-agents-to-the-foreground-ac7aca244873?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac7aca244873</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 20:23:51 GMT</pubDate>
            <atom:updated>2026-02-23T08:55:21.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0QhylzAY845Kmxsnc4OKg.png" /></figure><p>If you’re using Cursor and wondering whether background agents actually save time (or just create cleanup chaos), this is for you. By the end, you’ll have a practical feel for when to stay on the main thread, when to run local background flows, and when to offload work remotely.</p><h3>The disclaimers</h3><ul><li>This is not an article about empirical evidence; you won’t see evals showing one method beating another, or token counts that make your wallet file a formal complaint.</li><li>This is just the story of the methods I used so far, most likely already obsolete due to some meme/methodology that became the next big thing.</li><li>Like using a strainer to fillet a fish, some tasks work better with some methodologies. Also, some people prefer some methodologies; I never got hooked on VIM (or remembered how to exit), but I still respect the VIM crowd as full-grown adults nonetheless.</li></ul><h3>The main thread</h3><p>Before getting to the background, it’s important to note that I always have a main thread, with me piloting. Several times I found myself sending Codex web into a long-running task, only to immediately open my IDE and say to myself, “wait, why am I not doing it myself?”</p><p>There’s priority, and not everything needs to go to the background. My rule of thumb is: if it requires periodic review (UI, modeling an interface, and more), I should pilot the agent and see how it goes.</p><h3>Background (local) agents</h3><h3>What do I use</h3><p>I’m using <a href="https://www.vibekanban.com/">Vibe Kanban</a>. I know there are many methodologies (see <a href="http://but/">bucket list</a>) right now for working locally; I heard some recommendations about it, and it was one command to install, so I kept using it.</p><h3>What is it</h3><p>Vibe Kanban is open-source software that lets you manage tasks (both high-level kanban board and specific task view) and run coding-agent CLIs (they support a lot!) directly on your machine using worktrees (so you can keep working on the main thread).</p><h3>How do I use it</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfMqFF16u9B3AuU9mmoJuw.png" /></figure><p>I structured a simple process to use Vibe Kanban that worked for me.</p><ol><li><strong>Plan:</strong> I ask the agent to make a plan. It can be your IDE plan mode, or just ask it to write a markdown file; the important part -&gt; it has to be in the filesystem so other agents can access it.</li><li><strong>Ops:</strong> Instead of clicking “Build” (or whatever the UI says), you ask your main-thread agent to use Vibe Kanban MCP to create tasks, and then write an execution plan (what needs to happen first, which tasks get parallelized).</li><li><strong>Execution:</strong> I essentially use my main-thread agent to start the tasks in order, while I’m working on something else.</li><li><strong>Review:</strong> A nice thing about Vibe Kanban is the review for each task. You can comment on each section and ask for changes, rebase and solve conflicts, and merge back to a local branch.</li></ol><p>This can be automated much further, and there are a lot of different tools (bucket list) offering different approaches here. I liked the semi-autopilot because what you gain in parallelism you later pay for with cleanup and integration.</p><h3>What did I use it for</h3><h4>Greenfield personal project</h4><p>Personal projects are amazing. You always feel you’re building something nobody ever did in the world, and you’re the only one doing it… only to find out it’s one of Y Combinator’s “most wanted next startups.”</p><p>So I chose to create an AI hedge fund with analyst agents, decision agents, even a retro agent fine-tuning all other agents’ prompts each week, all on a full calendar to schedule stock screening, analysis, rebalance, and retro.</p><p>How did it go</p><p>The good: Real joy of creation. At this stage there are fewer process constraints — mostly you and a team of hardworking models turning ideas into working software. It’s amazing to see how an idea turns into markdown, then into a full-blown backend, frontend, complex async task queues, and more, all taking form in minutes.</p><p>The bad: Amazing on breadth, but back to the main thread when it comes to putting it all together. The UI would load, but 50% of it was connected to the BE; the rest was marked as open tasks that you never reviewed (the mayhem of personal projects).</p><h4>Enterprise large monorepo</h4><p>I took an example task: a rewrite of a moderate-sized frontend package from one design system to another. I used a skill that described the migration details, then used my main-thread agent for the plan.</p><p>How did it go</p><p>The good: It worked, it was able to rewrite the panel, and it split the work in a reasonable way.</p><p>The bad: It split the work a bit too much, causing review and worktree-merge overhead that was arguably more time-consuming.</p><p>I wanted to compare a complete “main thread workflow” flow of plan-and-execute, and it took a similar amount of time, without the merging and reviewing overhead, with similar or even better accuracy (as I was piloting some of the decisions along the way).</p><h3>Background (remote) agents</h3><h3>What do I use</h3><p>I’m using Codex web. I tried Jules and didn’t like the quality; Cursor’s background-agents max mode requirement was a pass for me; and I didn’t get to try Claude’s web version. Also, Codex web (and its integrations) is simply awesome IMO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r87EVtemagfGeg9aEIXPGQ.png" /></figure><p><em>Note: I also took it a step further and self-deployed Vibe Kanban on an older PC I had at home, essentially making Vibe Kanban a non-vendor-locked background-agent setup.</em></p><h3>What is it</h3><p>Fully remote background agents run in cloud-hosted environments, so they can execute tasks asynchronously without using your local machine’s compute or requiring your IDE to stay open. Codex web allows you to connect a repo and provide environment details (setup, verification, agent web access, etc…).</p><h3>How do I use it</h3><p>I’m using most of the features Codex has to offer:</p><ol><li>I can walk my dog at night while I have some issue/feature in mind; I can open Codex web and explain in detail (transcribing) what to do.</li><li>I used <a href="https://detail.dev/">Detail Dev</a> to review the codebase, synced issues to Linear, and from there sent Codex to resolve them.</li><li>I’m using both Codex reviews and GH Copilot to review the code, then I can tag Codex to fix it and update the branch.</li></ol><p>A note about transcribing: The gap between you and 10X is the cringe of talking to your phone or computer to dictate code. Speaking works better than writing; good luck with the team around you — this is our time’s version of a very noisy keyboard.</p><h3>What did I use it for</h3><h4>Mature personal project</h4><p>Calling it a personal project is a bit of an understatement. It just isn’t enterprise software; it’s deployed, people use it, and you don’t want it to break.</p><p>In my case it’s <a href="https://moneytrail.ai/?utm_source=medium">MoneyTrail.ai</a>, if you want to <a href="https://medium.com/venturehq/can-we-map-how-money-moves-through-the-world-1141241c3817">read more</a>.</p><p>How did it go</p><p>The good: There’s almost no longer a concept of chores. I can offload a lot of small polish work and minor fixes directly to an agent, and focus my time on the bigger, more challenging problems.</p><p>The bad: There aren’t a lot of bad things to say; it really is very, very good. The web UI sometimes gets stuck, but other than that, it’s a real solid product.</p><p>Compared with a complete “main-thread workflow” of plan-and-execute, total time was similar, but I had less local context switching.</p><h3>Final verdict</h3><p>Background agents work best when you treat them like a team you manage, not autopilot.</p><p>To make either local or remote flows work better:</p><ol><li>Setup and verification: Any background agent needs clear setup instructions and a reliable way to verify nothing broke.</li><li>Proper context: Write proper agents.md and use gradual disclosure; this matters in general, but even more for background agents.</li><li>Choose what to parallelize: Review the ops plan carefully to avoid redundant, too-small tasks that create review overhead.</li><li>Built-in review checkpoints: A separate review pass catches issues you miss while writing. Include dedicated review tasks in your main-agent guidance.</li></ol><p>For routing decisions, local background agents reduce cloning/setup overhead but add management overhead for merges and review (instead of PRs). Remote agents are great when you want asynchronous execution and fewer local context switches. In practice, choose based on task shape: offload repetitive small fixes quickly, and route tricky rabbit-hole bugs to the environment/tool that gives you the best deep focus and review loop.</p><p>Want to read Vibe Kanban’s take? <a href="https://www.vibekanban.com/vibe-guide#planning">they have a guide</a></p><h3>The bucket list</h3><p>There’s just so much… so, so much more. But I’ll put here the things I plan on trying next (or at some point):</p><ul><li><a href="https://github.com/openai/codex">OpenAI Codex</a>: I want to test out the new Codex App. heard amazing things about it and if it even just brings similar quality as the web application, I’m in.</li><li><a href="https://github.com/Yeachan-Heo/oh-my-codex">Oh My Codex</a>: I want to test whether this productivity layer reduces day-to-day friction or just adds one more abstraction to maintain.</li><li><a href="https://github.com/Yeachan-Heo/oh-my-claudecode">Oh My Claude Code</a>: I want to compare this with Codex-focused workflows and see if it improves speed without hurting review and merge hygiene.</li><li><a href="https://github.com/gsd-build/get-shit-done">Get Shit Done</a>: I want to see whether this is strong for structured parallel execution or better as a lightweight wrapper for quick bursts.</li><li><a href="https://github.com/AndyMik90/Auto-Claude">Auto-Claude</a>: I want to test how far autonomous execution can go before cleanup overhead cancels out the speed gains.</li></ul><p>We’re now managing entire teams of AI agents. Our role is to set them up for success by routing the right tasks and providing the right context to achieve strong outcomes. We’re all still figuring this out, so I’d genuinely love to hear how others are approaching it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac7aca244873" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Long-Context Problem Is Killing LLMs: RLM in TypeScript]]></title>
            <link>https://ai.plainenglish.io/bringing-rlm-to-typescript-building-rllm-990f9979d89b?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/990f9979d89b</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[agentic-rag]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 11:51:08 GMT</pubDate>
            <atom:updated>2026-01-08T09:33:42.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9jNzUxk4qMP1VADv_OdXug.png" /></figure><p>Large Language Models struggle with very large contexts. Long documents or complex data structures quickly exceed token limits or degrade reasoning when everything is placed into a single prompt.</p><p>Recursive Large Language Models (RLMs) address this by letting the model generate and execute code that recursively explores and processes context. Instead of seeing all the data at once, the model learns how to navigate it.</p><p><strong>This idea was originally described in Python-focused work:</strong></p><p><a href="https://alexzhang13.github.io/blog/2025/rlm/">https://alexzhang13.github.io/blog/2025/rlm/</a><br><a href="https://github.com/alexzhang13/rlm">https://github.com/alexzhang13/rlm</a></p><p>I recently open-sourced rllm, a TypeScript implementation of the RLM approach, designed for the JavaScript ecosystem.</p><p><strong>Repo: </strong><a href="https://github.com/code-rabi/rllm"><strong>https://github.com/code-rabi/rllm</strong></a></p><p><strong>Letting LLMs run code</strong></p><p>Allowing LLMs to write and execute code is already a widespread and powerful idea. We see it in systems like code mode, tool calling, and agent frameworks. RLMs build on this foundation by making code execution the core reasoning mechanism rather than a side feature.</p><p>This approach opens the door to much richer interactions with large and structured data. Instead of summarizing raw text, models can iterate over trees, filter datasets, and decompose problems dynamically.</p><p><strong>Why TypeScript?</strong></p><p>rllm is built to work naturally in Node, Bun, and Deno environments:</p><ul><li>Runs model-generated code in V8 isolates for sandboxed execution</li><li>Uses Zod schemas to describe structured context to the model</li><li>Avoids Python subprocesses or external services</li><li>Fits cleanly into existing TypeScript codebases</li></ul><p><strong>Minimal example</strong></p><pre>import { createRLLM } from &quot;rllm&quot;;<br>const rlm = createRLLM({ model: &quot;gpt-4o-mini&quot; });<br>const result = await rlm.completion(<br>  &quot;What are the key findings in this document?&quot;,<br>  { context: hugeDocument }<br>);<br>console.log(result.answer);</pre><p>The key benefit is that the model can explore hugeDocument step by step rather than consuming it all at once.</p><p><strong>Closing thoughts</strong></p><p>Recursive execution models like RLMs feel like a natural next step for LLM systems. As models improve at writing code, giving them safe and structured execution environments enables more scalable reasoning over large data.</p><p>If you are working with LLMs in TypeScript and want to experiment with this idea, I would love your feedback.</p><p><strong>Repo: </strong><a href="https://github.com/code-rabi/rllm"><strong>https://github.com/code-rabi/rllm</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=990f9979d89b" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/bringing-rlm-to-typescript-building-rllm-990f9979d89b">The Long-Context Problem Is Killing LLMs: RLM in TypeScript</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can We Map How Money Moves Through the World?]]></title>
            <link>https://blog.venturemagazine.net/can-we-map-how-money-moves-through-the-world-1141241c3817?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/1141241c3817</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 13:23:51 GMT</pubDate>
            <atom:updated>2025-11-17T18:55:20.109Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iRFkj5Wsho3kSRZ3WUUO0A.png" /></figure><h3>Where Does the Money Go?</h3><p>It started with a simple question over drinks at a bar: “Can we create a map of how money moves in the world, from the seed all the way up to the beer we’re drinking?”</p><p>Behind that joke was a serious idea: if we could trace those connections, we might better understand how power, ownership, and capital really flow. That idea eventually became MoneyTrail.</p><h3>The Vibe Coded Beginning</h3><p>As the technically-inclined one in the conversation, I couldn’t resist the challenge. I went home and vibe-coded an initial version: a rough prototype that attempted to visualize ownership relationships in the financial world. It pulled in basic ownership data from public filings and government record, just enough to sketch the edges of a much bigger system.</p><p>We arbitrarily started from the U.S. government and traced ownership relations outward from there. The result was somewhat stunning. Flawed, but beautiful. Like a galaxy of money, a thought experiment brought to life through code. It was a proof of concept that maybe, just maybe, we could actually map these invisible connections.</p><p>The early version had many limitations. The data was incomplete. The visualization was clunky. The relationships were surface-level. But it showed us something important: there was a story here worth telling, and a map worth building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7PqTMFa-FzT5eUfL8G8x3g.png" /><figcaption>The first draft. Goverment connections shpere (blue) and ownership connections cloud (yellow)</figcaption></figure><p>We shared that early prototype with friends and some Redditors. The response surprised us — people were intrigued. They wanted to explore these connections themselves. They had questions we hadn’t even thought to ask.</p><p>And that moment clarified what MoneyTrail actually is: a tool for understanding how financial systems connect, behave, and influence each other. So we pushed forward.</p><h3>From Prototype to Product</h3><p>We got better data. We restructured the application from the ground up, making it more functional and intuitive. We added features that made exploration easier and more meaningful.</p><p>But as the amount of data grew, seeing everything in a single map became overwhelming, slow, and hard to manage. We needed better dedicated maps — focused views that let you explore specific financial systems without the noise. That’s when we introduced <strong>maps.</strong></p><p>These views weren’t just “smaller maps” — they were lenses. Each one showed a financial system as a standalone organism, with its own structure, relationships, and inner logic.</p><p>Have you ever imagined how an ETF visually looks? What does the S&amp;P 500’s network of relationships actually look like? We wanted to find out, and dedicated maps let us explore these questions properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PAt4SjCSEYJDxmnz7QqPQ.png" /><figcaption>S&amp;P 500 by MoneyTrail. go have a look at <a href="https://moneytrail.ai/?utm_source=medium">moneytrail.ai</a></figcaption></figure><p>And then we built something that changed everything: Notebook mode. Think NotebookLM, but for financial research.</p><p>Notebook mode is the investigative layer where users can trace trails by adding companies and entities one by one (or by chatting). Each addition expands the network, uncovering systems that might otherwise remain hidden. It transforms MoneyTrail from a visualization tool into a discovery platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*PQXGvhnwqJTpH2N-YWz67g.gif" /><figcaption>Notebook mode, using AI to discover networks of relations.</figcaption></figure><p>Lester (our AI assistant) can add data to the graph, find connections, and deep dive into SEC documents.</p><blockquote>Want to use Lester today? currently we’re in closed beta phase and you can apply <a href="https://moneytrail.ai/notebook">here</a>.</blockquote><h3>The Future: Where We’re Going</h3><p>The road ahead is open, and there are a lot of paths we could take. Should we get more data, or more types of data? Add more features? Explore different kinds of money trails? We’re not entirely sure yet.</p><p>But what is certain: sharing MoneyTrail in the first place was an amazing experience. The questions people asked, the connections they discovered, the trails they traced — it showed us we were onto something. And now it’s time to share again, opening facets of MoneyTrail we haven’t shared yet.</p><h3>Try It Yourself</h3><p>If you’re curious about how money moves through the world’s financial systems (or just love beautiful visualizations), we’d love for you to try MoneyTrail. Explore the connections. Ask questions. Build your own maps. And most importantly, share your feedback — we’re listening.</p><p><strong>Go have a look at: </strong><a href="https://moneytrail.ai/?utm_source=medium"><strong>MoneyTrail.ai</strong></a></p><p>We’ll keep you posted on our journey. <a href="https://x.com/MoneyTrail_ai">Follow us on [X/Twitter]</a> to stay updated as we continue building and discovering together.</p><p>Because in the end, discovery isn’t a destination. It’s a cycle.</p><p><em>MoneyTrail helps uncover the stories hidden in financial networks — transforming scattered information into connected understanding, and curiosity into clarity. Every trail tells a story about how the world works. What story will you discover?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1141241c3817" width="1" height="1" alt=""><hr><p><a href="https://blog.venturemagazine.net/can-we-map-how-money-moves-through-the-world-1141241c3817">Can We Map How Money Moves Through the World?</a> was originally published in <a href="https://blog.venturemagazine.net/">Venture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I turned an AI assistant into an investigative analyst using LittleSis]]></title>
            <link>https://ai.plainenglish.io/how-i-turned-an-ai-assistant-into-an-investigative-analyst-using-littlesis-1bcc96a9ecca?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bcc96a9ecca</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[investigation]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[corporate]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 08:49:35 GMT</pubDate>
            <atom:updated>2025-08-22T07:15:19.846Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Turning AI assistants into a corporate investigator</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X27wzNMh-Iu3RRhq" /></figure><h3>Finding Patterns in Corporate Connections</h3><p>Ever wonder who sits on the board of the companies that influence your daily life? Or which former government officials now work for the industries they used to regulate?</p><p>This information is all public: it’s in SEC filings, corporate announcements, and government records. The problem is that connecting these dots manually takes forever.</p><p>I got curious about these corporate networks but quickly realized I needed better tools. That’s when I found <a href="https://littlesis.org/">LittleSis.org</a>, a free database that maps connections between powerful people and organizations.</p><h3>Enter LittleSis: The Corporate X-Ray Machine</h3><p>LittleSis (as in “little sister is watching”) is a free database that does something remarkable: it maps the connections between powerful people and organizations. Think of it as LinkedIn for power brokers, but with a transparency mission instead of a profit motive.</p><p>The platform tracks:</p><ul><li>Corporate board relationships</li><li>Government-to-private sector revolving doors</li><li>Lobbying connections</li><li>Financial relationships between entities</li><li>Family and personal connections among elites</li></ul><p>What makes LittleSis special isn’t just the data — it’s that everything is sourced from public records, SEC filings, government documents, and news reports. <strong>It’s not conspiracy theories; it’s documented facts assembled into a coherent picture.</strong></p><p>But here’s the challenge: even with all this incredible data, manually exploring these networks is time-consuming and requires knowing exactly what to look for.</p><h3>Building My Watch Dog AI</h3><p>That’s where MCPs come in. I created the <a href="https://smithery.ai/server/@code-rabi/littlesis-mcp">LittleSis MCP</a> to turn my AI assistant into a corporate intelligence analyst that can instantly:</p><ul><li>Search for any person or organization in the database</li><li>Map out their network connections</li><li>Identify patterns and relationships across multiple entities</li><li>Generate comprehensive reports on corporate networks</li><li>Track how influence flows between sectors</li></ul><p>Instead of spending hours clicking through profiles and cross-referencing data, I can now ask my AI: <em>“Show me the connections between Tesla’s board members and renewable energy lobbying groups”</em> or <em>“What relationships exist between this pharmaceutical company and former FDA officials?”</em></p><p>Let’s see this in action —</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fx9IDU4S_-qc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dx9IDU4S_-qc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fx9IDU4S_-qc%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a73541078b6a9d6d6450658aa493e2a3/href">https://medium.com/media/a73541078b6a9d6d6450658aa493e2a3/href</a></iframe><h3>Real-World Applications</h3><p>This isn’t just about satisfying curiosity. The Watch Dog AI has practical applications across multiple domains:</p><h3>For Journalists and Researchers</h3><ul><li>Rapid background checks on sources and subjects</li><li>Uncovering potential conflicts of interest in stories</li><li>Mapping corporate influence in policy decisions</li><li>Identifying key players in complex business stories</li></ul><h3>For Investors and Due Diligence</h3><ul><li>Understanding the true power structure behind investments</li><li>Identifying potential regulatory risks through government connections</li><li>Mapping competitive relationships through shared board members</li><li>Discovering hidden conflicts that might affect business decisions</li></ul><h3>For Activists and Advocacy</h3><ul><li>Tracking corporate influence on policy issues</li><li>Identifying pressure points in lobbying networks</li><li>Understanding how different organizations connect to your causes</li><li>Building stronger accountability campaigns with factual data</li></ul><h3>For Anyone Who Cares About Transparency</h3><ul><li>Understanding who really influences the decisions that affect your life</li><li>Following the money in political and corporate decisions</li><li>Educating yourself about power structures in your industry or community</li></ul><h3>Getting Your Own Watch Dog</h3><p>Setting up the LittleSis MCP is straightforward — no API keys or complex authentication required. LittleSis provides free access to their data because transparency is their mission, not their product.</p><h3>Prerequisites: Node.js and Testing Option</h3><p>Want to try it right now? You can test the LittleSis MCP immediately in <a href="https://smithery.ai/server/@code-rabi/littlesis-mcp">Smithery’s playground</a> without any installation — just open it in your browser and start exploring corporate networks.</p><p>To use this MCP with Claude Desktop you need Node.js. If you don’t have it installed, download it from <a href="https://nodejs.org/">nodejs.org</a> (the LTS version is recommended). This automatically includes npx, which we&#39;ll use to run MCPs without installing them globally.</p><p>Alternative setup options:</p><ul><li>Claude Desktop users: Use the configuration below with Node.js installed</li><li>HTTP-compatible MCP clients: Connect using Smithery’s HTTP endpoint for easier integration</li></ul><p>Starter prompts to try:</p><ul><li><em>“Map out the board connections for [major corporation]”</em></li><li><em>“Show me government-to-private sector connections in [industry]”</em></li><li><em>“Find the relationships between [politician] and [company/industry]”</em></li><li><em>“What lobbying connections exist around [policy issue]?”</em></li></ul><h3>The Responsibility That Comes with Power</h3><p>With great transparency capabilities comes great responsibility. This tool reveals public information, but that doesn’t mean every connection represents wrongdoing. Context matters, and correlation isn’t causation.</p><p>Important guidelines:</p><ul><li>Verify independently — The AI provides starting points, not final conclusions</li><li>Consider context — Not every connection implies impropriety</li><li>Respect privacy — Focus on public roles and documented relationships</li><li>Think ethically — Use these insights to promote accountability, not harassment</li></ul><h3>Beyond Corporate Networks</h3><p>The LittleSis MCP represents something bigger than just business intelligence — it’s an example of how MCPs can democratize access to information that was previously available only to those with significant resources.</p><p>The pattern is the same: take valuable public data that’s technically accessible but practically difficult to use, and make it conversationally available through AI.</p><blockquote>If you could instantly map corporate power in your industry, what’s the first connection you’d investigate?</blockquote><p>Try the demo on <a href="http://Try the demo on Smithery and see what hidden networks you uncover today.">Smithery </a>and see what hidden networks you uncover today.</p><p>Want to read more about MCPs to improve your day to day and self management, read my article about <a href="https://medium.com/ai-in-plain-english/ai-super-human-building-your-ultimate-ai-workspace-d3ad82ba93d2">using AI to get to inbox zero and conflict free calendar</a>.</p><h3>Technical Resources</h3><p>MCP and AI Tools:</p><ul><li><a href="https://smithery.ai/server/@code-rabi/littlesis-mcp">LittleSis MCP</a></li><li><a href="https://smithery.ai/">Smithery MCP Marketplace</a></li><li><a href="https://modelcontextprotocol.io/">Model Context Protocol Documentation</a></li></ul><p>Data and Research:</p><ul><li><a href="https://littlesis.org/">LittleSis Database</a></li><li><a href="https://public-accountability.org/">Public Accountability Initiative</a></li></ul><p>Configuration Example:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;littlesis&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [<br>        &quot;-y&quot;,<br>        &quot;@smithery/cli@latest&quot;,<br>        &quot;run&quot;, <br>        &quot;@code-rabi/littlesis-mcp&quot;,<br>        &quot;--key&quot;,<br>        &quot;YOUR_SMITHERY_API_KEY&quot;,<br>        &quot;--profile&quot;,<br>        &quot;YOUR_SMITHERY_PROFILE&quot;<br>      ]<br>    }<br>  }<br>}</pre><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bcc96a9ecca" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/how-i-turned-an-ai-assistant-into-an-investigative-analyst-using-littlesis-1bcc96a9ecca">How I turned an AI assistant into an investigative analyst using LittleSis</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Super Human: Building Your Ultimate AI Workspace]]></title>
            <link>https://ai.plainenglish.io/ai-super-human-building-your-ultimate-ai-workspace-d3ad82ba93d2?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3ad82ba93d2</guid>
            <category><![CDATA[gmail]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 08:19:07 GMT</pubDate>
            <atom:updated>2025-08-18T16:10:42.759Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CD7ebQc8LVsFU5IiP6KapA.png" /></figure><p><em>How I finally became the super organized person I always wanted to be</em></p><h3>The Chaos I Used to Live In</h3><p>I’ve always admired those effortlessly organized people — you know the type. Zero inbox, perfectly scheduled calendars, never missing deadlines, always prepared for meetings. Meanwhile, I was drowning in:</p><ul><li>Over 11K unread emails.</li><li>Not blocking enough time and being swamped in meetings</li><li>Ideas scattered across sticky notes, random text files, and my phone</li><li>Endless context switching between tools and platforms</li><li>The constant guilt of knowing I <em>should</em> be more organized</li></ul><p>I tried every productivity system, app, and methodology. Nothing stuck. I wasn’t wired for that level of manual organization. My attempts, like creating complex Gmail rules, usually just ended up hiding important emails I’d never see.</p><h3>My AI-Powered Transformation</h3><p>Like many in tech, I was both overwhelmed and excited by the AI revolution. I immediately saw its potential to reshape my digital life. So I set out on a mission…</p><p>To create my own digital assistant, but unlike me, avoiding the pitfall of productizing it, imagining how it would become an amazing products for others, how can I generlize it, etc… I went hyperpersonlized for me.</p><h3>So what’s the recipe?</h3><ol><li><strong>AI Client</strong> — Any chat interface would do, with one critical rule — it must support MCPs. Without it, you’re limited to the AI client capabilites alone.</li><li><strong>Markdown</strong> — yes, simple markdown files will serve as my new digital mind.</li><li><strong>MCPs</strong> — These are tools to extend our AI client to better suit what we need.</li></ol><h3>AI Client</h3><p>There’s abundance of AI clients today that supports adding custom MCPs, I chose <a href="https://cursor.sh/">Cursor</a> (Not fair though, got a license through work) as I anyway use it for coding, but there are many alternatives even for non coders:</p><ol><li><a href="https://claude.ai/download">Claude Desktop</a> — Anthropic’s flagship desktop app with extensive MCP support through configuration files</li><li><a href="https://librechat.ai/">LibreChat</a> — Enhanced ChatGPT alternative supporting multiple AI providers and MCP integrations</li></ol><h3>Markdown</h3><p>I use <a href="https://obsidian.md/"><strong>Obsidian</strong></a> to manage my digital mind because of its clean interface and powerful community plugins. Tasks helps me organize to-dos with smart filters, while Excalidraw lets me sketch ideas — all in markdown files any AI can easily understand.</p><p>I particularly love the <a href="https://github.com/obsidian-tasks-group/obsidian-tasks">Tasks plugin</a> for managing my to-dos with powerful filtering and scheduling, and <a href="https://github.com/zsviczian/obsidian-excalidraw-plugin">Excalidraw</a> for creating diagrams and visual thinking directly within my notes.</p><h3>MCPs</h3><p>MCPs (Model Context Protocols) are like superpowers for your AI assistant, giving it permission to access and interact with your tools — like email, calendar, files, or finances. Instead of just chatting, your assistant can now take real actions for you, from scheduling meetings to analyzing documents.</p><h3>Finding the Right MCPs for You</h3><p>Need to connect your AI to specific tools? <a href="https://smithery.ai/">Smithery</a> is the unofficial app store for MCPs, where you can browse hundreds of community-created integrations for everything from Slack and Notion to smart home devices.</p><h3>Prerequisites</h3><ol><li>Most MCPs require Node.js to run. If you don’t have it installed, download it from <a href="https://nodejs.org/">nodejs.org</a>. Don&#39;t hesitate to use AI to assist you with the installation.</li><li>Google related MCPs require <a href="https://medium.com/p/d3ad82ba93d2#fd58">setting up an OAuth credentials JSON</a></li></ol><h3>Why Build Your Own Instead of Paying for AI Extensions?</h3><p>While major AI providers offer paid tiers with extensions, they come with significant limitations and costs. ChatGPT Plus ($20/month) and Claude Pro ($20/month) provide access to limited, pre-built tools that you can’t customize. These offerings are expensive for what you get and lock you into specific providers’ ecosystems.</p><p>Building your own MCP-powered setup gives you unlimited flexibility, works with any compatible AI client, and scales with your needs — all while potentially costing less than multiple AI subscriptions.</p><h3>Super Humaning</h3><p>Time to stop wishing we were organized and start making it reality.</p><h3>Zero inbox</h3><p>I recommend the <a href="https://smithery.ai/server/@shinzo-labs/gmail-mcp">Gmail MCP from Shinzo Labs</a> to connect your AI to Gmail. This MCP enables comprehensive email management, rule/filter management, and the developer is highly responsive to issues and feature requests.</p><p>Copy this prompt for your first cleanup (adjust as needed):</p><pre>Please help me achieve inbox zero by organizing my Gmail. Here&#39;s what I need:</pre><pre>1. Analyze my current emails and suggest an effective labeling system (use existing labels where possible, create new ones as needed)</pre><pre>2. Create smart filters/rules based on email patterns you identify - but ask me for each rule whether emails matching it should:<br>   - Stay in inbox with label applied<br>   - Skip inbox and go directly to the label</pre><pre>3. Process my emails page by page, applying the rules we create until my entire inbox is clean</pre><pre>4. Give me a summary of what was organized and the final rule set for future reference</pre><pre>Let&#39;s start with analyzing the first 50 emails and proposing the initial labeling strategy.</pre><p>Important Pitfalls to Watch:</p><ul><li>Review all rules carefully — AI may create filters that automatically hide important incoming emails from your inbox</li><li>Ask for explanations — Always have the AI explain what each rule does before applying it</li><li>This takes time — If you have thousands of emails, expect this to require multiple sessions and several prompts</li><li>Test incrementally — Don’t let AI process your entire inbox at once; go page by page so you can catch issues early</li><li>Keep a backup — Consider exporting important emails before starting the cleanup process</li></ul><p>Ideas for daily email management:</p><ul><li>Check my inbox and flag any urgent emails that need immediate attention</li><li>Draft replies to routine emails and queue them for my review</li><li>Summarize newsletters and long emails into key points</li><li>Identify emails that can be archived or deleted automatically</li></ul><h3>Calendar management</h3><p>I use the <a href="https://github.com/nspady/google-calendar-mcp">Google Calendar MCP</a> by nspady. It’s not in Smithery as the alternatives weren’t good enough at the time of writing. This MCP has a simpler auth flow and provides excellent calendar management tools.</p><p>The GOOGLE_OAUTH_CREDENTIALS path should point to the JSON credentials file you downloaded during the Google Cloud setup above. <a href="https://medium.com/p/d3ad82ba93d2#9aba">See example</a>.</p><p>Ideas for calendar management:</p><ol><li>Ask it to recognize conflicts later this week</li><li>Tell it to block time in the week for some tasks you have to do</li><li>Set a recurring time to go over emails and clean them (can mix with the Gmail MCP for automated cleanup)</li></ol><h3>The Dark Side: Risks and Disclaimers</h3><p>With great power comes great responsibility (and great clichés). Here are the real risks:</p><h4>1. Data Security</h4><p>Your AI now has access to everything. One misconfigured permission could expose sensitive data. Always audit access permissions.</p><h4>2. Automation Gone Wrong</h4><p>I once had my AI create a rule that automatically archived important client emails, causing me to miss critical communications. Start with read-only access.</p><h4>3. The Human Element</h4><p>AI makes mistakes that seem intelligent. Always verify critical decisions and communications.</p><h3>The Reality Check</h3><p>Before: Chronically disorganized, constantly stressed, always behind After: Effortlessly organized, proactive, ahead of deadlines</p><p>After: The person I’ve become is someone I genuinely like being. The time savings and cost reduction are just happy side effects.</p><h3>Final Thoughts</h3><p>Building an AI workspace isn’t about becoming dependent on technology — it’s about finally becoming the person you always wanted to be. For me, that was someone organized, proactive, and in control.</p><p>I’m not naturally organized. I never will be. But now I don’t have to be, because my AI handles the organization while I handle the human parts — the creativity, relationships, and strategic thinking.</p><p>The technology exists today. The tools are mature enough for production use. The only question is: are you ready to become the best version of yourself?</p><p><em>Have you built your own AI workspace? Share your setup and lessons learned in the comments below.</em></p><p>Want to dive deeper? Check out the <a href="https://modelcontextprotocol.io/">Model Context Protocol documentation</a> and start building your superhuman workflow today.</p><h3>Google Cloud Setup for Gmail and Calendar Access</h3><p>To give your AI assistant access to both Gmail and Google Calendar, you’ll need to create OAuth 2.0 credentials through Google Cloud Console. Here’s the step-by-step process:</p><p>1. Initial Project Setup</p><ul><li>Go to the <a href="https://console.cloud.google.com/">Google Cloud Console</a></li><li>Create a new project or select an existing one from the top dropdown</li><li>Make sure the correct project is selected in the top bar before proceeding</li></ul><p>2. Enable Required APIs</p><ul><li>Navigate to the API Library</li><li>Search for and enable the Gmail API for your project</li><li>Search for and enable the Google Calendar API for your project</li><li>Note: It may take a few minutes for the APIs to become fully active</li></ul><p>3. Configure OAuth Consent Screen</p><ul><li>Go to “APIs &amp; Services” &gt; “OAuth consent screen”</li><li>Choose “External” user type (unless you have a Google Workspace account)</li><li>Fill in the required app information:</li><li>App name (e.g., “My AI Assistant”)</li><li>User support email (your email)</li><li>Developer contact information (your email)</li><li>Add the following scopes in the “Scopes” section (optional but recommended):</li><li>https://www.googleapis.com/auth/gmail.readonly (for reading emails)</li><li>https://www.googleapis.com/auth/gmail.modify (for managing emails)</li><li>https://www.googleapis.com/auth/calendar.events (for calendar event access)</li><li>https://www.googleapis.com/auth/calendar (for full calendar access)</li></ul><p>4. Create OAuth 2.0 Credentials</p><ul><li>Go to “APIs &amp; Services” &gt; “Credentials”</li><li>Click “Create Credentials” &gt; “OAuth client ID”</li><li>Choose “User data” for the type of data that the app will be accessing</li><li>Add your app name and contact information</li><li>Choose “Desktop application” as the application type (Important!)</li><li>Give it a recognizable name (e.g., “AI Assistant Desktop Client”)</li><li>Click “Create”</li></ul><p>5. Download and Secure Your Credentials</p><ul><li>Download the JSON credentials file when prompted</li><li>Save it securely (e.g., ~/.config/google/credentials.json)</li><li>Never commit this file to version control</li><li>Note the file path — you’ll need it for MCP configuration</li></ul><p>6. Add Test Users</p><ul><li>Go to “OAuth consent screen” &gt; “Test users” under the Audience section</li><li>Add your email address as a test user</li><li>The OAuth consent will not allow you to proceed until the test user has been added</li></ul><h3>Technical Resources and links</h3><p>AI Clients:</p><ul><li><a href="https://cursor.sh/">Cursor IDE</a></li><li><a href="https://claude.ai/download">Claude Desktop</a></li><li><a href="https://librechat.ai/">LibreChat</a></li></ul><p>Markdown &amp; Note-taking:</p><ul><li><a href="https://obsidian.md/">Obsidian</a></li><li><a href="https://github.com/obsidian-tasks-group/obsidian-tasks">Tasks plugin</a></li><li><a href="https://github.com/zsviczian/obsidian-excalidraw-plugin">Excalidraw plugin</a></li></ul><p>MCP Resources:</p><ul><li><a href="https://modelcontextprotocol.io/">Model Context Protocol Documentation</a></li><li><a href="https://www.anthropic.com/news/model-context-protocol">MCP Announcement</a></li><li><a href="https://smithery.ai/">Smithery — MCP App Store</a></li></ul><p>Google Services:</p><ul><li><a href="https://console.cloud.google.com/">Google Cloud Console</a></li></ul><p>MCPs Mentioned:</p><ul><li><a href="https://smithery.ai/server/@shinzo-labs/gmail-mcp">Gmail MCP from Shinzo Labs</a></li><li><a href="https://github.com/nspady/google-calendar-mcp">Google Calendar MCP</a></li><li><a href="https://github.com/chrisdoc/hevy-mcp">Hevy MCP for fitness tracking</a></li></ul><h3>Complete MCP Configuration Example</h3><p>Here’s a complete .cursor/mcp.json configuration file with the MCPs mentioned in this article:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;gmail&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [<br>        &quot;-y&quot;,<br>        &quot;@smithery/cli@latest&quot;,<br>        &quot;run&quot;,<br>        &quot;@shinzo-labs/gmail-mcp&quot;,<br>        &quot;--key&quot;,<br>        &quot;YOUR_SMITHERY_API_KEY&quot;,<br>        &quot;--profile&quot;,<br>        &quot;YOUR_SMITHERY_PROFILE&quot;<br>      ]<br>    },<br>    &quot;calendar&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [&quot;@cocal/google-calendar-mcp&quot;],<br>      &quot;env&quot;: {<br>        &quot;GOOGLE_OAUTH_CREDENTIALS&quot;: &quot;/path/to/your/gcp-oauth.keys.json&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Replace YOUR_SMITHERY_API_KEY, YOUR_SMITHERY_PROFILE, and the credentials path with your actual values.</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3ad82ba93d2" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/ai-super-human-building-your-ultimate-ai-workspace-d3ad82ba93d2">AI Super Human: Building Your Ultimate AI Workspace</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easily manage state in Velo]]></title>
            <link>https://medium.com/@nitayrabi/easily-manage-state-in-velo-f69572b52f88?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69572b52f88</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[wix]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 13:37:57 GMT</pubDate>
            <atom:updated>2023-10-21T13:41:07.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THgqh-yDGc_LDTr8ATJGng.png" /></figure><p>This is a complimentary piece to <a href="https://medium.com/u/d38a9780548d">Shahar Talmi</a>’s article <a href="https://shahata.medium.com/state-management-in-corvid-2ebfa8740abd">State Management in Velo</a>, which I highly recommend reading.</p><h3>What’s Velo?</h3><p>If you’re not familiar with Velo, the tagline is — that Velo is a full-stack development platform that empowers you to rapidly build, manage, and deploy professional web apps (using Wix). <a href="https://www.wix.com/velo">Read more</a>.</p><h3>The issues we’ll resolve</h3><p>In this article, I intend to offer a solution to 2 separate yet related topics:</p><ul><li>Reflecting data on the DOM with ease.</li><li>Maintaining data between page navigations.</li></ul><h3>Reflecting data on the DOM</h3><p>Velo’s approach to interacting with Wix elements is an <strong>imperative </strong>approach. referring back to <a href="https://medium.com/u/d38a9780548d">Shahar Talmi</a>’s article, think <strong>JQuery — </strong>changes to the view are done on demand, leading to a lot of (sometimes convoluted) code responsible for just synchronizing what’s in-memory, into the view.</p><p>To resolve this issue, I chose to use an open-source library allowing me to create a simple way to <strong>define the state</strong> and <strong>subscribe to changes</strong> to the state. — <a href="https://github.com/pmndrs/zustand">Zustand</a>.</p><p>First let’s add the Zustand NPM package to our site by <a href="https://dev.wix.com/docs/develop-websites/articles/getting-started/resources/getting-started-with-velo-by-wix#step-2-enable-velo-dev-mode">opening Dev mode</a>, and adding the <a href="https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/working-with-npm-packages">Zustand npm package</a>.</p><p>Let’s define a way to create a store that would hold our state, we’ll set it in public/store.js (<a href="https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/overview/where-do-i-put-my-code#i-want-some-code-to-run-on-multiple-but-not-all-pages">Read more about where to put Velo files</a>)</p><pre>// public/store.js<br>import { createStore } from &#39;zustand/vanilla&#39;<br><br>export const store = createStore((set) =&gt; ({<br>    count: 0,<br>    increment: () =&gt; set(state =&gt; ({count: state.count + 1})),<br>    decrement: () =&gt; set(state =&gt; ({count: state.count - 1})),<br>})) </pre><p>We can then import our store in our page code, and use the subscribe method to reflect the change:</p><pre>// Home.c1dmp.js<br>import {store} from &#39;public/store&#39;<br><br>$w.onReady(function () {<br>    const {increment} = store.getState();<br>    <br>    $w(&#39;#counter&#39;).text = count.toString()<br><br>    store.subscribe(state =&gt; $w(&#39;#counter&#39;).text = state.count.toString());<br><br>    $w(&#39;#incrementButton&#39;).onClick(increment);<br>});</pre><p>In this example, with very little code, we’ve made sure that our counter text element would always reflect the count property in the state.</p><p>This is all very nice, but lately, I used <a href="https://jotai.org/">Jotai</a> and I really liked the take on atomic states. Using atomic state offers three key advantages:</p><ol><li>Simplicity: It simplifies state management, making code cleaner and more maintainable.</li><li>Fine-Grained Control: Developers can precisely control updates and access for individual state items, improving performance.</li><li>Flexibility: Atomic states can be easily composed and customized, adapting to various application needs.</li></ol><p>By using createStore we can expose a simpler method to create a single atomic state —</p><pre>// public/store.js<br>import { createStore } from &#39;zustand/vanilla&#39;<br><br>export function atom(initialValue) {<br>  // Create a store for a single value<br>  const {subscribe, getState, setState} = createStore(() =&gt; ({<br>    value: initialValue,<br>  }))<br>  <br>  // Return setter, getter, and a way to tap into changes<br>  return {<br>    get: () =&gt; getState().value,<br>    set: value =&gt; setState({value}),<br>    onChange: (cb) =&gt; subscribe(state =&gt; cb(state.value))<br>  }<br>}</pre><p>This would allow us to reach this very neat way of declaring an atom, and subscribe to changes made to it —</p><pre>// Home.c1dmp.js<br>import {atom} from &#39;public/store&#39;<br><br>$w.onReady(function () {<br>   const {onChange, get: getCount, set: setCount} = atom(0);<br>  <br>   $w(&#39;#counter&#39;).text = getCount().toString()<br>  <br>   onChange(count =&gt; $w(&#39;#counter&#39;).text = count.toString());<br>  <br>   $w(&#39;#incrementButton&#39;).onClick(() =&gt; {<br>      setCount(getCount() + 1)<br>   });<br>});</pre><h3>Maintaining data between page navigations</h3><p>Maintaining data between page navigations is a crucial aspect of web development, ensuring a seamless user experience when users move from one page to another on a website or web application.</p><p>In Velo, the way to persist information between page navigation is by using the <a href="https://www.wix.com/velo/reference/wix-storage-frontend">wix-storage-frontend</a> module, allowing us to use an API identical to localStorage to persist the state to memory, session, or to local storage.</p><p>By combining this module with Zustand’s <a href="https://github.com/pmndrs/zustand#persist-middleware">persist middleware</a> we’re able to create a store or atom which persists between pages.</p><pre>import { createStore as createZustandVanillaStore } from &#39;zustand/vanilla&#39;<br>import { persist, createJSONStorage, subscribeWithSelector } from &#39;zustand/middleware&#39;<br>import {memory, local, session} from &#39;wix-storage-frontend&#39;<br><br>// Create store recieves an options object, to define persistence<br>export const createStore = (storeDefinition, options = {}) =&gt; {<br>    <br>    const storeWithPersistence = options.persist ? <br>      withPersistence(storeDefinition, options.persist) : storeDefinition<br><br>    return createZustandVanillaStore(subscribeWithSelector(storeWithPersistence));<br>}<br><br>// Wix supports &#39;memory&#39;, &#39;local&#39; or &#39;session&#39; implementations<br>const persistenceModelToImplementation = {<br>  memory,<br>  local,<br>  session,<br>}<br><br>const withPersistence = (storeDefinition, persistenceOptions) =&gt; {<br>  const {model, name} = persistenceOptions<br>  const persistentStorage = persistenceModelToImplementation[model]<br>  return persist(storeDefinition, {<br>    name,<br>    storage: createJSONStorage(() =&gt; persistentStorage),<br>  })<br>}<br><br>// The atom function now recieves options argument<br>// Passing it to `createStore`<br>export function atom(initialValue, options = {}) {<br>  // Create a store for a single value<br>  const {subscribe, getState, setState} = createStore(() =&gt; ({<br>    value: initialValue,<br>  }), options)<br>  // Return setter, getter, and a way to tap into changes<br>  return {<br>    get: () =&gt; getState().value,<br>    set: value =&gt; setState({value}),<br>    onChange: (cb) =&gt; subscribe(state =&gt; cb(state.value))<br>  }<br>}<br><br>// The shared atom is an HOC to enable creating a memory persisted atom<br>export const sharedAtom = (name, initialValue) =&gt; atom(initialValue, {persist: {name, model: &#39;memory&#39;}});</pre><p>Several notes on the implementation:</p><ul><li>By passing namein the persist configuration — any other page would retrieve the initial value from memory.</li><li>I’ve added <a href="https://github.com/pmndrs/zustand#using-subscribe-with-selector">subscribeWithSelector</a> middleware since it allows us to immediately consume the values when subscribing.</li><li>Have a look at sharedAtom HOC — with it, we can easily declare atoms shared over memory between pages.</li></ul><p>Now in order to persist our state, we just need to pass the configuration in our page code:</p><p>Using the atom approach:</p><pre>// Home.c1dmp.js<br>import {sharedAtom} from &#39;public/store&#39;<br><br>$w.onReady(function () {<br>    const {onChange, get: getCount, set: setCount} = sharedAtom(&#39;count&#39;, 0);<br><br>    onChange(count =&gt; $w(&#39;#counter&#39;).text = count.toString());<br><br>    $w(&#39;#incrementButton&#39;).onClick(() =&gt; {<br>      setCount(getCount() + 1)<br>    });<br>});</pre><h3><strong>Wrapping up</strong></h3><p>In conclusion, whether you lean towards the robust store approach or favor the elegance of atomic state management, you now have the freedom to choose the best fit for your project. This not only simplifies your code but also ensures that your web application consistently reflects your data on the DOM, providing a seamless and efficient user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69572b52f88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating your own conventional framework]]></title>
            <link>https://medium.com/wix-engineering/creating-your-own-conventional-framework-f0ce49a7896a?source=rss-e8ca8e298858------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0ce49a7896a</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[framework]]></category>
            <dc:creator><![CDATA[Nitay Rabinovich]]></dc:creator>
            <pubDate>Mon, 22 Nov 2021 11:58:42 GMT</pubDate>
            <atom:updated>2022-03-30T18:01:52.131Z</atom:updated>
            <content:encoded><![CDATA[<p>Or — “Why should you <strong>order your code</strong> (and enforce it)”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KrUcd9TMWXZDHnR5DOcX-Q.png" /></figure><p>In the modern world of front-end development, there’s an influx of coding patterns and approaches, from rendering “libraries” like <a href="https://vuejs.org/">Vue</a> and <a href="https://reactjs.org/">React</a>, to full-fledged frameworks like <a href="https://angular.io/">Angular</a>, <a href="https://nextjs.org/">Next.js</a>, or <a href="https://nuxtjs.org/">Nuxt.js</a>, But even with these tools, there’s a large degree of freedom left, A degree of freedom, that might be costly.</p><p>Hopefully, by the end of this article you’ll have some practical tools to organize your code, and some theoretical tools to make design decisions about the way you organize your code, so buckle up!</p><blockquote>This article can be split into two parts — one part theoretical/introductional and one part practical. I highly recommend reading both in order, but if you want you can <a href="#e7e7">dive directly to the code</a>.</blockquote><h3>A brief history of code-splitting</h3><p>Before I’m diving in into design patterns, open-source projects, and actual coding, it’s important to talk about what brought us to this (amazing and comfortable) point —<strong> code splitting.</strong></p><p>Not so long ago, when we wanted to break our code down into smaller parts or use a third-party library. we would have added a &lt;script&gt; tag in our HTML, pointing to our own or third-party script, and assumed that script added some way to interact with it (via global variables).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1df4ed51e24734668ca11f68d8e0f798/href">https://medium.com/media/1df4ed51e24734668ca11f68d8e0f798/href</a></iframe><p>This approach had many drawbacks, but it pretty much let you do whatever you wanted to do! but it did not impose, or encourage code order.</p><p>With the growing complexity of web applications and teams working in collaboration on complex projects, came various solutions both for code splitting, and website/application development.</p><p>For example, <a href="https://requirejs.org/">Require.js</a> allows to split code locally or configure external sources. Using the <a href="https://github.com/amdjs/amdjs-api/blob/master/AMD.md">AMD</a> (Asynchronous Module Definition) code style.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53880917333a2477d931eb14bc53b21b/href">https://medium.com/media/53880917333a2477d931eb14bc53b21b/href</a></iframe><p>Another example might be <a href="https://angularjs.org/">AngularJS</a>, which introduced their API to share code between pieces of an application And offer both a set of premade features, with an opinionated approach.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c786098c5e4eaadf059499df3ec9069a/href">https://medium.com/media/c786098c5e4eaadf059499df3ec9069a/href</a></iframe><p>These two examples show an implementation of two coding patterns we’re going to be using today —</p><ul><li><a href="https://en.wikipedia.org/wiki/Dependency_injection#:~:text=In%20software%20engineering%2C%20dependency%20injection,it%20depends%20on%2C%20called%20dependencies.&amp;text=The%20&#39;injection&#39;%20refers%20to%20the,part%20of%20the%20client&#39;s%20state."><strong>DI — Dependency injection</strong></a><strong> </strong>— “In software engineering, dependency injection is a technique in which an object receives other objects that it depends on, called dependencies.”</li><li><a href="https://en.wikipedia.org/wiki/Inversion_of_control"><strong>IOC (Inversion of control) </strong></a>— “In IoC, custom-written portions of a computer program receive the flow of control from a generic framework”.</li></ul><p>Both implement dependency injection, but AngularJS provides more than just that, it provides an opinionated generic framework — In the sense it “forced” you to write your code in a specific way, With the benefit of writing less code to get more things done (like DOM updates).</p><p>As the need for an official way to split code in Javascript grew, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules">module support</a> is natively provided by <a href="https://caniuse.com/es6-module">more and more browsers</a>, and an official API starts to take form. Already widespread today using bundling tools like <a href="https://webpack.js.org/">Webpack</a>, <a href="https://rollupjs.org/guide/en/">Rollup</a>, <a href="https://github.com/evanw/esbuild">ESBuild</a>, and others — we can now break our applications into simple shareable pieces of code.</p><h3>What’s the word on the street today?</h3><p>So now that we have a way to split our code and write very complex applications and not just simple (or not so simple) scripts in a single file… how should I split my code? 🤔</p><p>I’ll avoid the manual ways to write applications and render HTML using Node.js, and jump right into the common ways you’d create applications using popular open-source libraries. To simplify things I’m going to separate by (my own) criteria to three groups—</p><ul><li><strong>UI Rendering libraries</strong> — Allowing us to create <strong>reactive</strong> and modern single-page applications, although very robust today, these libraries still mainly handle UI rendering and state management. Some notable open source libraries in this group are <a href="https://vuejs.org/">Vue</a>, <a href="https://reactjs.org/">React</a>, <a href="https://svelte.dev/">Svelte</a>, <a href="https://www.solidjs.com/">Solid.js</a>, and more.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FNitayRabi%2Fembed%2Fpreview%2FWNExjEd%3Fdefault-tabs%3Djs%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DWNExjEd&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FNitayRabi%2Fpen%2FWNExjEd&amp;image=https%3A%2F%2Fassets.codepen.io%2F1364810%2Finternal%2Fscreenshots%2Fpens%2FWNExjEd.default.png%3Ffit%3Dcover%26amp%3Bformat%3Dauto%26amp%3Bha%3Dfalse%26amp%3Bheight%3D360%26amp%3Bquality%3D75%26amp%3Bv%3D2%26amp%3Bversion%3D1634651384%26amp%3Bwidth%3D640&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9d0bf84d5e376d27e5fdfdbb04a81aa/href">https://medium.com/media/d9d0bf84d5e376d27e5fdfdbb04a81aa/href</a></iframe><p><strong>Application Frameworks</strong> — Either for front-end or micro-services development, these frameworks try to cover all the needs of an application developer. From a pre-baked IOC to various tools to handle requests and routing. Some notable open source libraries in this group are <a href="https://angular.io/">Angular</a>, <a href="https://nestjs.com/">Nest.js</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f68f0c6ec680487e2532a551e0fa3fef/href">https://medium.com/media/f68f0c6ec680487e2532a551e0fa3fef/href</a></iframe><ul><li><strong>Conventional Frameworks</strong> — In the last few years these types of frameworks grew a lot of traction in the community, beyond supplying most of the tools you need for a full application, they expect you to manage your application’s filesystem in a very specific way, and reward you with automation, ordered readable code, and reduced boilerplate. Notable open-source libraries in this group are <a href="https://nextjs.org/">Next.js</a>, <a href="https://nuxtjs.org/">Nuxt.js</a>, and <a href="https://www.gatsbyjs.com/">Gatsby.js</a></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3e1289fab4a6a90c254c70a5a0243c5/href">https://medium.com/media/d3e1289fab4a6a90c254c70a5a0243c5/href</a></iframe><p>These frameworks implement the <strong>coding by convention approach.</strong></p><blockquote><a href="https://en.wikipedia.org/wiki/Convention_over_configuration"><strong>Convention over configuration</strong></a><strong> </strong>— “Convention over configuration (also known as coding by convention) is a software design paradigm used by software frameworks that attempts to decrease the number of decisions that a developer using the framework is required to make without necessarily losing flexibility.”</blockquote><p>It’s important to note I split them a bit arbitrarily and there are many other approaches, just as an example in Wix we use <a href="https://github.com/wix/repluggable">Repluggable</a>, which provides IOC coupled with React and Redux, but doesn’t serve as an entire framework.</p><h3>Should you build your own framework?</h3><p>As you saw the open-source world today is rich, stable, and has a lot to offer, so I wouldn’t say yes so quickly, but I’ll try to go over some of the concerns in choosing whether to even use (or develop your own) framework.</p><h4>Application complexity</h4><p>I like to imagine application complexity as a spectrum, ranging from the simplest <strong>landing page websites</strong> to complex software such as site builders, graphical tools, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OA5WXfYqMD6Fim8dKkCGSg.png" /><figcaption>From landing pages to complex software such as site builders &amp; graphical tools</figcaption></figure><ul><li><strong>Landing page</strong>— Creating a landing page, maybe with a contact form? the time you’re going to spend creating a framework most likely would be longer than creating the page itself, and using a site builder such as <a href="https://www.wix.com/">Wix</a>, <a href="https://webflow.com/">Webflow </a>or any other would probably do the trick faster and easier.</li><li><strong>Content website</strong>— Creating a blog, store, or similar content/purchasing website, which probably requires an admin view, various pages, and layouts? I would still argue site builders are the right choice here, providing a full back-office system, user management, payments, and more. But in case you build it on your own, existing frameworks such as Next/Nuxt or Gatsby are tailor-made for this use case.</li><li><strong>Native/Complex software </strong>—<strong> </strong>Creating very complex software, such as graphical software, map-based software? graphical tool? Maybe the paradigm of pages, layouts, and static data as offered by Next/Nuxt is not for you, and you need a tailor-made framework for your needs.</li></ul><h4><strong>Coupling to specific technology</strong></h4><p>Most open-source frameworks are coupled to various technologies from choosing their code bundles to their UI library, maybe you want a very specific set of dependencies and would like to avoid using a specific bundler or UI rendering library.</p><p>For example, coupling your application to <a href="https://www.typescriptlang.org/docs/handbook/decorators.html">experimental decorators</a> might have implications and breaking changes in the future once decorators are <a href="https://github.com/tc39/proposal-decorators">supported natively</a></p><h4>Maintenance</h4><p>Open-source frameworks (at least the ones I covered here) are great! they offer a huge set of capabilities, they’re battle-tested and well maintained. There’s great hubris in thinking you (or your team) can create and maintain better tools that’ll supply the full set of capabilities they offer without putting similar effort as open-source contributors put.</p><p>When you’re creating a framework, you might just be eliminating one bottleneck (business and product implementation) while creating a new one (Infrastructure maintenance and features) — <strong>If you’re creating your infrastructure it should be documented, easy to contribute, simple to use, and tested.</strong> No different from creating a good open source project.</p><h3>The task at hand</h3><p>So (finally!) let’s get to code, to be clear — it’s not going to be the entire set of features Next or Nuxt provide(I’ve mentioned hubris before), but hopefully I’ll leave you with some practical ways to order your code and get started with framework building.</p><p>My (very minimal) definition of done —</p><ul><li><strong>A way to automatically “gather” pieces of code </strong>— Implement a way that our framework would find and execute various pieces of code (Implementing<strong> </strong><a href="#c0eb"><strong>coding by convention</strong></a> to some degree).</li><li><strong>A standard way of requesting APIs </strong>— Supply a standard way for a piece of code to “request” another piece of code (Implementing <a href="#16fc"><strong>Inversion of control</strong></a>).</li><li><strong>Pages feature </strong>— Support a way to contribute pages (UI + routing) to the website</li><li><strong>Layouts feature</strong> — Support a way to contribute layouts to the website(multiple pages can use the same layout)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmBsoJZMd0lLT8aFdNYoOg.gif" /></figure><p>I’m going to implement 2 different approaches — one <strong>generic </strong>(generic doesn’t mean better) and one more <strong>conventional </strong>(or specific)</p><p>For both approaches, I’m going to use React as the UI rendering library and Webpack as the bundler (using create-react-app)</p><ol><li><strong>Starting with typescript + React boilerplate:</strong></li></ol><pre>npx create-react-app AppName — template typescript</pre><p><em>After creating the initial application, I’ll put all of the “framework” code within a folder named </em><em>framework in the </em><em>src folder.</em></p><h4>The generic approach (Everything is a module)</h4><p>To not couple myself to a specific product, I’m going to create a very simple and generic approach for the task at hand.</p><ul><li><strong>Simple </strong>— in the sense that there’s only one convention (module).</li><li><strong>Generic </strong>— This single convention doesn’t have any applicative/product meaning, it’s just code that you execute.</li></ul><p><em>I’m going to show partial code snippets. I recommend going over the </em><a href="https://github.com/NitayRabi/conventional-frameworks/tree/master/examples/generic"><strong><em>full example </em></strong></a><em>to understand the broad context better</em></p><p><strong>2. Modeling the system —Describing what is a module using Typescript</strong></p><p>I like to start with the types, so what is a module? It’s a file that has a <strong>default </strong>export with a contract (interface) that the framework is going to use -</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e06e87fceef49e77f7d60b4dd7b4c293/href">https://medium.com/media/e06e87fceef49e77f7d60b4dd7b4c293/href</a></iframe><p>Notice that even these few lines “made” several design choices —</p><ul><li><strong>Using default</strong> — Every named export becomes a reserved word, and a magic string in your framework, I prefer using the already reserved word <strong>default </strong>and describing the rest of the contract with an interface. (it also makes refactoring easier)</li><li><strong>Using a method `execute`</strong>— I could export a function, but I chose an object interface (that you can also implement as a class). Objects are easier to extend than just function and allow more flexibility.</li></ul><p><strong>3. Gathering modules from the filesystem</strong></p><p>To achieve it, I’m going to use Webpack’s <a href="https://webpack.js.org/guides/dependency-management/#requirecontext"><strong>require.context</strong></a><strong>. </strong>It would do the trick for now, but it might <strong>not</strong> be the best option, see <a href="#8ab8">issues with using require.context</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cbe49090e1ff85ac08c31d6387a05a8/href">https://medium.com/media/8cbe49090e1ff85ac08c31d6387a05a8/href</a></iframe><p>Now every file located under `src/modules` (and sub-folders) which ends with modules.ts or modules.tsx is going to be executed when bootstrap is invoked.</p><blockquote>src/index.ts is defined as the application’s entry point (the code that’s going run when we navigate to our application) in create-react-app.</blockquote><p><strong>4. Creating the first module</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/565da2e93a0ff62c7d6a305dda3621a1/href">https://medium.com/media/565da2e93a0ff62c7d6a305dda3621a1/href</a></iframe><p>Just by adding this file to the filesystem, it’s going to be executed.</p><p>I can move the React rendering code (generated by create-react-app) into this module, but that just means we’re moving the entire application into 1 module… and that doesn’t achieve the goal.</p><p>So I’ll implement a way to break our application into <strong>pages</strong> and <strong>layouts</strong> and allow the modules to communicate by an API provided via the framework (Inversion of control)</p><p><strong>5. Modeling inversion of control</strong></p><p>Similar to the convention I’m going to start by defining the API a module declares, and the APIs the module can use, to achieve this I am modifying the framework types -</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c346bc5297fe02464fa50181c9dfe00/href">https://medium.com/media/7c346bc5297fe02464fa50181c9dfe00/href</a></iframe><p>Again we encounter some design choices:</p><ul><li><strong>1 module 1 API</strong> — It’s a limitation I’m imposing, supposedly to separate concerns that each module doesn’t do more than it needs to.</li><li><strong>createApi doesn’t have access to getApi</strong>— Another limitation that reduces the chance of a circular dependency, at the cost of not being able to create API that uses another API (which is a very important and powerful feature)</li></ul><p><strong>6. Implementing Inversion of control within the framework</strong></p><p>There are many open-source projects the provide methods to provide IOC, I’m going to use <a href="https://github.com/owja/ioc"><strong>@owja/ioc</strong></a>, since it’s very simple, lightweight, and allows me to implement my frameworks without using decorators which I’d like to avoid.</p><p><em>If you do want to use decorators </em><a href="https://github.com/owja/ioc"><em>@owja/ioc</em></a><em> supports them as well, but you can also consider using </em><a href="https://inversify.io/"><em>Inversify </em></a><em>or </em><a href="https://github.com/typestack/typedi"><em>TypeDI</em></a><em>.</em></p><p>By using <strong>Container </strong>and <strong>createResolve </strong>I’m going to create the method that resolves a module’s API. It requires a small modification to our <strong>bootstrap </strong>function</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/28d3f734c56a40536566b52c0155b37d/href">https://medium.com/media/28d3f734c56a40536566b52c0155b37d/href</a></iframe><p><strong>7. Creating a modules types and identifier</strong></p><p>I expect each module to expose an Identifier, which has 2 purposes:</p><ol><li>Expose a unique symbol to be used to declare/get the module’s API</li><li>Define a type for the API provided through this module</li></ol><p>Since this identifier will be used in other modules to “request” its API, I’ll put it into a separate file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3bcfd68f5d10ab4ee47aea755ad4b95d/href">https://medium.com/media/3bcfd68f5d10ab4ee47aea755ad4b95d/href</a></iframe><p><strong>8. Declaring our modules, now providing an API</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba56e7978dbc5d72e4525b51c3402176/href">https://medium.com/media/ba56e7978dbc5d72e4525b51c3402176/href</a></iframe><ul><li><strong>State </strong>— Since my module now needs to maintain state (an array of pages), I chose to decouple the framework from the state management and implement the state within the module. I chose <a href="https://mobx.js.org/">MobX </a>due to the limited amount of boilerplate code needed for this demonstration.</li><li><strong>The ‘createModule’ helper function </strong>— I want to provide developers with an easy way to create modules without the hassle of using too many types, so I’ve exported a createModule function to infer the expected API types correctly.</li></ul><p><em>I created a similar module for the </em><a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/generic/src/modules/layouts/layouts.module.ts"><strong><em>layout feature </em></strong></a><em>that’ll be used by the application.</em></p><p><strong>Using a module in another module (Wiring the App)</strong></p><p>I can now use the getApi method to get another module’s APIs and use it</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40ad2ab3a58eb227411f554ee91994ac/href">https://medium.com/media/40ad2ab3a58eb227411f554ee91994ac/href</a></iframe><p>In this example app.module uses pages and layouts modules to render routes, but I could have also used layouts in the pages module — the generic module approach gives me this degree of freedom.</p><p><em>It’s not the topic of this article but the actual rendering of the code can be seen in the</em><a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/generic/src/modules/app/App.tsx"><em> App component itself</em></a><em>, or the </em><a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/generic/src/modules/layouts/Default.tsx"><em>layout</em></a><em> and </em><a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/generic/src/modules/pages/Home.tsx"><em>page</em></a><em> components. I used </em><a href="https://reactrouter.com/web/guides/quick-start"><em>react-router-dom</em></a><em> to configure the routes (which would probably require changes to support SSR) and used </em><a href="https://react.semantic-ui.com/"><em>semantic-ui-react</em></a><em> for the base UI elements.</em></p><p><strong>9. The resulting structure</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de4ceab066239558e92fc8a9b1d94545/href">https://medium.com/media/de4ceab066239558e92fc8a9b1d94545/href</a></iframe><p><strong>Key takeaways from the generic approach:</strong></p><ul><li>The framework is agnostic to state or UI rendering.</li><li>There’s a single convention (module) and it doesn’t have a built-in applicative meaning (everything is a module, a module can be anything).</li><li>Most of the application’s concerns are implemented within the modules themselves, keeping the framework’s code very small.</li></ul><h4>The conventional (specific) approach</h4><p>The generic approach leaves quite a large degree of freedom, and might be suitable for complex applications to implement various features as modules (e.g codeEditor.module, toolPanel.module, etc…), but for our specific use-case there’s a large amount of boilerplate code just to get the pages and layouts working, how can we reduce it? by moving more concerns into the framework itself.</p><p>We’ll use the generic approach as a blueprint, and add conventions on top of it.</p><p><em>I’m going to show partial code snippets, I recommend going over the</em><a href="https://github.com/NitayRabi/conventional-frameworks/tree/master/examples/conventional"><em> </em><strong><em>full example</em></strong></a><strong><em> </em></strong><em>to understand the broad context better</em></p><ol><li><strong>Modeling the framework to fit multiple conventions</strong></li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a81cb16a72f33cc95cf9719d059a90ef/href">https://medium.com/media/a81cb16a72f33cc95cf9719d059a90ef/href</a></iframe><p>Right off the bat, it’s very clear that we’re moving a lot of concerns from the modules into the framework itself:</p><ul><li><strong>Pages/Layouts</strong> —Now the expected type of a page or a layout is maintained within the framework.</li><li><strong>Module </strong>— Modules are still supported in the same way to share code within the application (although in this context I would consider renaming them into services).</li></ul><p>I also chose <strong>not </strong>to<strong> </strong>treat layouts or pages as a module, as they can’t declare an API or execute code in the same manners module could —<strong> to keep them to a single purpose, UI rendering only.</strong></p><p>Notice that in the first line we’ve coupled our framework to React this is a clear trade-off between velocity (by providing ready-made utils and tools by the framework) and flexibility (the ability to replace the UI rendering library in the future).</p><p><em>There are probably several ways to support specific conventions without coupling to the UI rendering library, but that’s a topic for another day</em></p><p><strong>2. Adapting the convention gathering</strong></p><p>I’ve separated the logic to “gather” various conventions into a dedicated file and adapted it to support pages, layouts, and modules.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96e5f688941b536e4184029d79da4e24/href">https://medium.com/media/96e5f688941b536e4184029d79da4e24/href</a></iframe><p>By separating the conventions, I can now manage the pages and layouts in their dedicated folders.</p><p>It’s pretty apparent that require.context, as functional as it is for this educational purpose, might not be suitable for multiple conventions due to its <a href="#8ab8">drawbacks</a>.</p><p><strong>3. Bootstrapping the application</strong></p><p>Similar to the models, to render our application, we’re going to move the React render flow from the app.module into our bootstrap function, which (leaving out some code <a href="#1ece">related to handling HMR</a>) looks like —</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4955c0448214cc57fd994f2d473968c2/href">https://medium.com/media/4955c0448214cc57fd994f2d473968c2/href</a></iframe><p>Now that I control the app’s rendering, I can choose to create various types of <strong>lifecycle events</strong>, for now, I’ve left only execute, but if I want I could add more (For example before the app renders).</p><p><em>The creation of the </em><strong><em>runtimeApi </em></strong><em>and the way we execute the modules remained identical, I just extracted it into a </em><a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/conventional/src/framework/appApi.ts"><em>dedicated file</em></a><em>.</em></p><p><strong>4. Adding a page or a layout to our application</strong></p><p>It now becomes very simple to add new pages and layouts to our application</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73c2090bc552a0c9fd843d78f03b618e/href">https://medium.com/media/73c2090bc552a0c9fd843d78f03b618e/href</a></iframe><p>By just exporting (using our <a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/conventional/src/framework/conventionCreators.ts">typed helper functions</a>) the very simple interfaces, and providing a React component, the framework adds them to our application.</p><p>Notice that unlike Next.js, which creates the page route based on the filesystem, I explicitly state it in my Page model — This is by design, I like using conventions to reduce boilerplate code, but prefer to keep the applicative logic within strict interfaces and within the code.</p><p><em>Wiring the pages to work based on the filesystem should be rather simple since you have access to their path in the filesystem.</em></p><p><strong>5. Using modules within pages and layouts</strong></p><p>Since pages and layouts are no longer “modules” in the sense they don’t have an execute method and have no access to getApi directly, I can pass them the runtimeApi in several ways, I chose to go with exposing a hook from the framework —</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/761968ee36ebc64da27d165da173e4ee/href">https://medium.com/media/761968ee36ebc64da27d165da173e4ee/href</a></iframe><p>the getApi method itself hasn’t changed, and we can pass it a module’s identifier.</p><p><strong>9. The resulting structure</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69d1ee503155266918986688ab8a7eaa/href">https://medium.com/media/69d1ee503155266918986688ab8a7eaa/href</a></iframe><p>The resulting filesystem shows clearly — by moving more concerns to the framework we ease the product developer’s life, but we move concerns (and maintenance) to the infrastructure.</p><p><strong>Key takeaways from the conventional approach:</strong></p><ul><li>Moving more concerns into the framework couples it with certain technologies (such as state management, and UI rendering library).</li><li>There are meaningful, applicative conventions (pages, layouts) that serve specific product purposes.</li><li>A lot of the application’s concerns are encapsulated <strong>within the framework</strong>, keeping the actual applicative code base very lean and simple.</li></ul><h3>Taking it to the next level</h3><p>This is just the tip of the iceberg, and I’ll just leave some ideas here for potential features:</p><h4>Code Generation</h4><p>Now that all we need is to add parts of our application into a folder, we can use code generation to make developers lives even better, I added a generator to my <a href="https://github.com/NitayRabi/conventional-frameworks">examples repo</a> using <a href="https://github.com/jondot/hygen">hygen</a></p><h4>Server Code</h4><p>Next/Nuxt also supplies server endpoints based on convention, as I wrote — require.context doesn’t work with Node.JS without Webpack, you can either bundle your server code with Webpack, or use a native approach to gather modules from the filesystem using <a href="https://github.com/sindresorhus/globby">globby</a>.</p><h4>Enforcement and validations</h4><p>To reduce the room for error, and to make your approach stricter you can add file system linting (<a href="https://github.com/loeffel-io/ls-lint">ls-lint</a> for example) to make sure all your conventions are made just right. or/and create a script to gather the conventions and validate they export the expected structure.</p><h4><strong>Require.context drawbacks</strong></h4><p>The choice of using require.context was mainly because it’s fast to set up, but it has many drawbacks —</p><ul><li><strong>Webpack only </strong>— It doesn’t work outside of Webpack’s build context (e.g <a href="https://jestjs.io/">jest</a>, or Node.js)</li><li><strong>It’s not </strong><a href="https://stackoverflow.com/questions/45327765/pass-a-variable-to-require-context"><strong>configurable</strong> </a>— If you want to share your conventions (configuration of convention over configuration 😆) between applications, consider alternatives like creating a Webpack plugin or using prebuild scripts that use Node.js to create conventions.</li><li><strong>It has </strong><a href="https://github.com/webpack/webpack/issues/834"><strong>an issue</strong></a><strong> with </strong><a href="https://webpack.js.org/concepts/hot-module-replacement/"><strong>HMR</strong></a> — I worked around it (see <a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/generic/src/framework/bootstrap.ts#L21">generic</a>/<a href="https://github.com/NitayRabi/conventional-frameworks/blob/master/examples/conventional/src/framework/conventionsGatherer.ts#L38">conventional </a>example), but it’s far from perfect and may have grave implications on the application’s state</li><li><strong>Bundle size</strong> — If used without a <a href="https://webpack.js.org/api/module-methods/#requirecontext">specific configuration</a>, it will bundle all of the code together into the main bundle.</li></ul><h3>To summarize</h3><p>Creating and maintaining your own framework takes a great deal of effort, and in case you’re not creating a project on a very large scale, with many contributors it’s probably not worth it. If you’re creating a large-scale project, with many developers actively maintaining it — enforcing coding style and standards makes onboarding and navigating the code a lot easier.</p><p>I wanted to introduce another spectrum — similar to application complexity we see here a relation between the features of a framework (and its’ inherent complexity) to the effort required by consumers to develop their application.</p><p>What’s the right approach? well it’s pretty clear there’s no absolute answer here, it depends on the character of the developers you work with (are they more product or infrastructure oriented?), the nature of the software you’re developing (does it have a clear end date? should it last “forever” and trade owners?) and so much more….</p><p>Hopefully, I leave you with either practical tools, or at least some new approaches to test out for your next project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0ce49a7896a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wix-engineering/creating-your-own-conventional-framework-f0ce49a7896a">Creating your own conventional framework</a> was originally published in <a href="https://medium.com/wix-engineering">Wix Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>