# mani

> A budget planner written end to end in Kotlin: Compose clients for Android, iOS, desktop and the browser, and a Ktor server that compiles to both the JVM and a native binary.

Page: https://kotlin.website/mani

## What it is

A demo on purpose. It exists to show what a full Kotlin stack looks like when every part of it
is real rather than sketched — Compose Multiplatform clients for Android, iOS, desktop and the
browser, a Ktor server that compiles **both** to the JVM and to a native Linux binary, and one
shared module holding the API contract for all of them.

Live at [mani.kotlin.website](https://mani.kotlin.website).

## The parts worth copying

**The same code on both sides of the wire.** The same `@Resource` classes route requests on
the server and build URLs on the client, so a renamed path moves both ends together — there is
no place for a string on one side to disagree with a string on the other. The same code signs
a token in the JVM build and in the native build.

**The README screenshot is a golden.** The image at the top of the repository is not a
screenshot somebody committed; it *is* one of the files the screenshot tests compare against.
Re-recording the goldens redraws it in the same commit, so it cannot quietly go stale — if the
picture is old, the tests are red.

**Two of its dependencies were written for it.** [mongkn](https://kotlin.website/mongkn), because the native server
build has to talk to the same database as the JVM one and no official driver exists, and
[viddik](https://kotlin.website/viddik) for the goldens above.

## What it is not

No email confirmation, no password recovery, no rate limiting, and passwords hashed with
salted SHA-256 rather than a slow KDF. Saying so is the point: a demo that quietly omits the
security work invites someone to copy it, and the omissions are exactly what a reader cannot
see. The public instance is a playground.
