<?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 Insurgent on Medium]]></title>
        <description><![CDATA[Stories by Insurgent on Medium]]></description>
        <link>https://medium.com/@lanaguani?source=rss-59042e72ce5c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Insurgent on Medium</title>
            <link>https://medium.com/@lanaguani?source=rss-59042e72ce5c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:03:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lanaguani/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[AI Without Backend: How ClientAgentJS Brings MCP to the Browser]]></title>
            <link>https://medium.com/@lanaguani/ai-without-backend-how-clientagentjs-brings-mcp-to-the-browser-e5e0b16bfd12?source=rss-59042e72ce5c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5e0b16bfd12</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agent-web]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Insurgent]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 22:52:53 GMT</pubDate>
            <atom:updated>2026-04-19T22:52:53.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HlFDJbgB8_9KliCgawLz4w.jpeg" /></figure><p>Most JavaScript libraries for AI agents assume you have a server in the middle. They need a backend to handle API keys, manage requests, and enforce security. But what if you could skip all that? That’s the gap I wanted to explore with <strong>ClientAgentJS</strong> — a lightweight, browser-native utility that lets you run conversational AI agents directly on the client side, including support for the Model Context Protocol (MCP). You can find the code on <a href="https://github.com/FranBarInstance/ClientAgentJS">GitHub</a>.</p><p>The concept is straightforward: from any web page, users bring their own AI model. Whether it’s a cloud service like Anthropic or Google (using a personal API key) or a local instance like Ollama, the library provides a single, consistent interface for chatting or task execution.</p><p>Two main challenges shaped the design from day one.</p><p><strong>Challenge #1: CORS.</strong><br>Browsers enforce strict cross-origin rules. Some AI providers accept direct requests; others don’t. And MCP servers? Most of them aren’t even designed to speak HTTP with CORS headers. So the library can’t just “work everywhere” — it has to adapt to what each endpoint allows.</p><p><strong>Challenge #2: User behavior.</strong><br>Realistically, most people won’t install Ollama or paste their private API keys into a random website. You can offer the option, but adoption will be low. That’s precisely why client‑only AI libraries are rare. Still, in the right niches, this model shines.</p><h3>When Does This Actually Work?</h3><p>Here are four scenarios where the trade‑offs make perfect sense.</p><h3>1. Internal tools for dev teams</h3><p>If everyone on your team already has their own OpenAI or Anthropic key (because they use AI daily), adding a smart assistant to an internal dashboard is trivial. No shared billing, no proxy server — just drop in the library, and each user configures their own profile once.</p><h3>2. Admin forms (e‑commerce, CMS, support panels)</h3><p>Imagine a product entry form in an online store. The operator fills in attributes (price, category, specs) and clicks a button: “Generate description with my own Claude key.” The AI writes it on the spot. The company never pays for tokens, and no backend code is needed.</p><h3>3. Browser extensions</h3><p>Extensions already live in the client context and can read the current page. Adding AI summaries, translations, or smart suggestions becomes a matter of calling the library. Perfect for productivity tools that work across different sites.</p><h3>4. Prototypes and demos</h3><p>When you’re validating an idea, you don’t want to set up infrastructure. ClientAgentJS lets you build a fully functional AI demo on a static host — no server, no deployment pipeline. Just HTML, JS, and a working agent.</p><h3>5. Bring‑your‑own‑model applications</h3><p>If your product wants to stay provider‑agnostic, let users pick between OpenAI, Anthropic, Google, or a local Ollama instance. The library abstracts the differences, so you don’t write adapters for each one.</p><h3>Live Demos to Try</h3><p>All examples are hosted on GitHub Pages and work directly in your browser:</p><ul><li><a href="https://franbarinstance.github.io/ClientAgentJS/examples/browser-basic/"><strong>Chat Explorer</strong></a> — full chat UI with streaming, markdown, and cancel support.</li><li><a href="https://franbarinstance.github.io/ClientAgentJS/examples/form-assistance/"><strong>Form Assistance</strong></a> — AI help inside existing forms (bio, product description, support replies).</li><li><a href="https://franbarinstance.github.io/ClientAgentJS/examples/mcp-tools/"><strong>MCP Tools</strong></a> — connects the agent to an MCP server and lets the model invoke remote tools.</li><li><a href="https://franbarinstance.github.io/simple-html-editor/demo/grayscale/"><strong>Simple HTML Editor</strong></a> — a visual editor for landing pages where you can ask the AI to rewrite text, translate, or change buttons on the fly.</li></ul><h3>The CORS Reality Check</h3><p>You can’t build a client‑side AI library without talking about CORS. It’s the browser’s way of saying: “You shall not call a different domain unless that domain explicitly allows it.”</p><p>Some providers play nice:</p><ul><li><strong>Anthropic</strong> supports direct browser requests if you include the anthropic-dangerous-direct-browser-access header (the library adds it automatically).</li><li><strong>Google Gemini</strong> works out of the box with no extra headers.</li><li><strong>Ollama</strong> can work, but you need to launch it with OLLAMA_ORIGINS=* (or your domain).</li></ul><p>Others don’t:</p><ul><li><strong>OpenAI</strong> blocks browser requests entirely. No CORS headers = no direct calls.</li><li>Many <strong>MCP servers</strong> are built for stdio, not HTTP. To use them from a browser, they must expose a CORS‑enabled endpoint or run on localhost while your page is also on localhost.</li></ul><p>What can you do when a provider blocks CORS?</p><ul><li>Use <strong>OpenRouter</strong> — a gateway that supports dozens of models (including OpenAI) and does allow browser requests.</li><li>Set up your own simple proxy (though that reintroduces a backend).</li><li>For local development, a public CORS proxy can unblock you, but don’t use that in production.</li></ul><h3>A Note on Local Files and Simplicity</h3><p>ClientAgentJS is pure JavaScript — no build step, no dependencies. You can even run it from a file:// URL by opening a local HTML file. Combined with localStorage, this makes local prototyping incredibly fast. No local server needed. Of course, CORS still applies when calling external APIs, but for testing against localhost or providers that support CORS, it&#39;s a joy.</p><h3>What About MCP?</h3><p>The Model Context Protocol is designed to give AI agents access to external tools and data. But the official MCP specification assumes a server‑to‑server or local process model. ClientAgentJS brings MCP to the browser by allowing the agent to connect to <strong>HTTP‑based MCP servers</strong> that include proper CORS headers.</p><p>In practice, that means:</p><ul><li>You (the developer) can host your own MCP servers with CORS enabled.</li><li>Or the user runs an MCP server locally on localhost (e.g., for personal automation).</li><li>The library then lets the model discover and call tools exactly as it would in a backend environment.</li></ul><p>The demo <a href="https://franbarinstance.github.io/ClientAgentJS/examples/mcp-tools/"><strong>MCP Tools</strong></a> shows this in action — no backend required.</p><h3>Final Thoughts</h3><p>ClientAgentJS won’t replace server‑side AI agents for most production applications. But for internal tools, browser extensions, admin panels, and rapid prototypes, it offers a surprisingly clean alternative. The main barriers are CORS and user willingness to provide their own API keys — but where those barriers are low, the library unlocks a truly backend‑free AI experience.</p><p>All code, docs, and demos are on <a href="https://github.com/FranBarInstance/ClientAgentJS"><strong>GitHub</strong></a>. Feel free to open issues, suggest improvements, or just play around with the examples.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5e0b16bfd12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrap Dynamic Themes: Real-Time Theme Customization for Bootstrap 5 (No Sass Required)]]></title>
            <link>https://medium.com/@lanaguani/bootstrap-dynamic-themes-real-time-theme-customization-for-bootstrap-5-no-sass-required-5524e92bc578?source=rss-59042e72ce5c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5524e92bc578</guid>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[bootswatch]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[ui-ux]]></category>
            <category><![CDATA[theming]]></category>
            <dc:creator><![CDATA[Insurgent]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 13:22:34 GMT</pubDate>
            <atom:updated>2026-03-14T13:23:06.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cg_HwFivVvrke0qIzxii2Q.png" /></figure><h4>Create, switch, and customize beautiful Bootstrap 5 themes instantly — even at runtime — with a powerful visual editor and zero build tools.</h4><h3>The Problem with Traditional Bootstrap Theming</h3><p>If you’ve worked with Bootstrap for a while, you know the drill: you want a new color palette, different typography, or a proper dark mode, so you fire up Sass, override dozens of variables, compile everything, and pray it looks good across all components.</p><p>Then your client asks for three more variations. Or users want a dark/light toggle.</p><p>Suddenly you’re maintaining multiple compiled CSS files, dealing with cache issues, and losing the joy of rapid iteration.</p><p>What if you could <strong>change themes in real time</strong>, without reloading the page, without Sass, and without any build step?</p><p>That’s exactly what <strong>Bootstrap Dynamic Themes (BTDT)</strong> lets you do.</p><h3>Introducing Bootstrap Dynamic Themes</h3><p><strong>Bootstrap Dynamic Themes</strong> is a professional theme customizer and modular engine for Bootstrap 5. It acts as a modern, more flexible alternative to Bootswatch — but with a crucial advantage: everything happens <strong>at runtime</strong>.</p><p>Built around CSS custom properties and a clean JavaScript API, it allows you to:</p><ul><li>Customize themes visually in real time</li><li>Switch between presets instantly</li><li>Toggle light/dark modes on the fly</li><li>Create and save your own reusable themes</li><li>Do all of this without touching a single Sass file</li></ul><p><strong>Live Demo &amp; Visual Editor</strong>: <a href="https://franbarinstance.github.io/bootstrap-dynamic-themes/btdt/editor/">Try it here</a></p><p><strong>GitHub Repository</strong>: <a href="https://github.com/FranBarInstance/bootstrap-dynamic-themes">FranBarInstance/bootstrap-dynamic-themes</a></p><h3>Key Features</h3><ul><li><strong>Real-time visual editor</strong> — Tweak colors, typography, borders, rounding, shadows, gradients, and more while seeing changes instantly across all Bootstrap components.</li><li><strong>Runtime theme switching</strong> — Change themes or toggle dark/light mode without reloading the page.</li><li><strong>Modular architecture</strong> — Mix and match palettes, typography, and structural styles.</li><li><strong>Preset system</strong> — Save and load custom themes easily (includes presets like <em>Studio</em> and <em>Aurora</em>).</li><li><strong>Zero build tools required</strong> — Pure CSS + JavaScript. Works even from the file system (file://).</li><li><strong>Full Bootstrap 5 coverage</strong> — Navbar, cards, buttons, forms, modals, tables, accordion, and every other component looks perfect.</li></ul><h3>The Visual Editor Experience</h3><p>Open the <a href="https://franbarinstance.github.io/bootstrap-dynamic-themes/btdt/editor/">live editor</a> and you’ll find a polished interface with:</p><ul><li>A rich control panel for color palettes, typography pairings, border styles, corner radius, shadows, and spacing</li><li>A comprehensive live preview showing almost every Bootstrap component (including interactive ones like modals, offcanvas, toasts, and carousels)</li><li>One-click preset loading</li><li>Light/dark mode toggle</li><li>Export/copy functionality for your custom configuration</li></ul><p>It’s genuinely fun to play with.</p><h3>How to Use It (Super Simple)</h3><p><strong>Option 1: All-in-One Loader (Recommended for quick starts)</strong></p><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;btdt/css/bootstrap.min.css&quot;&gt;<br>&lt;script data-preset=&quot;studio&quot; src=&quot;btdt/js/btdt.min.js&quot;&gt;&lt;/script&gt;</pre><p><strong>Option 2: Manual setup</strong></p><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;btdt/css/bootstrap.min.css&quot;&gt;<br>&lt;link rel=&quot;stylesheet&quot; href=&quot;btdt/themes/preset/studio.css&quot;&gt;<br>&lt;script src=&quot;btdt/js/btdt.min.js&quot;&gt;&lt;/script&gt;</pre><p><strong>JavaScript API examples:</strong></p><pre>// Load a different preset<br>btdt.load(&#39;aurora&#39;);<br><br>// Toggle dark/light mode<br>btdt.toggleMode();<br><br>// Load your custom theme<br>btdt.load(&#39;my-brand-theme&#39;);</pre><p>Just copy the btdt/ folder into your project root and you&#39;re good to go.</p><h3>Why This Matters</h3><p>Most theming solutions for Bootstrap are either:</p><ul><li>Static (Bootswatch-style precompiled themes)</li><li>Heavy (Sass + build pipeline)</li><li>Limited (only color swaps)</li></ul><p><strong>Bootstrap Dynamic Themes</strong> gives you the best of all worlds: the power of deep customization, the flexibility of runtime changes, and the simplicity of dropping in a folder.</p><p>It’s perfect for:</p><ul><li>SaaS dashboards that need white-label/branding support</li><li>Agencies delivering multiple client variations</li><li>Products with user-configurable themes</li><li>Developers who value speed and iteration</li></ul><h3>Final Thoughts</h3><p>In 2025, forcing developers to recompile Sass just to change a few colors feels outdated. Bootstrap Dynamic Themes brings Bootstrap theming into the modern era — dynamic, visual, and developer-friendly.</p><p>Whether you’re building your next side project or a large production application, this library is worth checking out.</p><p><strong>⭐ Star the repo if you find it useful:</strong><br> <a href="https://github.com/FranBarInstance/bootstrap-dynamic-themes">github.com/FranBarInstance/bootstrap-dynamic-themes</a></p><p>Have you tried it yet? What’s your favorite Bootstrap theming approach today? Let me know in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5524e92bc578" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neutral Starter Py: Designing Applications for the Age of AI Agents]]></title>
            <link>https://medium.com/@lanaguani/neutral-starter-py-designing-applications-for-the-age-of-ai-agents-37e1b6e7c5ae?source=rss-59042e72ce5c------2</link>
            <guid isPermaLink="false">https://medium.com/p/37e1b6e7c5ae</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[flask]]></category>
            <dc:creator><![CDATA[Insurgent]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 10:27:11 GMT</pubDate>
            <atom:updated>2026-02-26T10:27:11.330Z</atom:updated>
            <content:encoded><![CDATA[<h3>A new architecture that puts AI collaboration at the core of development</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52NcYeAOoN7xkcckyMIEVw.png" /></figure><h3>Introduction: An Experiment Towards the Future of Development</h3><p>Neutral Starter Py is an experiment conceived to explore how we should design applications in the age of AI agents.</p><p>Its premise is radical: if we want AI to actively collaborate in software development and maintenance, the architecture must be designed from scratch to be readable, modifiable, and extensible by language models.</p><p>This project combines Python (Flask) with the Neutral TS template engine, proposing a path forward: extreme modularity based on self-contained components.</p><h3>Why Do We Need to Rethink Architecture?</h3><p>We’re living through a paradigm shift. AI models are no longer just tools for queries or text generation; they’re becoming agents capable of executing complex tasks within our development environment.</p><h3>The Current Problem</h3><p>Traditional projects suffer from:</p><ul><li><strong>Implicit dependencies</strong> between components</li><li><strong>Monolithic files</strong> difficult for AI to analyze</li><li><strong>Scattered configurations</strong> without clear context</li><li><strong>Documentation separated</strong> from code</li></ul><h3>The Solution: Self-Contained Components</h3><p>What’s truly innovative about this project is its stated goal: “to provide developers with AI-powered agentic capabilities.”</p><h3>What is Neutral TS?</h3><p>The project relies on <a href="https://github.com/FranBarInstance/neutralts"><strong>Neutral TS</strong></a>, a unique template engine:</p><p>Neutral TS is a secure, modular, and language-agnostic template engine built in Rust. It works as a native Rust library or via IPC for other languages like Python and PHP.</p><h3>Key Features:</h3><ul><li>With Neutral TS you can reuse the same template across multiple languages with consistent results</li><li>Create templates compatible with any system and any programming language</li><li>Similar to how a SQL query returns the same data from any language, a Neutral TS template returns the same HTML from Python, PHP, Rust… with additional security isolation</li></ul><h3>Architecture for AI Agents</h3><h3>Core Principles</h3><ol><li><strong>Extreme Modularity</strong>: Each component is an independent unit</li><li><strong>AI Readability</strong>: Predictable and documented structure</li><li><strong>Extensibility</strong>: Add features without breaking existing ones</li><li><strong>Interoperability</strong>: Examples available for Rust, Python, PHP, Node.js, and Go</li></ol><h3>Python Integration</h3><p>It’s possible to execute external scripts (currently Python only) and process their output. The script receives parameters and can access the template schema.</p><pre>def main(params=None):<br>    return {<br>        &quot;data&quot;: {<br>            &quot;varname&quot;: &quot;Hello from Python!&quot;<br>        }<br>    }</pre><h3>Benefits for Developers</h3><h3>🤖 Enhanced AI Collaboration</h3><ul><li>AI agents can understand the project structure</li><li>Precise modifications without side effects</li><li>Code generation consistent with the rest of the project</li></ul><h3>🔧 Maintainability</h3><ul><li>Each module is independently testable</li><li>Updates without application recompilation</li><li>Easier debugging</li></ul><h3>🔒 Security</h3><p>The IPC architecture provides significant security benefits: sandboxed execution with templates running in isolated processes.</p><h3>Who Is This Project For?</h3><p>It’s, first and foremost, a testing ground to understand where we’re heading.</p><p><strong>Ideal for:</strong></p><ul><li>Developers exploring AI-assisted development</li><li>Teams wanting to integrate AI agents into their workflow</li><li>Software architects interested in emerging patterns</li><li>Anyone curious about the future of software development</li></ul><h3>Getting Started</h3><ol><li><strong>Clone the repository</strong>Bash</li></ol><pre>git clone https://github.com/FranBarInstance/neutral-starter-py</pre><ol><li><strong>Explore the modular structure</strong> and observe how each component is self-contained</li><li><strong>Experiment with AI agents</strong> using the architecture as a foundation</li></ol><h3>Final Thoughts</h3><p>Neutral Starter Py isn’t just another starter kit. It’s a statement of intent about how software development should evolve.</p><p>In a world where AI agents will become active collaborators on our development teams, designing architectures that facilitate this collaboration isn’t a luxury — it’s a necessity.</p><p><strong>Will the code of the future be written by humans alone?</strong> Probably not. <strong>Will it be written only by AI?</strong> Neither. It will be a collaboration, and projects like this help us define the rules of the game.</p><h3>Resources</h3><ul><li>🔗 <a href="https://github.com/FranBarInstance/neutral-starter-py">Neutral Starter Py on GitHub</a></li><li>🔗 <a href="https://franbarinstance.github.io/neutralts-docs/">Neutral TS Documentation</a></li><li>🔗 <a href="https://github.com/FranBarInstance/neutral-ipc">Neutral IPC Server</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37e1b6e7c5ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neutral TS: The Language-Agnostic Template Engine Built in Rust]]></title>
            <link>https://medium.com/@lanaguani/neutral-ts-the-language-agnostic-template-engine-built-in-rust-9a0e2e4e58e7?source=rss-59042e72ce5c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a0e2e4e58e7</guid>
            <dc:creator><![CDATA[Insurgent]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 10:17:40 GMT</pubDate>
            <atom:updated>2026-02-13T10:17:40.829Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write Once, Render Anywhere — A New Paradigm for Web Templates</h3><p>As developers, we’ve all faced this scenario: you’ve built a beautiful template system in Python, but now the team wants to migrate part of the application to Go. Or you’re working across multiple microservices in different languages and need consistent templating. What if there was a template engine that didn’t care about your programming language choice?</p><p>Enter <strong>Neutral TS</strong>.</p><h3>What is Neutral TS?</h3><p>NeutralTS is a safe, modular, language-agnostic template engine built in Rust. It works as a native Rust library or via IPC for other languages like Python and PHP. With NeutralTS you can reuse the same template across multiple languages with consistent results.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><p>It allows you to create templates compatible with any system and any programming language.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><h3>The Database Analogy</h3><p>The best way to understand NeutralTS’s architecture is to think about databases.</p><p>Imagine a database. It has a server, and different programming languages access the data through a client. This means that if you run a “SELECT …” query from any programming language, the result will always be the same. Similarly, Neutral TS has an IPC server, and each programming language has a client. No matter where you run the template, the result will always be the same.<a href="https://lib.rs/crates/neutralts">2</a></p><h3>Two Integration Modes</h3><h3>1. Native Rust Integration</h3><p>If you’re already working in Rust, you can use NeutralTS directly as a crate:</p><pre>use neutralts::Template;<br>use serde_json::json;<br><br>// Define your data schema<br>let schema = json!({<br>    &quot;data&quot;: {<br>        &quot;hello&quot;: &quot;Hello, World!&quot;,<br>        &quot;site&quot;: {<br>            &quot;name&quot;: &quot;My Site&quot;<br>        }<br>    }<br>});<br><br>// Create and render template<br>// In file.ntpl use {:;hello:} and {:;site-&gt;name:} to show data<br>let template = Template::from_file_value(&quot;file.ntpl&quot;, schema).unwrap();<br>let content = template.render();</pre><h3>2. IPC for Other Languages</h3><p>In Rust: You can use Neutral TS template engine as a library by downloading the crate. In other programming languages: Inter-Process Communication (IPC) is necessary, similar to how databases like MariaDB work.<a href="https://lib.rs/crates/neutralts">2</a></p><p>Here’s an example in Python:</p><pre>from neutraltemplate import NeutralTemplate<br><br>template = NeutralTemplate(&quot;file.ntpl&quot;, schema)<br>contents = template.render()<br><br># Get status information<br>status_code = template.get_status_code()  # e.g.: 200<br>status_text = template.get_status_text()  # e.g.: OK<br>status_param = template.get_status_param()  # empty if no error</pre><p>Examples for Rust, Python, PHP, Node.js and Go are available for download.<a href="https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/">3</a></p><h3>Understanding BIFs: The Core of NeutralTS</h3><p>The main element of Neutral TS is the BIF (Build-in function), which would be the equivalent of functions and would display an output. The output is always a string or nothing (empty string).<a href="https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/">3</a></p><p>The syntax follows a clear structure:text</p><pre> .-- open bif<br> |     .-- bif name<br> |     |               .-- params<br> |     |               |             .-- code<br> |     |               |             |   .-- close bif<br> |     |               |             |   |<br> v     v               v             v   v<br> -- ------- --------------------  ------ --<br> {:!include; {:flg; ... :} file &gt;&gt;  ...  :}<br>   -       - -------------      --<br>   ^       ^      ^             ^<br>   |       |      |             |<br>   |       |      |             ·-- params/code separator<br>   |       |      ·-- flags<br>   |       ·-- name separator<br>   ·-- modifier<br><br>                         .-- source<br>                         |<br>                         v<br>             ----------------------------<br> {:!include; {:flg; ... :} file &gt;&gt;  ...  :}<br> ------------------------------------------<br>                     ^<br>                     |<br>                     ·-- BIF (Built-in function)</pre><p>By design all BIFs can be nested and there can be a BIF anywhere in another BIF except in the name.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><h3>Security Benefits of the IPC Architecture</h3><p>One of the most compelling aspects of NeutralTS is its security model. The IPC architecture provides important security benefits: Sandboxed execution where templates run in isolated processes. Reduced attack surface with the main application protected from template engine vulnerabilities. Crash containment ensures template engine failures don’t affect the main application. Zero-downtime updates allow the IPC server to be updated independently without restarting client applications.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><h3>Built-in Internationalization</h3><p>NeutralTS includes powerful localization features out of the box. You define translations in your JSON schema:JSON</p><pre>{<br>  &quot;locale&quot;: {<br>    &quot;current&quot;: &quot;en&quot;,<br>    &quot;trans&quot;: {<br>      &quot;en&quot;: { &quot;Hello&quot;: &quot;Hello&quot; },<br>      &quot;es&quot;: { &quot;Hello&quot;: &quot;Hola&quot; },<br>      &quot;de&quot;: { &quot;Hello&quot;: &quot;Hallo&quot; },<br>      &quot;fr&quot;: { &quot;Hello&quot;: &quot;Bonjour&quot; }<br>    }<br>  }<br>}</pre><h3>Performance Considerations</h3><p>The IPC approach introduces performance overhead due to inter-process communication. For most web applications, the security and interoperability benefits compensate for the performance overhead.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><h3>The Schema: Your Data Contract</h3><p>The schema is a JSON where we define the data that will represent the templates, as well as the configuration and translations. Although you can render a template without schema since Neutral TS provides one by default, it will be of little use since it has no data.<a href="https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/">3</a></p><p>A typical schema includes:</p><ul><li><strong>config</strong>: Template rendering settings (caching, comments handling, JS options)</li><li><strong>inherit/locale</strong>: Translation definitions</li><li><strong>data</strong>: Your application data including context, routes, headers, cookies, and custom variables</li></ul><h3>Why Choose Neutral TS?</h3><ol><li><strong>True Portability</strong>: The same web template will work on any system and with any programming language.<a href="https://users.rust-lang.org/t/universal-web-template-engine-neutralts/124663">4</a></li><li><strong>Modular Design</strong>: Thanks to its modular and parameterizable design, it is possible to create utilities or plugins that will work everywhere. For example, you can develop tools to create forms or form fields and create your own libraries of “snippets” for repetitive tasks.<a href="https://lib.rs/crates/neutralts">2</a></li><li><strong>Rust-Powered Safety</strong>: Built with Rust’s memory safety guarantees</li><li><strong>Flexible Error Handling</strong>: It may be the case that the template contains a syntax error, in which case set the status code 500 and in the parameter the reason. Each programming language can implement it in a different way.<a href="https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/">3</a></li></ol><h3>Getting Started</h3><h3>For Rust Developers</h3><p>Add to your Cargo.toml:</p><pre>[dependencies]<br>neutralts = &quot;1.3&quot;</pre><h3>For Other Languages</h3><p>IPC Server: Universal standalone application (written in Rust) for all languages — download from the IPC Server repository.<a href="https://github.com/FranBarInstance/neutralts">1</a></p><p>Then install the client library for your language (available for Python, PHP, Node.js, and Go).</p><h3>Conclusion</h3><p>NeutralTS represents a fresh approach to web templating. By decoupling the template engine from any specific programming language, it offers teams the flexibility to evolve their tech stack without rewriting templates. The security benefits of process isolation, combined with consistent rendering across languages, make it an intriguing choice for polyglot environments and microservices architectures.</p><p>Whether you’re building a Rust application natively or need cross-language template compatibility, NeutralTS deserves a spot on your evaluation list.</p><p><strong>Resources:</strong></p><ul><li>GitHub: <a href="https://github.com/FranBarInstance/neutralts">github.com/FranBarInstance/neutralts</a></li><li>Documentation: <a href="https://franbarinstance.github.io/neutralts-docs/">NeutralTS Docs</a></li><li>Rust Crate: <a href="https://lib.rs/crates/neutralts">crates.io/crates/neutralts</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a0e2e4e58e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>