ai newsSa., 31. Okt.
EilmeldungAlphabet's $500 Billion Wipeout: The Day AI Search Came for Google's Cash Machine

Clearport: Giving the Ghost a Machine — Local AI on Android (#hf26challenge)

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built Clearport is a chat client for an AI model that runs on the phone in your hand. Two pieces, one loopback socket: The Android app (Flutter): streaming replies, conversations saved on device,

dev.toSamstag 05:00 · 31.10.5 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

Clearport is a chat client for an AI model that runs on the phone in your hand.

Neither piece bundles weights, and neither requires an account. The only HTTP request the app ever makes is to the address you specify in Settings, and the default is loopback ( 127.0.0.1:8080 ).

I read "Ghost in the Machine" literally first: the ghost is the model, a disembodied voice answering prompts. For almost everyone in 2026, that voice lives in an offshore datacenter behind a closed API, running on rented GPUs that can be gated behind a pricing change or killed with a service deprecation.

Then I read it the other way, and that is what I built. Move the ghost inside the machine, and it stops being a haunting—it becomes a resident. Put the phone in aeroplane mode, cut all radios, and it still answers. The spooky part of AI is not that it talks to you; it is that it talks to you from somewhere else. Clearport makes it talk to you from right here.

So I gave the ghost a home. Clearport ships seven tailored themes, each a full semantic palette: Haunted, Clean, Dark, AMOLED, Midwinter, Ofrenda, and System.

Haunted is the theme crafted for this challenge. It is pure #000000 —true OLED black. The accent is pumpkin orange. Cobwebs cling to the top corners, and a spider drops from the ceiling on silk. The empty state features a carved glowing jack-o'-lantern with slanted eyes and an atmospheric prompt: "Something is listening on 127.0.0.1." Because something truly is.

The artwork is vector-drawn in code: PumpkinPainter, SnowflakePainter, MarigoldPainter, and SpiderWebPainter are Flutter CustomPainter s. Crisp at every screen density, recolouring dynamically with the palette, and adding zero bloated image assets to the binary.

Aeroplane mode is the demo. Wi-Fi off, mobile data off, bluetooth off, no hotspot, no laptop tether. Send a prompt and watch tokens stream one by one from a model running in Termux on the same device over loopback:

🎬 Watch Full 1080p Walkthrough Video (clearport-demo.mp4)

The CLI flow runs with equal simplicity in Termux:

clearport pull gemma-tiny # 292 MB Gemma 3 270M, SHA-256 verified clearport start # starts llama-server on 127.0.0.1:8080 with wake-lock clearport chat # instant terminal chat session clearport haunt # the local model inspects your recent bash history Enter fullscreen mode Exit fullscreen mode Code Android App: github.com/Adams-404/clearport (MIT, Flutter) Companion CLI: github.com/Adams-404/clearport-cli (MIT, Bash) Testing Instructions for Judges: No login required. No API keys, no signups, no cloud credentials. You can install the release APK directly from GitHub Releases ( v1.0.4 ) or run the one-line Termux installer on an Android device.

Open weights and inference: llama.cpp powers local inference. Gemma 3 is the primary benchmark: clearport pull gemma downloads the 1B Q4_K_M weights (806 MB), while clearport pull gemma-tiny fetches the 270M Q8_0 weights (292 MB) for memory-constrained phones. Downloads support resume and verify byte sizes and SHA-256 hashes against Google's published specifications before use. Any OpenAI-compatible GGUF server also works seamlessly.

Design system: Themes are built on Flutter's ThemeExtension rather than switch statements. Surfaces, text styles, code blocks, borders, and custom painters derive from an AppPalette accessed via context.palette. Switching themes recalculates one inherited value and cleanly repaints the entire tree, including the frosted liquid-glass history modal.

Streaming SSE reliability: Building robust mobile streaming over loopback required solving three tricky edge cases:

flutter analyze is completely clean and 72 automated tests pass, verifying the stream parser, URL normalizer, secure settings, history search, theme system, model discovery picker, and lifecycle contracts. GitHub Actions automates APK packaging, test suites, and cryptographic signing.

Agent collaboration: Clearport was developed iteratively using an AI coding agent pair-programming setup. Every phase was tracked as an explicit GitHub milestone issue with formal acceptance criteria, verified through test runs, committed, and closed upon push.

Every core capability in Clearport relies directly on open innovation:

Building Clearport — Hacktoberfest Week 4: Ghost in the Machine You Building Clearport: Local Android AI client with Gemma & Termux for Hacktoberfest Week 4

Planning and executing phases: theme system (Haunted theme), Termux loopback integration, SSE stream robustness, and Gemma open-weights support.

Interactive session transcript: Building Clearport — Hacktoberfest Week 4: Ghost in the Machine

The build followed a structured phase plan tracked across GitHub issues (#45 through #51): scoping the themes, drawing painters, handling lifecycle states, validating Gemma downloads, producing demo media, and automating releases. Working with a pair-programming agent with clear acceptance criteria ensured that architecture decisions remained disciplined and every feature shipped with test coverage.

The moment this project clicked was in a dark room with a black screen: the Haunted theme active, two painted cobwebs in the corners, a spider suspended on thread, a pumpkin grinning in the centre, and the phrase: "Something is listening on 127.0.0.1."

The second moment was clearport haunt: pointing the local model at the phone's recent shell history, having an offline Gemma model analyze the last few commands typed into Termux, and offering dry, eerie commentary.

There is also a Día de los Muertos connection in the Ofrenda theme (marigolds, deep plum, and candlelight). Conversations and thoughts are personal history. Keeping them on hardware you own is how you ensure they are never lost.

Clearport natively supports Google's Gemma 3 open-weight models as its primary recommendation for mobile on-device inference:

Quelle: dev.to (dev.to). Original öffnen