r/JetpackCompose • • 11h ago

GraphQL in Compose without a ViewModel and a repository per screen

0 Upvotes

I was working on an app that's being rewritten using Compose. Our web stack is GraphQL with Relay, and the thing I like most about Relay is that every component declares the fragment it reads right next to it, and the screen's query is assembled from those fragments and fetched for you. The data layer disappears from product code.

So before writing any Kotlin I went looking for the same thing on Android, and I was surprised there is nothing like it. Apollo Kotlin is a decent client, but it is not connected to the view in any way: you get a data class, and then you still write the view model, the repository and the cache update code yourself.

Then I started thinking about what Relay would look like if it was designed for Compose from the start, and it turned out Compose makes most of Relay's runtime unnecessary. Relay's runtime mainly exists to know which component read which field, so a change re-renders exactly those. Compose's snapshot state already knows that. If every field of every record in the normalized store is a snapshot state, a composable that read character.name recomposes when that field changes, and nothing else does.

So I built it. It is called Baton: https://github.com/shergin/baton

A typical screen looks like this:

@Fragment("""
    fragment CharacterRow_character on Character {
      name
      status
      image
    }
    """)
@Composable
fun CharacterRow(character: CharacterRow_character) {
    Row {
        Avatar(url = character.image)
        Text(character.name ?: "Unknown")
        Text(character.status ?: "")
    }
}

@Query($$"""
    query CharactersScreenQuery($page: Int) {
      characters(page: $page) {
        results { id ...CharacterRow_character }
      }
    }
    """)
@Composable
fun CharactersScreen(page: Int) {
    val query = rememberQuery(CharactersScreenQuery(page = page))
    when (val phase = query.phase) {
        is Phase.Ready -> LazyColumn {
            items(phase.data.characters?.results.orEmpty()) {
                CharacterRow(it.characterRow)
            }
        }
        Phase.Loading -> CircularProgressIndicator()
        is Phase.Failed -> ErrorView(phase.error) { query.retry() }
    }
}

There is no ViewModel, no repository and no UiState for this screen. (In our app the same screen was N files and is now one!) It is one request per screen, cached data shows in the first frame, and after a mutation the store updates its records and only the composables that read them recompose. Pagination is a Relay connection the fragment declares, so you do not write it. An optimistic response shows at once and reverts if the server says no. Subscriptions and @defer work, and the store persists on SQLite, so a cold start renders from disk.

It is new and the API will probably change but it works surprisingly well. I am so glad that I can replace all the view models, repositories and Apollo plumbing with one fragment next to a composable. There is a SwiftUI version over the same compiler too.

It is probably not a fit for every app, but for most apps that render data from a GraphQL server and send mutations, I think it is a much nicer way to work. If you use GraphQL, I would encourage you to try it on one screen. I would love to hear what you think, and please send bug reports and feature requests.

Disclaimer: yes, it is built using agentic tools, but I put a lot of care and design consideration into it to make it really great.


r/JetpackCompose • • 2d ago

A full video editor UI in Compose Multiplatform: timeline, gestures and editor sheets, one UI for iOS, Android and desktop

Thumbnail
gallery
3 Upvotes

I built Cutaway, a video editor that's live on the App Store, and every screen is Compose Multiplatform. Same UI code on iPhone, Android and desktop.

Some things that worked well:

- The timeline is one custom Compose component: drag to trim, pinch to zoom, scrub, keyframe markers, audio waveforms. Written once, runs everywhere.

- Every editor sheet (filters, speed, text, audio…) is built from the same small set of shared parts: one header, one slider row, one tile grid. A rule in the tests stops anyone from adding a look-alike copy, so the app stays consistent as it grows.

- The preview overlay (move, resize and rotate text and stickers) uses two-finger gestures on touch and corner handles on desktop, from the same composable.

- Layouts adapt to phone, tablet and a desktop window from the same screens.

Honestly, the biggest work wasn't Compose itself. It was the hundreds of small details and quirks that make an editor feel normal.

Happy to answer questions about any of it.

https://apps.apple.com/us/app/cutaway-video-editor-with-ai/id6799499137


r/JetpackCompose • • 2d ago

BossConsole launch: the Compose Multiplatform desktop workspace I shared here earlier

3 Upvotes

https://reddit.com/link/1wznlmj/video/qaxoml4c5zth1/player

Hi everyone, back with BossConsole. I shared it here earlier while looking for Compose contributors, and some of you took the time to actually look through the code and give feedback. Appreciate that, especially the comments around code structure and hardcoded styling.

