# Example miniapps

> Working miniapps to start from: the scaffolder starter, the in-repo reference, and first-party apps shipped in this repo.

Source: https://docs.glassly.ai/app-devs/getting-started/example-apps/

There are three ways to get working code in front of you: scaffold a fresh
project, read the in-repo reference miniapp, or browse the first-party miniapps
that ship in this repo.

## Start from the scaffolder

The fastest path is `@glassly/create-miniapp`. It writes a ready-to-run project
with both layers wired together. The [Quickstart](https://docs.glassly.ai/app-devs/getting-started/quickstart.md)
walks through it end to end.

```bash
bunx @glassly/create-miniapp my-app
```

It asks for a project name and your package prefix. You can skip the prompts
with flags:

```bash
bunx @glassly/create-miniapp my-app --prefix=com.example
```

The prefix is your developer org's package prefix from the Developer Console.
The scaffolder writes `<prefix>.<project_name>` into the manifest as the
`packageName`; the Store only accepts releases under your org's prefix.

The starter is a small live-captions miniapp. Speech from
`session.transcription` appears on the glasses and the phone page, a
`display.render` scene draws the captions with a mic indicator, an animated
scroll bar, and a card that slides in. Glasses gestures pause (tap), scroll the
history (swipe), and read a line aloud through `session.speaker` (hold), and
`session.storage` keeps the history. The glasses scene is a pure, tested
function in `src/background/scene.ts`, so it is the place to start changing
what the glasses show.

## The in-repo reference miniapp

If you've cloned the monorepo, `miniapps/example-miniapp` is the reference app
that consumes the SDK. Its manifest names it "Glassly Example", and it exercises
more of the surface than the starter does: transcription, text-wall display, TTS,
button events, and an "SDK Tester" UI that drives each session module
(`session.camera`, `session.location`, notifications, calendar) page by page.

Run it from the repo to see the SDK working against your phone:

```bash
cd miniapps/example-miniapp
bun install
glassly dev
```

`glassly dev` validates the manifest, builds both layers, serves them over your LAN,
and prints a QR code. In the Glassly App, scan it from **Settings → Miniapp
Developer Settings → Scan Miniapp QR Code**.

Without a phone, `glassly sim` runs it in the
[Simulator](https://docs.glassly.ai/app-devs/getting-started/simulator.md) instead. The tester pages for
hardware the simulator does not cover (camera, streaming, navigation) report
`NOT_IMPLEMENTED` there.

## First-party miniapps in this repo

These are apps Glassly ships, all under `miniapps/`. Read them when you want a
real feature rather than a demo. Each builds with `glassly dev` the same way the
example does, and runs in the simulator with `glassly sim`.

**Teleprompter**

`miniapps/teleprompter`: paste a script and read it off the glasses;
scrolling follows your voice or runs at a set speed.
**Navigation**

`miniapps/navigation`: turn-by-turn walking navigation with compass heading
and Google Maps, driven by `session.navigation`.
**Recorder**

`miniapps/recorder`: capture the glasses microphone to a WAV file on your
phone, play it back, and export it. Built on `session.mic` +
`session.blob`.
**Captions**

`miniapps/captions`: live transcription rendered on the display, with a
WebView for language and display settings.
**Translation**

`miniapps/translation`: translate a detected source language into a target
language and render it on the display.
- [Dashboard](https://docs.glassly.ai/app-devs/core-concepts/dashboards.md)
`miniapps/dashboard`: the bundled glasses dashboard, side menu, calendar and
notification pages, built on the dashboard role and gesture claims.
**Reddit**

`miniapps/reddit`: subreddits as cards on the glasses, with a third-party
sign-in that returns through `session.onLink`. Available from the Glassly
Miniapp Store rather than bundled with the Glassly App.

New here? Read the [Quickstart](https://docs.glassly.ai/app-devs/getting-started/quickstart.md) first, then
come back and open whichever app above is closest to what you're building.
