<?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: Mohammad Hammad Ahmad</title>
    <description>The latest articles on DEV Community by Mohammad Hammad Ahmad (@mhammadapp).</description>
    <link>https://dev.to/mhammadapp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3976417%2F9875cedd-5447-44cc-96d8-bf0562d6c002.png</url>
      <title>DEV Community: Mohammad Hammad Ahmad</title>
      <link>https://dev.to/mhammadapp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhammadapp"/>
    <language>en</language>
    <item>
      <title>AI is the entire game engine</title>
      <dc:creator>Mohammad Hammad Ahmad</dc:creator>
      <pubDate>Wed, 24 Jun 2026 15:28:03 +0000</pubDate>
      <link>https://dev.to/mhammadapp/ai-is-the-entire-game-engine-164c</link>
      <guid>https://dev.to/mhammadapp/ai-is-the-entire-game-engine-164c</guid>
      <description>&lt;p&gt;Most developers use AI to help write their app. &lt;/p&gt;

&lt;p&gt;I made &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fobk0dpjxa2epn3bfhh9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fobk0dpjxa2epn3bfhh9z.png" alt=" " width="800" height="1738"&gt;&lt;/a&gt;. 🎲 &lt;/p&gt;

&lt;p&gt;AI Dungeon Master is a Flutter RPG with zero scripted story. Every scene, enemy, NPC, loot drop and plot twist is generated live by an LLM (Llama 3.3 70B on Groq) and streamed into the UI token by token. &lt;/p&gt;

&lt;p&gt;The fun part isn't the chat. It's treating the model like a game server: &lt;br&gt;
→ Every turn must return strict JSON — narration, scene type, HP/XP/gold deltas, loot, who's on screen &lt;br&gt;
→ The app parses that JSON while it's STILL streaming, so the story types out live &lt;br&gt;
→ Client-side rules enforce fairness when the model misbehaves — damage fallbacks, HP/XP clamps, a 5-turn death grace, level-ups, potion logic &lt;/p&gt;

&lt;p&gt;The lesson I keep coming back to: LLMs aren't just chatbots. With structured output + client guardrails, they can drive real, stateful app logic. &lt;/p&gt;

&lt;p&gt;I open-sourced it 👇 Curious what other people are using structured LLM output for — what's the weirdest thing you've made a model return JSON for?&lt;/p&gt;

&lt;h1&gt;
  
  
  Flutter #LLM #GenerativeAI #MobileDev
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Flutter_Deepseek Package !</title>
      <dc:creator>Mohammad Hammad Ahmad</dc:creator>
      <pubDate>Tue, 09 Jun 2026 17:47:00 +0000</pubDate>
      <link>https://dev.to/mhammadapp/flutterdeepseek-package--7np</link>
      <guid>https://dev.to/mhammadapp/flutterdeepseek-package--7np</guid>
      <description>&lt;p&gt;*&lt;em&gt;I wanted DeepSeek streaming in Flutter to feel like Flutter.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;deepseek&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createChatCompletion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="n"&gt;ChatCompletionRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;model:&lt;/span&gt; &lt;span class="s"&gt;'deepseek-chat'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;messages:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="cm"&gt;/* your messages */&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nl"&gt;stream:&lt;/span&gt; &lt;span class="kc"&gt;true&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="c1"&gt;// Handle stream using Dio's response stream...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chatStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="nl"&gt;messages:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ChatMessage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Explain Flutter'&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="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;token&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;Each token reaches your widget the moment DeepSeek generates it.&lt;br&gt;
No waiting for the full response. No manual SSE parsing. Just a Dart Stream that works naturally with Flutter.&lt;/p&gt;

&lt;p&gt;So I built flutter_deepseek — the only Flutter DeepSeek package with true Stream, reasoner support, and function calling, all in one.&lt;/p&gt;

&lt;p&gt;Features:&lt;br&gt;
→ Real-time SSE streaming with Stream&lt;br&gt;
→ deepseek-reasoner support&lt;br&gt;
→ Reasoning stream and final answer available separately&lt;br&gt;
→ Function calling / tool use&lt;br&gt;
→ Typed exceptions: AuthException · RateLimitException · BadRequestException · ServerException · NetworkException&lt;br&gt;
→ Zero Dio dependency (built on dart:http)&lt;br&gt;
→ Fully injectable http.Client for testing&lt;br&gt;
→ 160 pub points on day one&lt;/p&gt;

&lt;p&gt;I built and shipped DeepSeek-powered features in production before writing this package.&lt;/p&gt;

&lt;p&gt;That experience shaped the API far more than the documentation did.&lt;/p&gt;

&lt;p&gt;Open source. MIT licensed. Actively maintained.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://lnkd.in/dTHDxKYH" rel="noopener noreferrer"&gt;https://lnkd.in/dTHDxKYH&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>pubdev</category>
      <category>flutter</category>
      <category>deepseek</category>
    </item>
  </channel>
</rss>
