···4455```sh
66flutter pub get
77+just objectbox-setup # once per machine (macOS/Linux)
78just gen
89flutter run
910```
···12131314Use `just` for common workflows:
14151515-| Command | Description |
1616-| ------------- | -------------------------------------- |
1717-| `just format` | Run `dart format` |
1818-| `just lint` | Run `flutter analyze` |
1919-| `just test` | Run the full `flutter test` suite |
2020-| `just gen` | Run `build_runner` for code generation |
2121-| `just check` | Format, lint, and test in sequence |
1616+| Command | Description |
1717+| ---------------------- | ----------------------------------------------------- |
1818+| `just format` | Run `dart format` |
1919+| `just lint` | Run `flutter analyze` |
2020+| `just objectbox-setup` | Install pinned ObjectBox native runtime (macOS/Linux) |
2121+| `just objectbox-check` | Verify ObjectBox native runtime is present |
2222+| `just test` | Run the full `flutter test` suite |
2323+| `just gen` | Run `build_runner` for code generation |
2424+| `just check` | Format, lint, and test in sequence |
22252326## Architecture
2427···94979598#### Running unit tests (ObjectBox native library)
96999797-ObjectBox requires a platform native library to run `flutter test` locally:
100100+ObjectBox requires a platform native library to run `flutter test` locally.
101101+Lazurite standardizes this setup through a pinned installer script.
102102+103103+Supported local platforms: macOS and Linux.
104104+105105+Run this once per machine:
9810699107```sh
100100-bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)
108108+just objectbox-setup
101109```
102110103103-This installs `lib/libobjectbox.dylib` (macOS) or the equivalent. The file is gitignored and not required to build the app.
111111+`just test` and `just test-quiet` intentionally run a preflight check
112112+(`just objectbox-check`) and fail fast with setup instructions if the
113113+runtime is missing.
104114105115## Semantic Search
106116···119129120130**`LikedPostsRepository`** (`lib/features/feed/data/liked_posts_repository.dart`):
121131122122-| Method | Description |
123123-| -------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
124124-| `syncLikes(accountDid)` | Paginate `getActorLikes` until a known URI is hit or 1000-post cap is reached; evicts oldest on overflow |
125125-| `getLikedPosts(accountDid, {limit, offset})` | Paginated query ordered by `likedAt DESC` |
126126-| `removeLike(accountDid, postUri)` | Delete a single entry |
132132+| Method | Description |
133133+| -------------------------------------------- | ----------------------------------------------------------------------------- |
134134+| `syncLikes(accountDid)` | Paginate `getActorLikes` until a known URI is hit or 1000-post cap is reached |
135135+| | evicts oldest on overflow |
136136+| `getLikedPosts(accountDid, {limit, offset})` | Paginated query ordered by `likedAt DESC` |
137137+| `removeLike(accountDid, postUri)` | Delete a single entry |
127138128139## Testing
129140···132143```sh
133144just test
134145# or with failure-only reporter (recommended for large suites):
135135-flutter test --reporter=failures-only
146146+just test-quiet
136147```
137148138149Coverage target: **>99%** (±5% acceptable). All new code must have tests. Widget tests use `NativeDatabase.memory()` for Drift and mocktail for API mocks.
+2
README.md
···101101```
102102103103For development setup, tooling, database schema, and contribution notes, see [DEVELOPMENT.md](DEVELOPMENT.md).
104104+If you run tests locally on macOS or Linux, run `just objectbox-setup` once
105105+to install the pinned ObjectBox native runtime.
104106105107## References
106108
+10
justfile
···1111lint:
1212 flutter analyze
13131414+# Install pinned ObjectBox runtime library for local development
1515+objectbox-setup:
1616+ bash scripts/objectbox_runtime.sh install
1717+1818+# Verify ObjectBox runtime library is present (fails fast if missing)
1919+objectbox-check:
2020+ bash scripts/objectbox_runtime.sh check
2121+1422# Test with failures only to focus on failures and hanging tests
1523test-quiet *paths='':
2424+ just objectbox-check
1625 flutter test {{ paths }} --reporter=failures-only --fail-fast --timeout=120s
17261827# Run all tests
1928test *paths='':
2929+ just objectbox-check
2030 flutter test {{ paths }} --fail-fast --timeout=120s
21312232generate:
+113
scripts/objectbox_runtime.sh
···11+#!/usr/bin/env bash
22+set -euo pipefail
33+44+readonly OBJECTBOX_DART_COMMIT="5c96e04"
55+readonly INSTALL_URL="https://raw.githubusercontent.com/objectbox/objectbox-dart/${OBJECTBOX_DART_COMMIT}/install.sh"
66+readonly SCRIPT_NAME="$(basename "$0")"
77+88+usage() {
99+ cat <<'EOF'
1010+Usage:
1111+ scripts/objectbox_runtime.sh check
1212+ scripts/objectbox_runtime.sh install
1313+1414+Commands:
1515+ check Verify the ObjectBox native runtime library exists for this platform.
1616+ install Install ObjectBox native runtime from a pinned upstream revision,
1717+ then run check.
1818+EOF
1919+}
2020+2121+platform_label() {
2222+ case "$(uname -s)" in
2323+ Darwin) echo "macos" ;;
2424+ Linux) echo "linux" ;;
2525+ *) echo "unsupported" ;;
2626+ esac
2727+}
2828+2929+expected_libs() {
3030+ case "$(platform_label)" in
3131+ macos)
3232+ printf '%s\n' "lib/libobjectbox.dylib"
3333+ ;;
3434+ linux)
3535+ printf '%s\n' \
3636+ "lib/libobjectbox.so" \
3737+ "lib/libobjectbox-arm.so" \
3838+ "lib/libobjectbox-arm64.so"
3939+ ;;
4040+ *)
4141+ return 1
4242+ ;;
4343+ esac
4444+}
4545+4646+check_runtime() {
4747+ local platform
4848+ platform="$(platform_label)"
4949+5050+ if [[ "${platform}" == "unsupported" ]]; then
5151+ echo "Unsupported platform: $(uname -s). Supported local platforms: macOS and Linux."
5252+ return 2
5353+ fi
5454+5555+ local found=1
5656+ while IFS= read -r lib_path; do
5757+ if [[ -f "${lib_path}" ]]; then
5858+ found=0
5959+ break
6060+ fi
6161+ done < <(expected_libs)
6262+6363+ if [[ "${found}" -ne 0 ]]; then
6464+ cat <<EOF
6565+ObjectBox native runtime library is missing for ${platform}.
6666+6767+Expected one of:
6868+$(expected_libs | sed 's/^/ - /')
6969+7070+Install it with:
7171+ just objectbox-setup
7272+7373+Or run directly:
7474+ ${SCRIPT_NAME} install
7575+EOF
7676+ return 1
7777+ fi
7878+7979+ echo "ObjectBox runtime check passed for ${platform}."
8080+}
8181+8282+install_runtime() {
8383+ local platform
8484+ platform="$(platform_label)"
8585+ if [[ "${platform}" == "unsupported" ]]; then
8686+ echo "Unsupported platform: $(uname -s). Supported local platforms: macOS and Linux."
8787+ return 2
8888+ fi
8989+9090+ echo "Installing ObjectBox runtime from pinned revision ${OBJECTBOX_DART_COMMIT}..."
9191+ curl -sSfL "${INSTALL_URL}" | bash
9292+ check_runtime
9393+}
9494+9595+main() {
9696+ if [[ $# -ne 1 ]]; then
9797+ usage
9898+ return 1
9999+ fi
100100+101101+ case "$1" in
102102+ check) check_runtime ;;
103103+ install) install_runtime ;;
104104+ -h|--help|help) usage ;;
105105+ *)
106106+ echo "Unknown command: $1"
107107+ usage
108108+ return 1
109109+ ;;
110110+ esac
111111+}
112112+113113+main "$@"