···590590591591## 8. AppView
592592593593-The AppView is a separate binary (`opake-appview`) that indexes grants and keyrings from the AT Protocol firehose. These tests require a running Jetstream instance or network access to the public Jetstream relays.
594594-595595-### 8.1 Configuration
593593+The AppView is an Elixir/Phoenix service (`appview/`) that indexes grants and keyrings from the AT Protocol firehose. These tests require Docker (for PostgreSQL) or a running Postgres instance.
596594597597-Create a minimal config:
595595+### 8.1 Start AppView (Docker)
598596599597```bash
600600-cat > /tmp/opake-appview-test/appview.toml <<EOF
601601-jetstream_url = "wss://jetstream2.us-east.bsky.network/subscribe"
602602-listen = "127.0.0.1:6100"
603603-db_path = "/tmp/opake-appview-test/appview.db"
604604-EOF
598598+cd appview
599599+docker compose --profile full up --build -d
600600+# Entrypoint auto-creates DB and runs migrations
601601+sleep 5
605602```
606603607607-### 8.2 Status (cold start)
608608-609609-```bash
610610-opake-appview --config-dir /tmp/opake-appview-test status
611611-# Cursor: (none — indexer has not run)
612612-# Grants: 0
613613-# Keyrings: 0
614614-```
615615-616616-### 8.3 Start indexer + API
617617-618618-```bash
619619-opake-appview --config-dir /tmp/opake-appview-test run -v &
620620-APPVIEW_PID=$!
621621-sleep 3
622622-```
623623-624624-**Verify:**
625625-- Logs show "opake-appview listening on 127.0.0.1:6100"
626626-- Logs show Jetstream connection established
627627-628628-### 8.4 Health endpoint
604604+### 8.2 Health endpoint
629605630606```bash
631607curl -s http://127.0.0.1:6100/api/health | jq .
···640616- `indexerConnected` is `true`
641617- `cursorAgeSecs` is small (< 60)
642618643643-### 8.5 Inbox and keyrings require auth
619619+### 8.3 Inbox and keyrings require auth
644620645621```bash
646622curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:6100/api/inbox?did=did:plc:test
···650626# 401
651627```
652628653653-### 8.6 Share triggers indexing
629629+### 8.4 Share triggers indexing
654630655631With the AppView still running, create a share grant using the CLI (from section 4.2):
656632···660636661637Wait a few seconds for the firehose to deliver the event.
662638663663-```bash
664664-opake-appview --config-dir /tmp/opake-appview-test status
665665-# Grants: should be ≥ 1
666666-```
667667-668668-### 8.7 Status (after indexing)
669669-670670-```bash
671671-opake-appview --config-dir /tmp/opake-appview-test status
672672-# Cursor: 2026-03-02T...
673673-# Lag: <small number>s
674674-# Grants: <non-zero>
675675-# Keyrings: <number>
676676-```
677677-678678-### 8.8 Config dir matches CLI
679679-680680-Both binaries should resolve the same config directory:
639639+### 8.5 Status (after indexing)
681640682641```bash
683683-# Both use OPAKE_DATA_DIR
684684-OPAKE_DATA_DIR=/tmp/opake-appview-test opake-appview status
685685-# should find /tmp/opake-appview-test/appview.toml
686686-687687-# --config-dir flag works the same way
688688-opake-appview --config-dir /tmp/opake-appview-test status
642642+docker compose exec appview bin/opake_appview eval "OpakeAppview.Release.status()"
643643+# Cursor:
644644+# Position: ...
645645+# Time: 2026-...
646646+# Lag: <small number>s
647647+# Counts:
648648+# Grants: <non-zero>
649649+# Keyrings: <number>
689650```
690651691691-### 8.9 Cleanup
652652+### 8.6 Cleanup
692653693654```bash
694694-kill $APPVIEW_PID 2>/dev/null
695695-rm -rf /tmp/opake-appview-test
655655+cd appview
656656+docker compose --profile full down -v
696657```
697658698659---
+1
CHANGELOG.md
···1212- Remove bearer token authentication fallback from AppView [#26](https://issues.opake.app/issues/26.html)s
13131414### Added
1515+- Rewrite opake-appview in Elixir/Phoenix with PostgreSQL [#290](https://issues.opake.app/issues/290.html)
1516- Add web sharing UI with grant management [#149](https://issues.opake.app/issues/149.html)
1617- Add user banner to profile dropdown and cache profile images in IndexedDB [#288](https://issues.opake.app/issues/288.html)
1718- Add split-panel preview, UI cleanup, and fix document name flicker [#286](https://issues.opake.app/issues/286.html)