# 5-Second Challenge LCMA Sample

5-Second Challenge is a free Mini App Center sample for fast campus-friendly
party play. A host draws a prompt, one player has five seconds to name three
answers, and the room judges the result by ear. The first slice includes quick
play, room hosting, room joining, a visible countdown, manual scoring, recent
round history, and safe starter prompts.

The sample uses only the current `localchat-miniapp-v1` bridge:

- `localchat.room.create(params)`
- `localchat.room.join(params)`
- `localchat.room.message(params)`
- `localchat.room.poll(params)`
- `localchat.storage.local.get(key)`
- `localchat.storage.local.set(key, value)`
- `localchat.ui.showToast(input)`
- `localchat.ui.setKeepScreenOn(enabled)`

The room protocol prefix is `localchat.5second.v1`. Hosts broadcast
`session.created`, `round.started`, `round.judged`, and `score.reset` events.
Players announce themselves with `player.joined` and display the live prompt
without recording audio or attempting speech recognition.

## Package

From `apps/gobaby_transfer`:

```sh
dart --disable-dart-dev tool/lcma_packager.dart \
  --source samples/mini_apps/5_second_challenge \
  --output build/mini-app-center/5-second-challenge-0.1.0.lcma \
  --metadata build/mini-app-center/5-second-challenge-0.1.0.submission.json \
  --artifact-url https://localchat.me/v1/mini-app-center/artifacts/<staged-package-storage-key> \
  --key-id localchat-miniapp-beta-<developer> \
  --private-key-seed-base64url <developer-signing-seed>
```

For local unsigned smoke checks, omit `--private-key-seed-base64url` and keep
the generated package out of external beta submissions.

## Smoke Tests

These tests package and validate the committed sample:

```sh
flutter test test/lcma_packager_test.dart --plain-name "packager validates the repository 5-Second Challenge sample"
```