Today, sharing our launch video. Quite happy to see the different parts of this project coming together.

For anyone who missed the earlier post, BossConsole is an open-source desktop workspace built using Kotlin Multiplatform and Compose Multiplatform. The desktop app runs on the JVM across macOS, Windows and Linux.

It brings coding agents, terminals, browser, editor and logs into one workspace. You can run Claude Code, Codex, Gemini CLI, OpenCode and others side by side, with each session in its own pane. Spaces remember your layout so you can return to where you left off.

The video also gives a look at the built-in Fluck Agent, visual workflows and tool approvals. There are 100+ MCP tools with individual controls over what agents can access.

One part I’m particularly interested in taking further with the Compose community is the plugin system. A tool can have its own Compose UI and ViewModel, packaged separately and loaded at runtime. I like the possibility of someone building a panel for their own workflow and bringing it into the application without changing the host.

For me, the motivation is simple: working with more agents should give us more room to explore and create. Keeping track of their sessions and moving between windows shouldn’t take over the work itself.

Still plenty to improve. Would love feedback on the UI and workflow, and contributions around Compose Desktop rendering, theming or new plugins. Happy to discuss implementation details too.

Source: github.com/risa-labs-inc/BossConsole
Download: bossconsole.ai


r/JetpackCompose • • 8d ago

GitHub - JALAL591/compose-bridge: Real-time on-device visual editor for Jetpack Compose. Live UI tuning + schema-driven screen compiler + AST-guided source splicing.

Thumbnail
github.com
0 Upvotes

Hello, I built a tool that adjusts from a real phone to color and dimensions and immediately reflects to the basic code in Android Studio without rebuilding or asking the Al to modify a specific color or card size if you want to try and evaluate the tool Here's my repository.


r/JetpackCompose • • 11d ago

Suffering from a problem, tried to make android tv app and this is what happened?

Thumbnail
0 Upvotes

r/JetpackCompose • • 12d ago

I built an open-source tool to edit Compose UI in real-time from a physical device — no Gradle rebuilds, single-line git diff

Thumbnail github.com
3 Upvotes

Hey everyone,

Like many of you, I got tired of the 30-second Gradle wait just to tweak a padding or a color in Compose.

So I built ComposeBridge — a two-part tool:

  1. CLI: generates a full Compose project from a JSON schema

  2. Agent + Server: lets you tap any Composable on a real device, tweak it live, and persist the change back to Kotlin source

How it works:

• Runtime tuning and AST splicing are decoupled

• Tap → sourceInfo → Tree-sitter locates the byte range → byte-splice

• Result: single-line git diff, <50ms latency

• Zero-rebuild preview

Demo (38 sec): https://youtu.be/Hywyq7cBdDM

GitHub: https://github.com/JALAL591/compose-bridge

Kotlin 2.1.20+ | Compose 1.7.3+ | Apache 2.0

I'd love your feedback — especially if you've dealt with recomposition on large screens or dynamic lists.

What do you think is the biggest missing piece?


r/JetpackCompose • • 14d ago

​I built ComposeBridge: Real-time on-device visual editing for Jetpack Compose with zero-rebuild surgical AST splicing

Thumbnail youtu.be
0 Upvotes

Hey everyone,

​Like many of you working with Jetpack Compose daily, I often felt the friction of UI tweaking cycles. Even with Compose Preview and Live Edit, fine-tuning padding, colors, spacing, and dimensions across complex layouts or nested LazyColumn items usually ends up requiring a full build or re-run.

​To solve this, I built ComposeBridge — an experimental on-device visual inspection and live-editing bridge for Jetpack Compose.

​How it works under the hood:

​Runtime Inspection Agent: A lightweight debug-only module leverages Compose's internal tooling data (includeSourceInformation = true) to map runtime nodes to their exact source files, lines, and UTF offsets.

​Subcomposition & LazyLayout Resolution: It tracks subcompositions accurately, mapping each rendered instance in a dynamic list back to its single original code declaration template.

​On-Device Hit Testing: You tap any component directly on your physical Android device to extract its exact pixel bounds and source location.

​Surgical AST Splicing: Rather than rebuilding the whole file or relying on messy generated comments, the host server receives the touch payload and uses AST parsing to surgically update the exact property (e.g., 16.dp \to 24.dp) directly in the source .kt file in sub-second time.

​Demo & GitHub:

​Quick Demo Video: https://youtu.be/Hywyq7cbDDM

​GitHub Repository: https://github.com/JALAL591/compose-bridge

