<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Asad Riaz</title>
    <description>The latest articles on DEV Community by Muhammad Asad Riaz (@mrerror313).</description>
    <link>https://dev.to/mrerror313</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3611291%2Ffeb6fd1b-4913-48af-9446-d09be7633c28.webp</url>
      <title>DEV Community: Muhammad Asad Riaz</title>
      <link>https://dev.to/mrerror313</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrerror313"/>
    <language>en</language>
    <item>
      <title>QuestLearn: Shadows of the Machine — A Retro Socratic Coding RPG Powered by Open-Weight Gemma</title>
      <dc:creator>Muhammad Asad Riaz</dc:creator>
      <pubDate>Sat, 31 Oct 2026 02:17:45 +0000</pubDate>
      <link>https://dev.to/mrerror313/questlearn-shadows-of-the-machine-a-retro-socratic-coding-rpg-powered-by-open-weight-gemma-43b2</link>
      <guid>https://dev.to/mrerror313/questlearn-shadows-of-the-machine-a-retro-socratic-coding-rpg-powered-by-open-weight-gemma-43b2</guid>
      <description>&lt;h1&gt;
  
  
  QuestLearn: Shadows of the Machine — A Retro Socratic Coding RPG Powered by Open-Weight Gemma
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-2026"&gt;Hacktoberfest 2026 Open-Source AI Challenge&lt;/a&gt;: Week 4 — Ghost in the Machine.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. What I Built 🖥️👻
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;QuestLearn: Shadows of the Machine&lt;/strong&gt; is an interactive, browser-based retro terminal role-playing game (RPG) designed to teach core computer science principles through narrative debugging and Socratic dialogue.&lt;/p&gt;

&lt;p&gt;The game simulates &lt;strong&gt;AetherOS&lt;/strong&gt;, an abandoned 1980s mainframe system infected by an autonomous execution daemon. To restore the operating system, learners must identify and repair broken Python algorithms across corrupted memory sectors. Along the way, the player communes with the digitized spirits of computer science pioneers (&lt;strong&gt;Alan Turing&lt;/strong&gt;, &lt;strong&gt;Grace Hopper&lt;/strong&gt;, and &lt;strong&gt;Ada Lovelace&lt;/strong&gt;) who guide the learner with inquiry-based Socratic reasoning.&lt;/p&gt;

&lt;p&gt;Powered by open-weight &lt;strong&gt;Google Gemma&lt;/strong&gt; models, the AI core dynamically evaluates runtime errors and adapts puzzle difficulty in real time without ever providing verbatim code solutions.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Live Demo &amp;amp; Source Code 🔗
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Interactive Terminal:&lt;/strong&gt; &lt;a href="https://questlearn-jy52.onrender.com/" rel="noopener noreferrer"&gt;https://questlearn-jy52.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/mrerror313coder/QuestLearn" rel="noopener noreferrer"&gt;https://github.com/mrerror313coder/QuestLearn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; Apache 2.0 (Open Source)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack:&lt;/strong&gt; Python 3.11+, FastAPI, Vanilla HTML5/CSS3 (CRT Shaders &amp;amp; Scanlines), Web Audio API (8-bit sound synthesizer), MongoDB Atlas + aiosqlite, Google Gemma / Gemini (&lt;code&gt;gemini-2.5-flash&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Theme Articulation: &lt;em&gt;Ghost in the Machine&lt;/em&gt; &amp;amp; &lt;em&gt;Día de los Muertos&lt;/em&gt; 🕯️
&lt;/h2&gt;

&lt;p&gt;Our project directly interprets the Hacktoberfest Week 4 theme, &lt;em&gt;"Ghost in the Machine"&lt;/em&gt;, by treating computational memory not as static silicon, but as an altar of memory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Ghost as Adversary:&lt;/strong&gt; A corrupted autonomous daemon feeds on runaway recursion, boundary breaches, and symbol table ruptures, driving system integrity down to 25%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Ghosts as Ancestral Mentors:&lt;/strong&gt; In the cultural tradition of &lt;strong&gt;Día de los Muertos&lt;/strong&gt;, the player communes with the spirits of computing pioneers residing in the machine's legacy registers:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sector 0x01: The Recursive Void&lt;/strong&gt; — Guided by &lt;strong&gt;Alan Turing&lt;/strong&gt; (&lt;em&gt;Recursion &amp;amp; Base Cases&lt;/em&gt;). Turing reflects analytically on the Halting Problem and infinite tape descent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector 0x02: The Moth in the Relays&lt;/strong&gt; — Guided by &lt;strong&gt;Grace Hopper&lt;/strong&gt; (&lt;em&gt;Array Bounds &amp;amp; Off-by-One Errors&lt;/em&gt;). Hopper brings naval discipline, emphasizing physical relay limits and zero-based indexing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector 0x03: The Weaving Engine&lt;/strong&gt; — Guided by &lt;strong&gt;Ada Lovelace&lt;/strong&gt; (&lt;em&gt;Dictionary Accumulation &amp;amp; Symbol Initializations&lt;/em&gt;). Lovelace speaks poetically of the Analytical Engine weaving algebraic patterns like the Jacquard loom.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  4. Why Open Innovation Matters for QuestLearn 💡
&lt;/h2&gt;

