<?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: Aram Hakobyan</title>
    <description>The latest articles on DEV Community by Aram Hakobyan (@aram_hakobyan_e2cddbd358b).</description>
    <link>https://dev.to/aram_hakobyan_e2cddbd358b</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%2F4028718%2F29fdaa0c-5f9e-450b-97cd-cf98797279f7.jpg</url>
      <title>DEV Community: Aram Hakobyan</title>
      <link>https://dev.to/aram_hakobyan_e2cddbd358b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aram_hakobyan_e2cddbd358b"/>
    <language>en</language>
    <item>
      <title>Building a Real-Time AI Prompt Enhancer with Kotlin Multiplatform</title>
      <dc:creator>Aram Hakobyan</dc:creator>
      <pubDate>Tue, 14 Jul 2026 12:10:19 +0000</pubDate>
      <link>https://dev.to/aram_hakobyan_e2cddbd358b/building-a-real-time-ai-prompt-enhancer-with-kotlin-multiplatform-n23</link>
      <guid>https://dev.to/aram_hakobyan_e2cddbd358b/building-a-real-time-ai-prompt-enhancer-with-kotlin-multiplatform-n23</guid>
      <description>&lt;p&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%2Fpqxj97g0s86we6v7kjgk.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%2Fpqxj97g0s86we6v7kjgk.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building mobile apps usually means choosing between two paths: maintaining separate native codebases or sacrificing platform-specific experiences with a fully shared solution.&lt;/p&gt;

&lt;p&gt;For my latest side project, I wanted to explore whether Kotlin Multiplatform could help me build something more complex than a typical CRUD app — a custom keyboard for both Android and iOS.&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;Prompt AI Keyboard&lt;/strong&gt;: a keyboard that helps users create better prompts for AI tools like ChatGPT, Claude, Gemini, Midjourney, and GitHub Copilot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;AI tools are powerful, but the quality of the output often depends on how well the prompt is written.&lt;/p&gt;

&lt;p&gt;I noticed that I was constantly rewriting my prompts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding more context&lt;/li&gt;
&lt;li&gt;Explaining the desired format&lt;/li&gt;
&lt;li&gt;Clarifying the goal&lt;/li&gt;
&lt;li&gt;Making instructions more structured&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The process usually looked like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a rough idea&lt;/li&gt;
&lt;li&gt;Copy it to a prompt enhancer&lt;/li&gt;
&lt;li&gt;Rewrite it manually&lt;/li&gt;
&lt;li&gt;Copy the improved prompt back&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wanted to remove that friction and make prompt improvement available directly where people already type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture overview
&lt;/h2&gt;

&lt;p&gt;The main challenge was building a keyboard that works naturally on both platforms while sharing as much code as possible.&lt;/p&gt;

&lt;p&gt;The architecture consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kotlin Multiplatform shared module&lt;/li&gt;
&lt;li&gt;Native keyboard extensions for Android and iOS&lt;/li&gt;
&lt;li&gt;Firebase Cloud Functions backend&lt;/li&gt;
&lt;li&gt;Gemini API integration&lt;/li&gt;
&lt;li&gt;In-app purchase verification and usage tracking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The shared KMP layer handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prompt processing logic&lt;/li&gt;
&lt;li&gt;AI request preparation&lt;/li&gt;
&lt;li&gt;Data models&lt;/li&gt;
&lt;li&gt;Business rules&lt;/li&gt;
&lt;li&gt;Network communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Platform-specific code handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keyboard UI&lt;/li&gt;
&lt;li&gt;Input handling&lt;/li&gt;
&lt;li&gt;System keyboard APIs&lt;/li&gt;
&lt;li&gt;Platform lifecycle management&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Kotlin Multiplatform?
&lt;/h2&gt;

&lt;p&gt;For a project like this, I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One shared business logic layer&lt;/li&gt;
&lt;li&gt;Less duplicated code&lt;/li&gt;
&lt;li&gt;Native UI and platform integration&lt;/li&gt;
&lt;li&gt;The ability to iterate quickly on both platforms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;KMP provided a good balance between code sharing and native capabilities.&lt;/p&gt;

&lt;p&gt;Unlike a fully shared UI approach, the keyboard interface remains native because both Android and iOS have very different keyboard extension APIs and user expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges of building a keyboard
&lt;/h2&gt;

&lt;p&gt;A keyboard is not just another mobile screen.&lt;/p&gt;

&lt;p&gt;Some challenges I encountered:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Limited resources
&lt;/h3&gt;

&lt;p&gt;Keyboard extensions have stricter limitations than regular applications.&lt;/p&gt;

&lt;p&gt;Every operation needs to be lightweight because the keyboard must feel instant.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Platform differences
&lt;/h3&gt;

&lt;p&gt;Android and iOS handle keyboards very differently.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text insertion&lt;/li&gt;
&lt;li&gt;Keyboard lifecycle&lt;/li&gt;
&lt;li&gt;Permissions&lt;/li&gt;
&lt;li&gt;Background execution&lt;/li&gt;
&lt;li&gt;UI constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;required platform-specific solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Latency
&lt;/h3&gt;

&lt;p&gt;AI features introduce network delays.&lt;/p&gt;

&lt;p&gt;The challenge was making the experience feel fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Optimizing request payloads&lt;/li&gt;
&lt;li&gt;Keeping UI responsive&lt;/li&gt;
&lt;li&gt;Handling failures gracefully&lt;/li&gt;
&lt;li&gt;Providing useful feedback during generation&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Building this project reinforced that Kotlin Multiplatform is not only useful for sharing simple models or utilities.&lt;/p&gt;

&lt;p&gt;It can also support more complex products where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Business logic is shared&lt;/li&gt;
&lt;li&gt;Platform integration remains native&lt;/li&gt;
&lt;li&gt;User experience is still tailored to each ecosystem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The biggest lesson: the hardest part of building a mobile product is often not the code itself, but understanding platform limitations and designing around them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;I'm continuing to improve Prompt AI Keyboard and explore new ways AI can assist users directly inside everyday workflows.&lt;/p&gt;

&lt;p&gt;Some ideas I'm exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More AI-powered writing actions&lt;/li&gt;
&lt;li&gt;Better customization per AI model&lt;/li&gt;
&lt;li&gt;Offline capabilities for certain features&lt;/li&gt;
&lt;li&gt;More integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd love to hear feedback from developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have you built custom keyboards before?&lt;/li&gt;
&lt;li&gt;Would you choose Kotlin Multiplatform for this type of project?&lt;/li&gt;
&lt;li&gt;What AI features would you find useful directly inside a keyboard?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>promptengineering</category>
      <category>multiplatform</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