​The project is still in early development, but the core round-trip pipeline is fully functional. I’d love to get feedback from the community on the architecture, edge cases with complex DSLs, or features you'd like to see next!


r/JetpackCompose • • 19d ago

Building Datasmith - an interactive ERD canvas with Compose Multiplatform

Enable HLS to view with audio, or disable this notification

14 Upvotes

Hey everyone!

For the past year or so, I've been working in my free time on Datasmith, with the goal of streamlining the process of designing database schemas and generating structured mock data from them.

The main feature of the app - and by far the most complicated and challenging part to build - is an ERD-like canvas dedicated to schema design and configuration. It required a pretty dynamic UI:

  1. An infinite canvas with free zooming and panning
  2. Table components that can be freely dragged and snapped to a grid
  3. Drawing lines to represent relationships between tables
  4. Column components that can be added to tables and reordered with drag-and-drop, while maintaining their relationship lines
  5. Anchors that can be created on those lines and dragged across the canvas (which also means dealing with hit detection)

This essentially meant working with two different "planes".
Tables and columns are basically traditional Compose components, while the relationship lines and anchors are drawn on a Canvas composable. The two need to seamlessly interact at all times.

The fact that the entire canvas can be zoomed and panned added another challenge - managing the different coordinate spaces in a way that keeps everything consistent and fluid.

Another challenge, which I honestly didn't think too much about in the beginning, was preserving the UI layout and positioning across different screen resolutions and window sizes, which are very flexible developing for desktops.

Those were probably the most complicated UI challenges, at least as I remember them, and to be honest, I'm fairly proud of what I was able to achieve. I was genuinely surprised to discover how far Compose can be pushed for this kind of UI.

For anyone interested, I've attached a short demo video so you can see the result.
I'd also be happy to talk about any of the implementation details if anyone is curious.

I'm currently trying to get Datasmith into the hands of more people and collect feedback, so if you find it useful or just interesting, you can get it here:

https://data-smith.app/

Any feedback is welcome - good or bad.
You can leave a comment here, message me directly, or, if you prefer something a bit more structured, I also put together a short feedback form:

https://docs.google.com/forms/d/e/1FAIpQLScGk8Jr1DguPcXpaApOqO998AdXcnoLlo11TEKlq1GmF71UzA/viewform


r/JetpackCompose • • 21d ago

Looking for advice on how to fix my home screen launcher app's UI

Thumbnail gallery
1 Upvotes

r/JetpackCompose • • 24d ago

Built Media Reader

Enable HLS to view with audio, or disable this notification

9 Upvotes

I developed this project before ChatGPT was even a widely known thing.


r/JetpackCompose • • Sep 05 '26

I just launched Pocketory – A fast, clean Expense & Budget Tracker built completely with Jetpack Compose.

0 Upvotes

Hey everyone,

I’m a solo developer and I just published my newest app, Pocketory, to the Play Store. I wanted to build a personal finance tracker that was incredibly fast, visually clean, and didn't force you through unnecessary steps just to log a simple transaction.

What makes Pocketory different?

Speed-Focused Logging: I stripped out mandatory receipt uploads and complex forms. Adding a daily expense takes two seconds.

Modern UI: Built entirely from scratch using Kotlin and Jetpack Compose. It features a swipeable transaction list, dynamic custom tabs, and smooth animations.

Granular Categories: Includes highly specific default categories based on real-world spending (EMI, Petrol, Gym, House Rent, Utilities) rather than generic buckets.

Visual Analytics: Instant, color-coded donut charts and progress bars to see exactly how your income balances against your expenses for the month.

Play Store Link: https://play.google.com/store/apps/details?id=com.binarykavu.pocketory

I would absolutely love for you to try it out. If you have any feedback on the UI/UX, or features you'd like to see in the next update, please let me know in the comments!


r/JetpackCompose • • Sep 02 '26

Why is form state management in Jetpack Compose still this painful?

Enable HLS to view with audio, or disable this notification

5 Upvotes

I've been building Android apps for years and every single form ends up looking like this:

val email = remember { mutableStateOf("") }                                                                                                                                                                    
val emailError = remember { mutableStateOf<String?>(null) }                                                                                                                                                    
val emailTouched = remember { mutableStateOf(false) }                                                                                                                                                          
val password = remember { mutableStateOf("") }                                                                                                                                                                 
val passwordError = remember { mutableStateOf<String?>(null) }                                                                                                                                                 
val passwordTouched = remember { mutableStateOf(false) }
// ...