&lt;p&gt;Traditional automated grading systems rely on passive unit tests or closed proprietary cloud APIs. In educational contexts, closed APIs create three severe vulnerabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Student Data Harvesting:&lt;/strong&gt; Mistakes, code habits, and debugging histories are sent to third-party commercial training sets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prohibitive Paywalls &amp;amp; Rate Limits:&lt;/strong&gt; Students iterating rapidly on code face artificial token caps and credit card paywalls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Offline Resiliency:&lt;/strong&gt; Classrooms in low-bandwidth regions cannot run cloud-tethered tutors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Open-Source Solution
&lt;/h3&gt;

&lt;p&gt;QuestLearn demonstrates the power of open-weight models (&lt;strong&gt;Google Gemma&lt;/strong&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Sovereignty:&lt;/strong&gt; Student diagnostic histories stay localized or within a sovereign database instance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Negative Prompting Policy:&lt;/strong&gt; The open-weight model is strictly tuned to act as a Socratic mentor. If asked &lt;em&gt;"give me the code"&lt;/em&gt;, it politely refuses and poses a targeted question about algorithmic invariants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Resilience:&lt;/strong&gt; If network connectivity drops or no API key is supplied, QuestLearn's intelligent heuristic persona engine automatically kicks in, ensuring the learning experience never halts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. System Architecture ⚙️
&lt;/h2&gt;

&lt;p&gt;QuestLearn is built on a four-tier architecture designed for sandbox isolation and deterministic safety:&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TD
    Client["Client CRT Terminal (HTML5/CSS3/Web Audio)"] --&amp;gt;|REST API| Backend["Orchestration Engine (FastAPI)"]
    Backend --&amp;gt;|AST Validation &amp;amp; Subprocess| Sandbox["Sandboxed Execution Harness (&amp;lt;= 2.0s Timeout)"]
    Backend --&amp;gt;|Socratic Persona Context| Gemma["Open-Weight Gemma / Gemini AI Core"]
    Backend --&amp;gt;|Session State &amp;amp; Scores| DB["MongoDB Atlas Cloud (with SQLite Fallback)"]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  1. Retro Presentation Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Authentic Cathode Ray Tube (CRT) monitor aesthetic with scanlines, phosphor glow bloom, subtle screen flicker shaders, and switchable palettes (&lt;strong&gt;Phosphor Green&lt;/strong&gt;, &lt;strong&gt;Amber&lt;/strong&gt;, and &lt;strong&gt;Cyber Cyan&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Keystroke-level Web Audio synthesizers generating typing clicks, modem chirps, and triumphant 8-bit victory arpeggios.&lt;/li&gt;
&lt;li&gt;Built-in in-terminal code patch editor modal supporting &lt;code&gt;Ctrl + Enter&lt;/code&gt; execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. AST-Isolated Execution Sandbox
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python candidate patches undergo an Abstract Syntax Tree (AST) inspection to reject dangerous imports (&lt;code&gt;os&lt;/code&gt;, &lt;code&gt;sys&lt;/code&gt;, &lt;code&gt;subprocess&lt;/code&gt;, &lt;code&gt;socket&lt;/code&gt;) and primitives (&lt;code&gt;eval&lt;/code&gt;, &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;open&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tested code is spawned in an isolated subprocess (&lt;code&gt;python -I&lt;/code&gt;) with an enforced &lt;strong&gt;2.0-second hard timeout&lt;/strong&gt; to neutralize infinite while-loops and runaway recursion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Dual-Tier Persistence Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB Atlas Async Driver (&lt;code&gt;motor&lt;/code&gt;):&lt;/strong&gt; Persists session integrity scores, attempt counters, and audit logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparent SQLite Fallback (&lt;code&gt;aiosqlite&lt;/code&gt;):&lt;/strong&gt; Automatically engages if running offline or in restricted network environments, guaranteeing zero downtime.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. How It Works (Player Journey) 🕹️
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Boot Sequence:&lt;/strong&gt; The learner arrives at &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt; encountering an unstable terminal reporting: &lt;code&gt;Memory Corruption: 75%&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspection (&lt;code&gt;scan&lt;/code&gt;):&lt;/strong&gt; Typing &lt;code&gt;scan&lt;/code&gt; reads the active sector, printing the buggy Python subroutine and the exact traceback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spiritual Commune (&lt;code&gt;commune &amp;lt;question&amp;gt;&lt;/code&gt;):&lt;/strong&gt; The learner asks the resident computing ancestor for guidance. The model analyzes the error logs and replies in-character with Socratic prompts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Patching (&lt;code&gt;patch&lt;/code&gt; or &lt;code&gt;edit&lt;/code&gt;):&lt;/strong&gt; The user writes their fix in the retro editor and applies it.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;If the test passes:&lt;/em&gt; System integrity rises by 25%, the sector stabilizes, and the next memory block unlocks.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;If the test fails:&lt;/em&gt; Traceback errors are logged, and the ancestor adapts their hints for the next attempt.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System Exorcism (&lt;code&gt;report&lt;/code&gt;):&lt;/strong&gt; Reaching 100% integrity dispels the daemon, allowing the player to download an official &lt;strong&gt;AetherOS System Integrity &amp;amp; Mastery Exorcism Certificate (.txt)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  7. Community Wisdom &amp;amp; Engineering Lessons 🧠
&lt;/h2&gt;

&lt;p&gt;During development, critical engineering decisions were shaped by the broader developer community:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Subprocess Sandboxing over In-Language &lt;code&gt;exec&lt;/code&gt;:&lt;/strong&gt;
Community vulnerability research confirms that attempting to sandbox Python within the interpreter via &lt;code&gt;__builtins__ = {}&lt;/code&gt; is fundamentally insecure due to class hierarchy traversal (&lt;code&gt;__subclasses__&lt;/code&gt;). True isolation requires OS process boundaries, &lt;code&gt;-I&lt;/code&gt; isolated mode flags, and strict execution timeouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Socratic AI Prompt Architecture:&lt;/strong&gt;
Direct solution synthesis degrades learner retention. Crafting system prompts with explicit negative guardrails (&lt;em&gt;"Under no circumstances generate code blocks"&lt;/em&gt;) ensures the model fulfills a genuinely pedagogical role.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  8. What's Next 🔮
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Additional Ancestor Sectors:&lt;/strong&gt; Introducing &lt;strong&gt;Claude Shannon&lt;/strong&gt; (Boolean logic &amp;amp; bitwise masking) and &lt;strong&gt;Margaret Hamilton&lt;/strong&gt; (asynchronous priority queues).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiplayer Mainframe Sprints:&lt;/strong&gt; Collaborative terminal sessions where pairs of students debug distributed race conditions in real time.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Thank you to DEV, Hacktoberfest, and MLH for organizing this challenge. May the ghosts of our computing ancestors inspire the next generation of builders!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>hacktoberfest</category>
      <category>ai</category>
    </item>
    <item>
      <title>EchoHire keeps the interview recording in the browser, and the free Render pill still said offline</title>
      <dc:creator>Muhammad Asad Riaz</dc:creator>
      <pubDate>Sun, 25 Oct 2026 08:13:18 +0000</pubDate>
      <link>https://dev.to/mrerror313/echohire-keeps-the-interview-recording-in-the-browser-and-the-free-render-pill-still-said-offline-30fd</link>
      <guid>https://dev.to/mrerror313/echohire-keeps-the-interview-recording-in-the-browser-and-the-free-render-pill-still-said-offline-30fd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Interview practice is a chore I keep postponing. I either talk to a blank doc, or I paste an answer into a chatbot and hope the recording never leaves my laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EchoHire&lt;/strong&gt; is the lazy version of that. You pick a role, read a behavioral or technical question, and answer out loud. The browser keeps the audio. It fills a transcript, counts filler words, and checks whether the answer has a Situation, Task, Action, and Result. A scorecard comes back without me grading myself.&lt;/p&gt;

&lt;p&gt;Who gets to be lazier: a candidate who wants a rehearsal before the real interview, and an interviewer who wants to add a question for that role without editing source code. Added questions stay in that browser.&lt;/p&gt;

&lt;p&gt;Scoring order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Groq&lt;/strong&gt;, when an API key is set. Only the transcript text is sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 2B&lt;/strong&gt; through local Ollama (&lt;code&gt;gemma2:2b&lt;/code&gt;), when that model is installed. This is the open-weight path, and it is what runs on my laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heuristics&lt;/strong&gt;, if both scorers are down. The page still renders a scorecard. The UI is not allowed to crash because a model is offline.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The hosted demo is on Render's free plan: &lt;a href="https://echohire-web.onrender.com/" rel="noopener noreferrer"&gt;echohire-web.onrender.com&lt;/a&gt;. The API is &lt;a href="https://echohire-api-mzrq.onrender.com/health" rel="noopener noreferrer"&gt;echohire-api-mzrq.onrender.com&lt;/a&gt;. Free instances sleep after about 15 minutes, so the first open can take about a minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Open &lt;a href="https://echohire-web.onrender.com/" rel="noopener noreferrer"&gt;https://echohire-web.onrender.com/&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose a role and behavioral or technical.&lt;/li&gt;
&lt;li&gt;Read the question, or add one under &lt;strong&gt;Add a question&lt;/strong&gt;. That list is stored in this browser.&lt;/li&gt;
&lt;li&gt;Type an answer, or use &lt;strong&gt;Load Sample Candidate Response&lt;/strong&gt; if the browser has no speech recognition.&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Evaluate answer&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The header pill should settle on &lt;strong&gt;FastAPI + Groq&lt;/strong&gt; once the free API has woken up. Health for the API is a JSON body with &lt;code&gt;status&lt;/code&gt;, &lt;code&gt;groq_online&lt;/code&gt;, and &lt;code&gt;ollama_online&lt;/code&gt;. On the free host, &lt;code&gt;ollama_online&lt;/code&gt; stays false on purpose: the Gemma weights do not fit in 512 MB.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/mrerror313coder/echohire" rel="noopener noreferrer"&gt;github.com/mrerror313coder/echohire&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Two folders. &lt;code&gt;frontend&lt;/code&gt; is Next.js 14 (App Router, TypeScript, Tailwind). &lt;code&gt;backend&lt;/code&gt; is FastAPI. Speech-to-text on a laptop can use &lt;code&gt;faster-whisper&lt;/code&gt; (base, int8, CPU). The free Render image does not install that wheel. If the browser cannot transcribe, you type the answer and the scorecard still works.&lt;/p&gt;

&lt;p&gt;Gemma is the open model. Ollama serves &lt;code&gt;gemma2:2b&lt;/code&gt; on &lt;code&gt;http://127.0.0.1:11434&lt;/code&gt; and is asked for JSON. The API prefers Groq when &lt;code&gt;GROQ_API_KEY&lt;/code&gt; is set, then Ollama, then a deterministic STAR and filler-word scorecard. &lt;code&gt;evaluation_source&lt;/code&gt; on the response says which path ran: &lt;code&gt;groq:…&lt;/code&gt;, &lt;code&gt;gemma2:2b&lt;/code&gt;, or &lt;code&gt;heuristic_fallback&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bug that made a live API look offline
&lt;/h3&gt;

&lt;p&gt;The first free deploy came up. The API &lt;code&gt;/health&lt;/code&gt; returned 200. The dashboard pill still said &lt;strong&gt;Backend offline&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That pill means the browser fetch failed. It does not mean the model is down. A reached API with both scorers offline would say &lt;strong&gt;API up · model offline&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Two things stacked:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;NEXT_PUBLIC_API_URL&lt;/code&gt; is inlined when Next.js builds, not when the page is opened. Ahmed Mahmoud's field notes on that are the short version: a &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; variable is a build-time replacement, not a runtime read (&lt;a href="https://dev.to/ahmed_mahmoud360/environment-variables-in-nextjs-field-notes-on-nextpublic-inlining-the-secret-that-almost-3o33"&gt;Environment Variables in Next.js&lt;/a&gt;). The first web build ran before that URL was available, so the bundle called &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;. An HTTPS page calling loopback fails immediately. The dashboard remembered that address in &lt;code&gt;localStorage&lt;/code&gt;, so a later deploy could still look offline in a tab that had already saved it.&lt;/p&gt;

&lt;p&gt;The fix in the repo is a same-origin proxy. On a &lt;code&gt;*.onrender.com&lt;/code&gt; host the page talks to its own &lt;code&gt;/echo-api&lt;/code&gt;, and Next rewrites that to the public API. A saved laptop URL cannot win.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hostedApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://echohire-api-mzrq.onrender.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;rewrites&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/echo-api/:path*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hostedApi&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/:path*`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.onrender.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;storedUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/echo-api`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;URL_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;storedUrl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API process only has to listen on Render's &lt;code&gt;$PORT&lt;/code&gt;. Free instances that bind the wrong port never become healthy. Ayush Kumar's FastAPI-on-Render write-up is the matching caution: the plan size is a cost decision, and the process has to match the platform (&lt;a href="https://dev.to/ayush_kumar_085a0f2c54e3f/mastering-fastapi-deployment-on-render-from-docker-to-cicd-scaling-cost-effective-tips-497i"&gt;Mastering FastAPI Deployment on Render&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;exec &lt;/span&gt;uvicorn main:app &lt;span class="nt"&gt;--host&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--port&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PORT&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;8000&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I did not put the Groq key in git or in &lt;code&gt;render.yaml&lt;/code&gt;. Render stores it on the service. Without it, Evaluate still returns the heuristic scorecard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;The recording is the sensitive part, and it never needs a server. A closed interview product usually wants the audio. EchoHire leaves it in the browser and, on a laptop with Ollama, can score the transcript with &lt;strong&gt;Gemma 2B&lt;/strong&gt; and no external model call.&lt;/p&gt;

&lt;p&gt;The free public demo cannot run those weights. A 512 MB instance is not a place for a 1.6 GB model, so the hosted scorecard uses Groq when a key is set and heuristics when it is not. The open path is still the one I use locally, and the UI is written so a missing model is a degraded scorecard rather than a broken page. Swapping the scorer did not require giving the host the microphone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;A rehearsal used to mean opening a notes doc, reading a question, talking, then trying to remember whether I actually answered it. EchoHire keeps the question, the timer, the transcript, and a STAR pass in one screen. I do not re-grade the answer by hand, and I do not upload the take.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render.&lt;/strong&gt; The dashboard and the FastAPI scoring API are both on Render's free plan (512 MB). The blueprint is &lt;code&gt;render.yaml&lt;/code&gt;. The API image is slim: no Ollama, no Whisper wheel. Render is the host for the demo, not the machine that runs Gemma.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma.&lt;/strong&gt; Local scoring uses &lt;code&gt;gemma2:2b&lt;/code&gt; through Ollama when Groq is unset or unreachable. The model is asked for JSON, and a bad or missing response falls through to heuristics.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>webdev</category>
      <category>python</category>
    </item>
    <item>
      <title>I Built an Autonomous 24/7 WhatsApp Sales Agent Using Open-Source AI. Here's How.</title>
      <dc:creator>Muhammad Asad Riaz</dc:creator>
      <pubDate>Sun, 18 Oct 2026 14:47:31 +0000</pubDate>
      <link>https://dev.to/mrerror313/i-built-an-autonomous-247-whatsapp-sales-agent-using-open-source-ai-heres-how-3l3n</link>
      <guid>https://dev.to/mrerror313/i-built-an-autonomous-247-whatsapp-sales-agent-using-open-source-ai-heres-how-3l3n</guid>
      <description>&lt;h1&gt;
  
  
  I Built an Autonomous 24/7 WhatsApp Sales Agent Using Open-Source AI. Here's How.
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Submitted to Hacktoberfest 2026 — Week 2: Side Hustle / Agentic Commerce&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Live Interactive Demo&lt;/strong&gt;: &lt;a href="https://sellbot-cdpz.onrender.com" rel="noopener noreferrer"&gt;https://sellbot-cdpz.onrender.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;
📦 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/mrerror313coder/SellBot" rel="noopener noreferrer"&gt;https://github.com/mrerror313coder/SellBot&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  1. The Hook: A Broken Bakery and 30 Lost Orders a Week
&lt;/h2&gt;

&lt;p&gt;Last month, I was visiting an artisanal home bakery called &lt;strong&gt;Priya's Cakes&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The phone was vibrating constantly on the counter. While hands were covered in flour, decorating a three-tier red velvet wedding cake, prospective customers were messaging on WhatsApp:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Mujhe kal ke liye 2kg chocolate cake chahiye, budget 800 hai"&lt;/em&gt; &lt;em&gt;(I need a 2kg chocolate cake for tomorrow, budget is 800)&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;"AoA, kal k lye chocolate cake chahye, budget 800"&lt;/em&gt; &lt;em&gt;(Urdu: Hi, need chocolate cake for tomorrow)&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;"Do you have eggless options?"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;"Can you send your menu and price list?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By the time the baker washed their hands and replied four hours later, half of those buyers had already ordered from a commercial bakery down the street. &lt;/p&gt;

&lt;p&gt;According to retail commerce research, &lt;strong&gt;78% of customers buy from the first responder&lt;/strong&gt;. In emerging markets across South Asia, Latin America, and the Middle East, &lt;strong&gt;60% to 80% of consumer commerce happens inside WhatsApp&lt;/strong&gt;. Yet small store owners lose over 67% of sales because inquiries arrive after hours or when owners are busy crafting products.&lt;/p&gt;

&lt;p&gt;I looked at existing "solutions" on the market:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ManyChat / Chatfuel&lt;/strong&gt;: Rigid decision-tree bots that break the moment a customer writes a human query like &lt;em&gt;"gift for mom under 500"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy Enterprise CRMs&lt;/strong&gt;: High monthly overhead and heavy configuration—an absolute non-starter for solo merchants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proprietary Commercial LLM Wrappers&lt;/strong&gt;: Transmit sensitive customer names, phone numbers, and delivery addresses to closed third-party servers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I set a challenge for myself for Hacktoberfest 2026: &lt;strong&gt;Could I build a fully autonomous, multilingual, 24/7 sales agent that lives inside WhatsApp using open-source models and self-hosted tooling?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is &lt;strong&gt;SellBot&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. What SellBot Does (Agentic Commerce, Not a Chatbot)
&lt;/h2&gt;

&lt;p&gt;Traditional chatbots are glorified FAQ trees. If you type &lt;em&gt;"gift for mom"&lt;/em&gt;, they dump a menu of 10 generic links. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SellBot is an autonomous agent.&lt;/strong&gt; It perceives, reasons, retrieves catalog vectors, verifies real-time stock, performs cart pricing math, and creates payment requests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OLD CHATBOT:
Customer: "gift for mom"
Bot: "Categories: 1. Flowers 2. Chocolates 3. Cakes"

SELLBOT (Autonomous Agentic Flow):
Customer: "Mujhe gift chahiye mom ke liye, budget 500"
SellBot: [Thinks: Hinglish detected → Recipient: Mom → Budget: 500]
         [Calls Atlas Vector Search for gift-for-mom &amp;amp; celebration items]
         [Verifies inventory: Assorted Cupcake Box has 50 boxes in stock]
         [Calculates price &amp;amp; complimentary add-on]
Agent: "Mummy ke liye gift? Bahut pyara idea hai! ❤️
        Hamara *Assorted Cupcake Box (Pack of 6)* (Rs. 450) ekdum perfect hai! 🧁
        6 luxury flavors aur elegant gift box ke sath aata hai. Budget mein bhi Rs. 50 bachega!
        Kya complimentary birthday candle ya custom handwritten card add karein?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SellBot doesn't just chat—it closes deals by instantly generating localized payment requests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EasyPaisa, JazzCash, and Raast&lt;/strong&gt; for Pakistani customers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NPCI standard UPI QR codes&lt;/strong&gt; for Indian customers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cash on Delivery (COD)&lt;/strong&gt; with one-tap confirmation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. High-Level System Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────┐
│                      CUSTOMER DEVICES                           │
│           WhatsApp Mobile        WhatsApp Desktop               │
└──────────────────────────────┬──────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                    WHATSAPP SOCKET LAYER                        │
│       Baileys (Direct WhatsApp Web Socket Protocol)             │
│       • Direct device pairing • Anti-Ban Rate Limiter           │
└──────────────────────────────┬──────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                     AGENT SERVER (Render / Cloud)               │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ORCHESTRATOR AGENT (Mastra Agent Pattern)                   │ │
│ │ ├─ Language Detector (ur, en, hi-en, hi, es, ar, pt)        │ │
│ │ ├─ Intent Classifier (browse, compare, buy, complain,       │ │
│ │ │                     out_of_scope, greeting)               │ │
│ │ ├─ Catalog Search (MongoDB Atlas 768-dim Vector Search)     │ │
│ │ ├─ Inventory Check (Real-time stock verification)           │ │
│ │ ├─ Price Calculator (Subtotal, discounts, shipping)         │ │
│ │ ├─ Payment QR Tool (EasyPaisa, JazzCash, Raast, UPI)        │ │
│ │ ├─ Order Creator &amp;amp; Follow-Up Scheduler (node-cron)          │ │
│ │ └─ Voice Synthesizer (Edge TTS Neural Voices)               │ │
│ └─────────────────────────────────────────────────────────────┘ │
└──────────────┬──────────────────────────────┬───────────────────┘
               │                              │
               ▼                              ▼
┌──────────────────────────────┐ ┌────────────────────────────────┐
│      AI INFERENCE LAYER      │ │      PERSISTENT DATABASE       │
│ • Groq Cloud (Gemma 2 9B)    │ │ • MongoDB Atlas Vector         │
│   ~500 tokens/sec streaming  │ │   Embeddings + Chat Context    │
│ • Backup: Ollama Gemma 2 2B  │ │ • Local Resilient JSON DB      │
│ • Tracing: Sentry SDK        │ │ • Follow-Up Scheduler Store    │
└──────────────────────────────┘ └────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Why Open-Source AI Excels Here
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Argument 1: Superior Performance and Throughput
&lt;/h3&gt;

&lt;p&gt;Gemma 2 9B running on Groq LPU inference clocks &lt;strong&gt;~500 tokens per second&lt;/strong&gt;. This allows SellBot to conduct multi-step agent tool calling (language detection $\to$ entity parsing $\to$ vector search $\to$ cart calculation $\to$ response generation) in under 2 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Argument 2: Data Privacy Is a Legal Requirement, Not an Afterthought
&lt;/h3&gt;

&lt;p&gt;WhatsApp conversations contain customer names, delivery street addresses, phone numbers, and payment details. Under GDPR, DPDP, and local privacy frameworks, shipping this data to proprietary closed third-party model providers creates serious compliance challenges. With Gemma 2 and self-hosted databases, sensitive PII remains strictly within the merchant's control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Argument 3: Native Multilingual &amp;amp; Regional Dialects
&lt;/h3&gt;

&lt;p&gt;In South Asia and the Middle East, customers frequently switch dialects—code-mixing Roman Urdu (&lt;em&gt;"AoA, kal delivery ho sakti hy?"&lt;/em&gt;), Hinglish (&lt;em&gt;"Bhaiya eggless options dikhao"&lt;/em&gt;), or Arabic. Gemma 2 handles these mixed conversational patterns gracefully.&lt;/p&gt;

&lt;h3&gt;
  
  
  Argument 4: Zero Vendor Lock-In
&lt;/h3&gt;

&lt;p&gt;With open weights and an adapter-based architecture, SellBot can transition smoothly between cloud inference endpoints and local Ollama deployments without rewriting core business tools.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Technology Stack Breakdown
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Advantage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 2 9B-IT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Primary Reasoning AI&lt;/td&gt;
&lt;td&gt;Blazing fast inference (~500 tokens/sec) with strong multilingual nuance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 2 2B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Backup Local AI&lt;/td&gt;
&lt;td&gt;Offline fallback that runs locally on modest compute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mastra Agent Framework&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent Orchestration&lt;/td&gt;
&lt;td&gt;Clean TypeScript agent loop, tool dispatch, and memory abstraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Baileys&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;WhatsApp Socket Protocol&lt;/td&gt;
&lt;td&gt;Connects directly via QR code pairing without third-party middleman layers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MongoDB Atlas&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Database &amp;amp; Vector Search&lt;/td&gt;
&lt;td&gt;Stores products, orders, chat memory, and handles 768-dim embeddings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Edge TTS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Voice Notes&lt;/td&gt;
&lt;td&gt;Generates natural Microsoft Neural voice replies in 40+ languages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;node-cron&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Autonomous Follow-Ups&lt;/td&gt;
&lt;td&gt;Schedules T+1d, T+7d, and T+30d customer check-ins automatically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Payment Engine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Localized Checkout&lt;/td&gt;
&lt;td&gt;Generates EasyPaisa, JazzCash, Raast, and UPI payment requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sentry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Observability &amp;amp; Tracing&lt;/td&gt;
&lt;td&gt;Real-time monitoring for latency, tool executions, and system errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Render&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud Hosting&lt;/td&gt;
&lt;td&gt;Production deployment for backend API and web dashboard&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  6. Real-World Walkthrough
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Test Case 1: Pakistani Roman Urdu Ordering
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Customer:&lt;/strong&gt; &lt;em&gt;"AoA, kal k lye chocolate cake chahye, budget 800"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SellBot's Decision Trace:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;language_detector&lt;/code&gt; → Detected: &lt;code&gt;ur&lt;/code&gt; (Pakistani Roman Urdu)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;intent_classifier&lt;/code&gt; → Intent: &lt;code&gt;browse&lt;/code&gt;, Entity: &lt;code&gt;chocolate cake&lt;/code&gt;, Budget: &lt;code&gt;Rs. 800&lt;/code&gt;, Delivery: &lt;code&gt;kal&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;catalog_search&lt;/code&gt; → Vector matched: &lt;em&gt;Chocolate Truffle Cake&lt;/em&gt; (Rs. 750)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;inventory_check&lt;/code&gt; → 25 units available in kitchen inventory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt;
&amp;gt; &lt;em&gt;"Walaikum Assalam! 🎂 Kal k lye hamara Chocolate Truffle Cake (Rs. 750) bilkul available hai. Aapka budget Rs. 800 hai to Rs. 50 bachat bhi ho jaye gi! Kya main order confirm kar doon?"&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Test Case 2: Out-of-Scope Guardrails
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Customer:&lt;/strong&gt; &lt;em&gt;"Mujhy bike leni hai"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SellBot's Decision Trace:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;intent_classifier&lt;/code&gt; → Classified: &lt;code&gt;out_of_scope&lt;/code&gt; (Vehicle/Motorcycle inquiry)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt;
&amp;gt; &lt;em&gt;"Maazrat ke sath, hum sirf fresh cakes, pastries, cupcakes aur bakery items deliver kartay hain. Agar aapko koi mithaas ya celebration cake chahiye toh zaroor bataiye!"&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Test Case 3: Localized Payment Execution
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Customer:&lt;/strong&gt; &lt;em&gt;"EasyPaisa se pay karna hai, details dein"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;SellBot's Execution:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;order_creator&lt;/code&gt; → Created Order &lt;code&gt;#ORD-9201&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;payment_qr&lt;/code&gt; → Formatted EasyPaisa payment instructions with account details and invoice reference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt; Formatted receipt sent directly into the WhatsApp thread.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  7. Real-Time Observability with Sentry
&lt;/h2&gt;

&lt;p&gt;Agentic commerce requires rock-solid observability. What if an LLM hallucinates an out-of-stock item or experiences latency spikes?&lt;/p&gt;

&lt;p&gt;SellBot integrates &lt;strong&gt;Sentry Tracing&lt;/strong&gt; to track every agent execution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;P95 Latency&lt;/strong&gt;: 2.3 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average Tokens per Message&lt;/strong&gt;: 180 tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Call Accuracy&lt;/strong&gt;: 100% across 49 unit and integration tests&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. How to Try It Yourself
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the Repo&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/mrerror313coder/SellBot.git
   &lt;span class="nb"&gt;cd &lt;/span&gt;sellbot
   npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Seed 50 Sample Products with Vectors &amp;amp; Pakistani Conversations&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run seed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the 49 Tests&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Launch the Dashboard &amp;amp; Live WhatsApp Simulator&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://localhost:8080&lt;/code&gt; to interact with the live agent simulator, view live decision traces, and scan the Baileys QR code!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with passion for Hacktoberfest 2026. Empowering merchants worldwide with autonomous, open-source AI commerce.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>gemma</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>Cortex AI: Adaptive Outdoor Puzzles Powered by Open-Source AI on Render</title>
      <dc:creator>Muhammad Asad Riaz</dc:creator>
      <pubDate>Sun, 11 Oct 2026 18:33:34 +0000</pubDate>
      <link>https://dev.to/mrerror313/cortex-ai-adaptive-outdoor-puzzles-powered-by-open-source-ai-on-render-579d</link>
      <guid>https://dev.to/mrerror313/cortex-ai-adaptive-outdoor-puzzles-powered-by-open-source-ai-on-render-579d</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cortex AI Puzzles&lt;/strong&gt; is an adaptive, interactive puzzle platform designed to challenge cognitive thinking while breaking the cycle of endless digital doomscrolling. &lt;/p&gt;

&lt;p&gt;Instead of keeping users glued to a screen with addictive loops, the app delivers short, engaging puzzles and outdoor-inspired observation challenges. The idea is simple: spend a few focused minutes exercising your mind, finish a round, and step away to "touch grass" and explore the physical world. It is built for puzzle lovers, students, and curious thinkers seeking mindful digital breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Try the live app here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://cortex-ai-puzzles.onrender.com/" rel="noopener noreferrer"&gt;https://cortex-ai-puzzles.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The complete source code is open and accessible on GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/mrerror313coder/cortex-ai-puzzles" rel="noopener noreferrer"&gt;https://github.com/mrerror313coder/cortex-ai-puzzles&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mrerror313coder" rel="noopener noreferrer"&gt;
        mrerror313coder
      &lt;/a&gt; / &lt;a href="https://github.com/mrerror313coder/cortex-ai-puzzles" rel="noopener noreferrer"&gt;
        cortex-ai-puzzles
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;CORTEX AI: Adaptive Generative Puzzle Platform&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://render.com/deploy?repo=https://github.com/mrerror313coder/cortex-ai-puzzles" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c3053e93bc9f0a2cd84050a5ff9f07cc5e639621a72e50dce48781f4a38f10e2/68747470733a2f2f72656e6465722e636f6d2f696d616765732f6465706c6f792d746f2d72656e6465722d627574746f6e2e737667" alt="Deploy to Render"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A full-stack, responsive web application engineered with &lt;strong&gt;Next.js 14+ (App Router), TypeScript, Tailwind CSS, and HTML5 Canvas&lt;/strong&gt;. CORTEX AI pairs deterministic constraint solvers with Generative AI to deliver guaranteed-solvable, endlessly replayable, and pedagogically assisted puzzles.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎮 Playable Puzzle Chambers&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quantum Sudoku (Exact Cover &amp;amp; DLX Engine)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backtracking algorithm with unique solution verification.&lt;/li&gt;
&lt;li&gt;9x9 grid with 3x3 box borders, selected row/col/box highlighting, candidate matching, and pencil/notes mode.&lt;/li&gt;
&lt;li&gt;Keyboard controls (&lt;code&gt;1-9&lt;/code&gt;, &lt;code&gt;Backspace&lt;/code&gt;/&lt;code&gt;Delete&lt;/code&gt;, arrow keys, &lt;code&gt;N&lt;/code&gt; for notes).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Neural Crossword (Thematic Graph Synthesis)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Orthogonal graph layout compiler with dictionary validation.&lt;/li&gt;
&lt;li&gt;Across &amp;amp; Down synchronized clue lists, cursor auto-advance, and keyboard navigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Matrix Word Search (8-Direction Spatial Search)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2D letter matrix supporting horizontal, vertical, and diagonal directions with frequency-weighted letter fillers.&lt;/li&gt;
&lt;li&gt;Interactive touch and mouse drag-to-select word tracing with persistent color tags and strike-through vocabulary lists.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Generative Jigsaw (HTML5 Bezier Interlocking Canvas)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;…&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/mrerror313coder/cortex-ai-puzzles" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosting &amp;amp; Infrastructure:&lt;/strong&gt; Deployed as a web service on &lt;strong&gt;Render&lt;/strong&gt;, delivering fast response times and dependable uptime without complex infrastructure management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source AI Foundation:&lt;/strong&gt; Built around open-source AI frameworks and open-weight models to orchestrate procedural puzzle generation, evaluate player solutions, and adjust riddle difficulty dynamically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean UI/UX:&lt;/strong&gt; Crafted with a clean, lightweight interface to ensure fast load times and make screen interactions concise, intentional, and distraction-free.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Relying on closed, proprietary APIs introduces unpredictable pricing shifts, telemetry risks, and vendor lock-in. Open innovation makes Cortex AI Puzzles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Independent &amp;amp; Accessible:&lt;/strong&gt; The application can run on open models without ongoing per-token commercial tolls, ensuring the project remains accessible to everyone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-Respecting:&lt;/strong&gt; Users can solve problems without their inputs being collected for ad profiling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensible:&lt;/strong&gt; The community can easily fork the repository, integrate offline local LLMs (via Ollama or llama.cpp), or contribute new outdoor-themed puzzle packs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Best Use of Render&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
