Marcin Moskała reviews GeminiAI: what the audit revealed about coroutines and Android architecture
The developer of GeminiAI, an open-source Gemini client, has described how the project went through a line-by-line audit by Marcin Moskała, a Kotlin book author and JetBrains-certified trainer. The review didn't focus on the app's copy of the Gemini UI. It focused on how the app handles coroutines, structured concurrency, and task cancellation on Android. The audit produced an architecture breakdown, confirmed the quality of the code, and yielded practical lessons for mobile AI apps.
AI-processed from Habr AI; edited by Hamidun News
GeminiAI is an open-source Android project built as a full-featured Gemini client that replicates the original interface. It recently went through a line-by-line audit by Marcin Moskała, a Kotlin book author and JetBrains-certified instructor. The review didn't center on how the app looks. It centered on how well the app handles coroutines, structured concurrency, and task lifecycle control.
How GeminiAI came about
The project started with a simple observation: GitHub had almost no full-featured Gemini clients that developers could study as proper Android projects with well-designed architecture, rather than as a collection of API calls. The author set out to fill that gap with an open-source app that does more than call the model. It shows what a modern AI client can look like on a mobile stack. The goal was twofold: replicate the original Gemini UI and build a technical foundation that developers can examine layer by layer.
GeminiAI is built on Navigation3, Jetpack Compose, Dagger-Hilt, Room, Kotlin Coroutines, and Flow. But the main goal wasn't to showcase technologies. It was to get the app's behavior right under load: streaming responses, managing conversation context, cancelling operations correctly, and avoiding memory leaks. For the author, the project was also a personal engineering challenge after a run of tough job interviews, where architecture questions regularly mattered more than the ability to ship a screen feature quickly.
The Moskała audit
The next stage was far tougher than a typical code review. In December 2025, the project landed in Marcin Moskała's workshop, where it was reviewed literally line by line. This format quickly exposes the gap between code that simply works and code that holds up as it grows, handles cancellations, and survives complex asynchronous scenarios. That matters even more for an AI app: coroutine bugs aren't always visible right away, but they later surface as hung requests, stray states, and hard-to-trace UI bugs.
According to the author, the audit went beyond a formal check. Moskała was added to the repository's contributors, and the project was rated a high-quality learning example of coroutines for Android development. That's a meaningful signal for the open-source community: GeminiAI's value isn't that it replicates a familiar chatbot interface, but that it shows engineering discipline where many projects stop at a demo wrapper around an API.
"The code turned out reliable and well-structured — it's a strong example for learning coroutines on
Android."
What exactly was reviewed
The review centered on structured concurrency, an approach in which every asynchronous operation lives inside a clear scope of responsibility and doesn't get lost after a screen closes or a parent task is cancelled. The article ties this to a broader idea: launching background operations without control is as dangerous for a modern app as endless GOTO jumps were for old code. If tasks have no clear lifetime boundaries, the app pays for it in memory, resources, and predictability.
- Context inheritance: child coroutines receive the parent's parameters, including the dispatcher and execution rules.
- Waiting for completion: the parent scope doesn't close until every launch and async inside it has finished.
- Automatic cancellation: when the parent fails or stops, the task tree collapses without manual cleanup.
- Responsibility boundary: heavy logic lives in ChatRepository, while the ViewModel retains control over cancellation.
- UI behavior: when a screen closes, API and database requests must terminate cleanly, with no hanging operations.
After working on the project, the author took the topic beyond a single repository. He wrote a piece on structured concurrency that draws on Edsger Dijkstra's ideas about the harm of unstructured jumps and carries that argument over to coroutines. For mobile development, this bridge between computer science and practice helps teams justify architectural decisions with the basic logic of managing complexity rather than team taste. It also shows why task cancellation isn't a minor implementation detail but part of the architecture.
What it means
The GeminiAI story makes a simple point: in AI apps, the winner isn't only whoever hooks up the model fastest, but also whoever carefully builds the architecture around streaming, task cancellation, and the UI lifecycle. For Android developers, that's an encouraging sign: even a project that started as a Gemini clone can become a reference if its coroutines, responsibility boundaries, and real-world behavior are genuinely well thought out. Details like these separate a learning pet project from code you can use as a foundation in production.
- Nov 2, 2026Karpathy builds a YouTube clone with 6454 videos from Hacker News recommendations in two hours
- Nov 2, 2026Karpathy used Claude to build HackerTube from 6,454 videos recommended on Hacker News
- Nov 2, 2026Anthropic needs to grow revenue 32% a year to cover $850 billion in contracts
- Nov 2, 2026Bun creator uses Claude Code to port 750K lines from Zig to Rust in 11 days
Key Questions Answered
How GeminiAI came about?
The project started with a simple observation: GitHub had almost no full-featured Gemini clients that developers could study as proper Android projects with well-designed architecture, rather than as a collection of API calls. The author set out to fill that gap with an open-source app that does more than call the model. It shows what a modern AI client can look like on a mobile stack. The goal was twofold: replicate the original Gemini UI and build a technical foundation that developers can examine layer by layer. GeminiAI is built on Navigation3, Jetpack Compose, Dagger-H
What are the key details on The Moskała audit?
The next stage was far tougher than a typical code review. In December 2025, the project landed in Marcin Moskała's workshop, where it was reviewed literally line by line. This format quickly exposes the gap between code that simply works and code that holds up as it grows, handles cancellations, and survives complex asynchronous scenarios. That matters even more for an AI app: coroutine bugs aren't always visible right away, but they later surface as hung requests, stray states, and hard-to-trace UI bugs. According to the author, the audit went beyond a formal check. Moska
What exactly was reviewed?
The review centered on structured concurrency, an approach in which every asynchronous operation lives inside a clear scope of responsibility and doesn't get lost after a screen closes or a parent task is cancelled. The article ties this to a broader idea: launching background operations without control is as dangerous for a modern app as endless GOTO jumps were for old code. If tasks have no clear lifetime boundaries, the app pays for it in memory, resources, and predictability. Context inheritance: child coroutines receive the parent's parameters, including the dispatcher
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.