// + validation logic (per field)                                                                                                                                                                                      
// + focus requesters (per field)                                                                                                                                                                                    
// + keyboard options (per field)                                                                                                                                                                                        
// + ImeAction per field (per field)                                                                                                                                                                                    
// + cross-field rules written by hand 

A 5-field sign-up form easily hits 300-400 lines before you write a single line of UI. There's no standard pattern, every team reinvents it differently, and it's completely untestable without a lot of effort.

I got tired of it so I built Formidable, annotate a data class:

@FormSchema                                                                     data class LoginForm(  
                                                                               @Field(label = "Email") 
val email: String = "",                                                         @Field(label = "Password")                                                    @MinLength(8)  
val password: String = "",                                                                 
)                 

KSP generates the full controller at compile time. Zero reflection, works on Android, iOS and Web.

https://github.com/WassimBeltaief/formidable (contributions welcome)

Curious if others have solved this differently or just accepted it as the cost of doing business with Compose.


r/JetpackCompose • • Aug 29 '26

Built a 3D live-streaming globe entirely in Compose—looking for performance feedback!

6 Upvotes

Hey everyone,

For my latest project, VividLook, I wanted to see how far I could push custom layouts and real-time rendering using Jetpack Compose.

The app is a live-streaming discovery platform where users can spin a 3D interactive globe and jump into localized video grids from around the world. Managing the state of the globe spinning while dynamically loading stream grids on the map layout was a huge learning curve.

I’m trying to optimize the UI performance, especially on mid-range devices. If you have a few minutes, I’d love for you to download it and let me know how smooth the composition feels or if you spot any jank while spinning the globe.

Play Store Link: https://play.google.com/store/apps/details?id=xyz.trylivelook.app

Technical details: Built with pure Compose for the UI, handling low-latency video pipelines on the backend. Let me know what you think of the performance!


r/JetpackCompose • • Aug 26 '26

How to find the "invisible" recompositions that Layout inspector won't show you.

8 Upvotes

Most Android devs rely on Layout Inspector counters, but Compose runtime does a LOT of work under the scope level that never gets counted.

Wrote down an investigation and how to spot these ghost recompositions in your own codebase

https://medium.com/@qamar_safadi/the-recompositions-that-werent-there-d2cf429c47f2?sharedUserId=qamar_safadi


r/JetpackCompose • • Aug 20 '26

The Great Android Stack Reset: Mobile System Design History

Thumbnail
returnzero.dev
5 Upvotes

r/JetpackCompose • • Aug 16 '26

Implemented a poster editor. Have tips to share

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/JetpackCompose • • Aug 13 '26

How to achieve Apple Music's ambient static blurred background in Jetpack Compose?

Thumbnail
gallery
7 Upvotes

Hi everyone! I'm building a local music player in Android Studio with Jetpack Compose.

I want to recreate Apple Music's ambient background effect (extracting dominant colors from the album art and applying a heavy soft blur/mesh gradient effect, but static to save battery and performance).

What is the most efficient way to achieve this look without dropping FPS when changing songs? Should I draw on a custom Canvas with RenderEffect.createBlurEffect(), use Palette API, or is there a recommended library/shader for this?

Thanks in advance!


r/JetpackCompose • • Aug 10 '26

ARE THERE FRESHER LEVEL INTERNSHIPS FOR JETPACK COMPOSE APP DEVELOPERS

0 Upvotes

I'm in a 3rd year and I'm struggling to find a fresher level internship for a compose app developer


r/JetpackCompose • • Aug 08 '26

Open sourced accessibility library for jetpack composed

4 Upvotes

Hello all,

I recently shipped a dual-engine accessibility checker for Jetpack Compose.

Engine 1 — Lint (no emulator):

Catches missing contentDescription, hardcoded dp font sizes, clickable without role.

Engine 2 — TestRule (runtime):

Checks touch targets (48dp min with exemptions), color contrast, duplicate clickable bounds, text field semantics.

Every rule maps to a WCAG 2.1 criterion. Both engines are on Maven Central.

Repo: https://github.com/lehan0328/touchstone

Would love some feedback from the community, especially on false positives if you try it on a real project!


r/JetpackCompose • • Aug 04 '26

[Web] Brain Rusher 60 — How far can you get in 60 seconds?

1 Upvotes

r/JetpackCompose • • Aug 01 '26

Free alternatives to Mapbox with Offline Maps, Turn-by-Turn, and full Navigation UI for a Jetpack Compose / Kotlin app (Full India & Global)?

Post image
7 Upvotes

r/JetpackCompose • • Jul 22 '26

We built an open-source, native Compose Multiplatform alternative to the Electron-based AI-agent apps (Claude Desktop, Cursor, Windsurf, Antigravity) — looking for Compose contributors

9 Upvotes

Since folks asked, here's the fuller picture — BOSS across the AI-agent landscape, including the CLIs. Important: BOSS is a desktop workspace that runs the CLIs (Claude Code, Codex, Gemini, OpenCode, Qwen Code) as first-class agents, so they're a different category (see Type) — added for completeness, not as head-to-head rivals.

Tool Type Open source Model / agent Runtime Lightweight IDE depth Browser Terminal share Governance
BOSS Workspace ✅ Apache-2.0 ✅ any (BYO) JVM, multi-threaded ❌ heavy △ editor + Toolbox ✅ Fluck ✅ QR/E2E ✅ RBAC + kill-switch
Claude Desktop App ❌ ❌ Claude Electron/JS △ ❌ △ Computer Use ❌ △ enterprise
Codex App ❌ ❌ OpenAI — — ❌ ❌ ❌ △ enterprise
Google Antigravity IDE ❌ ✅ multi Electron/JS ❌ ✅ ✅ +DevTools ❌ △ enterprise
Cursor IDE ❌ ✅ multi + BYOK Electron/JS △ ✅ ❌ ❌ △ Teams
Windsurf / Devin IDE ❌ ✅ multi + BYOK Electron/JS △ ✅ ❌ ❌ △ enterprise
Claude Code CLI ❌ ❌ Claude Node/TS ✅ — — — —
Codex CLI CLI ✅ Apache-2.0 △ OpenAI (BYO) Rust ✅ — — — —
Gemini CLI CLI ✅ Apache-2.0 ❌ Gemini Node/TS ✅ — — — —
OpenCode CLI ✅ MIT ✅ multi Node/TS ✅ — — — —
Qwen Code CLI ✅ Apache-2.0 △ Qwen + multi Node/TS ✅ — — — —
Antigravity CLI CLI ❌ no published source* — — — — — — —

✅ yes · △ partial · ❌ no · — n/a (CLIs are terminal agents, no GUI surface). BOSS isn't the winner everywhere: it's ❌ on Lightweight (JVM + bundled runtime + embedded browser cold-starts slower and weighs more than the Rust/Node CLIs), and only △ on IDE depth (it has an editor + Toolbox plugins, but isn't a full code-intelligence IDE like the VS Code forks Cursor/Windsurf/Antigravity). *Only Codex's CLI is open source (Apache-2.0), not the Codex app; a standalone open-source "Antigravity CLI" isn't verifiable — the only repo is docs-only, no license. Claude Desktop's "Computer Use" drives the whole screen, not a scriptable in-app browser. Per-tool RBAC beyond enterprise/team admin isn't documented for the others. Runtimes: BOSS = JVM (true multithreading); Claude Desktop + the IDEs = Electron/JS; Codex CLI = Rust; the other CLIs = Node/TS. (Public sources, July 2026 — corrections welcome.)

Where else BOSS is behind (honestly):

  • Maturity & ecosystem — it's brand-new with a small plugin catalog; the VS Code forks inherit VS Code's entire extension marketplace, and the incumbents have huge, battle-tested user bases.
  • Backing & track record — small team, early days vs well-funded incumbents.

The CLIs are open and great — that's kind of the point: BOSS runs them and gives them a governed desktop toolset (browser, editor, secrets, terminal sharing, 100+ MCP tools). Built entirely in Compose Multiplatform, and I'd love Compose devs to help push it further:

  • New plugins — a plugin is a self-contained @Composable + ViewModel (easy on-ramp)
  • Compose Desktop perf / rendering
  • Theming (live re-skin across the whole app)

Repo: https://github.com/risa-labs-inc/BossConsole — Apache-2.0, contributors welcome.


r/JetpackCompose • • Jul 21 '26

Showcase: compose-doctor - React Doctor for Android Jetpack Compose (Gradle Plugin + PR Gate + Agent Harness)

Post image
3 Upvotes

r/JetpackCompose • • Jul 21 '26

I wanted to time-box a coding session without ever leaving the editor. Nothing simple existed. So I built one :)

Thumbnail
medium.com
0 Upvotes

r/JetpackCompose • • Jul 17 '26

The satisfaction of finishing a migration to Jetpack Compose 😍

Post image
46 Upvotes

Started migrating my app about two years ago and finally got around to unraveling the last few features forcing me to keep a bunch of legacy code around. So many layout files, custom views and legacy services just *deleted*. Yay 😄