Skip to content

V- Modal AI: Visual Video / Image Search - Flutter Video SDK

Release Flutter SDK from 417ffba7190934c2883bbaee4266d1aece2645c9

vmodal-release-appcb6b5f315149
diff --git a/CHANGELOG.md b/CHANGELOG.md
index da81308..9b3e752 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+----------------------------------------------------------
+date: 2026-09-24
+commit_hash: pending
+title: Explain Framebase user login and video flows
+summary:
+ - Added a screenshot tour and three flow diagrams to the user library example.
+ - Checked that screenshot assets are included in the public source export.
+
----------------------------------------------------------
date: 2026-09-23
commit_hash: pending
diff --git a/RELEASE_METADATA b/RELEASE_METADATA
index eedad02..dfbe2e1 100644
--- a/RELEASE_METADATA
+++ b/RELEASE_METADATA
@@ -1 +1 @@
-Source-vmx-api: a6e8cca246fa58fdf4419cfdaf70ca75c283cbc4
+Source-vmx-api: 417ffba7190934c2883bbaee4266d1aece2645c9
diff --git a/SOURCE_MANIFEST.sha256 b/SOURCE_MANIFEST.sha256
index c209caa..e809440 100644
--- a/SOURCE_MANIFEST.sha256
+++ b/SOURCE_MANIFEST.sha256
@@ -2,10 +2,10 @@ e789cd4d1bed8a78ec8014c5c5913e300f81b63ea56a56aacb0dfec3b5e7ce2b ./.flutter-ver
a3e3ce18f80b46587bcd529d13e456d10d97dd5e4a3f15e8e1a18894961120b1 ./.github/workflows/publish.yml
f8944a946de6f0d751d0de3277b9fd65150a26bac629030ac10c8c9772c06574 ./.gitleaks.toml
5115d06bd9913f466d50fcbf8ad8890372349060c54a4581f3481ea084cfdec6 ./.pubignore
-4e7cdf7c1056e12cdee9ce274554d780f74b629354742e1dedd88b9ae600f612 ./CHANGELOG.md
+b455e46613099c45774f1836bdaed834ab6af8aff8a3784e4f872c7f583a7922 ./CHANGELOG.md
37b7148216ac6090e36adfb699d642b8dd1e1b8ba99870e65e88733947a59fa6 ./LICENSE
534637dca830a792f7e4bec16dddfea86c37f59e67e6e95c4651c9bd0ae0052b ./README.md
-480bcc669fcb2ccc8bbdcc6818515f9199797dc972bded0a170a5aa74fa047ec ./RELEASE_METADATA
+24f62d19b9b31ba66c5424da526f9d8c7e391dc6e0302e6822768190a46c42d8 ./RELEASE_METADATA
def7e4f643adff5b01b877b6a7fa5b2381612b693c0bf06bd232ee0f7197d342 ./analysis_options.yaml
5aeee476843e07c110c4525685fb6b875fa28824e26eae514f345d593126df48 ./build.sh
4f18642680fb433554a5523d00bd99e0d650af340bcaebe628f59f63ac84e458 ./dartdoc_options.yaml
@@ -269,7 +269,7 @@ c783830af58111d94c3e78a705865468fa3ba8f59cc5bef833404d7ac3567119 ./example/05_f
4ecc92b82356d3fc31b7573caa8b9608dafb3af44dfe6f99b9f3ab93b4693500 ./example/05_framebase_userlogin/.metadata
bc001543e1418412ce7879a5c46d40ef1b3c485d8ba2b9a343bf7104b17e360c ./example/05_framebase_userlogin/LICENSE
559a8b6846e28399e68511e778cb7ea4b0390cf38fd87a9936414711bca72947 ./example/05_framebase_userlogin/MEDIA_SOURCES.md
-ffad10dd1a5f7c885244e9ffd8e86fb2cc73468132ce71157e2da6d1464b0a0a ./example/05_framebase_userlogin/README.md
+ad239ca9daa04dc03101bb4fda630d560560c93efc193498fb809e064d0c2cc6 ./example/05_framebase_userlogin/README.md
e0ea485cfdbc3e12b93efb8679a5ea73ebfe20ea4ca0c473dc594fc2fb274ed5 ./example/05_framebase_userlogin/analysis_options.yaml
6939878d0e417b29be6738e9c57772fc8a22a9aab5db39ae7fa867848d09d089 ./example/05_framebase_userlogin/android/app/build.gradle.kts
4e4a0e0726baf45d2d878ea5d0e0666e08ea6e9dbdc33ecd2a74a3525cf5ba51 ./example/05_framebase_userlogin/android/app/src/debug/AndroidManifest.xml
@@ -400,7 +400,7 @@ d132b6dceb89804a47418245845547a25fcf8f89f56b292ee70a404d63364865 ./test/fakes.d
14368b598ece0ce9b2e249148a10a92f2c80e38427c077013a1515826f4365bd ./test/fixtures/routes_contract.json
593b356ac3431de80e03e7a0e2f1df0d29589140f44746468213c1cac1c35bbe ./test/multipart_upload_test.dart
348b9581f6262acaaf96012a3d57685b0b45c3663c1497f14135663de7a60954 ./test/new_api_surface_test.dart
-09718731393326d8ce581a46abd8ff6ef2341e3390dc7435b3af725616af13fe ./test/regression_manifest_test.dart
+5209e29aefbfb5ecf855979754ec760578c4fa0c73d616394e05f85945c594c7 ./test/regression_manifest_test.dart
8c87a4645a2e329477d070277f64b617da14ac90163bb734fbb5326c1a97a5c3 ./test/resources_models_test.dart
8619ce113bb8669612f9a2a16b1b334ac68435c5972e84828a789511467fcb77 ./test/shell_scripts_test.dart
efe4f1158e7d4b9ca8e57f3538ce296279817292a4356c1399cf5f2cbae4c52d ./test/transcode_upload_test.dart
diff --git a/example/05_framebase_userlogin/README.md b/example/05_framebase_userlogin/README.md
index 57f830d..649f83f 100644
--- a/example/05_framebase_userlogin/README.md
+++ b/example/05_framebase_userlogin/README.md
@@ -1,11 +1,20 @@
# Framebase user library
This Flutter example gives each signed-in user a separate street-video library.
-The app owns sign-in and credential acquisition; the VMODAL SDK owns API
-transport. The bundled videos, grouped search results, uploads, index jobs,
-and timestamp playback follow the original `05_framebase` example.
+It shows where app sign-in, a VMODAL credential, SDK requests, local video files,
+and search results meet. The video screens come from the original Framebase
+example; this version adds a signed-out entry screen and per-user state.
-## Run offline
+## Screenshots
+
+| Video library | Search results | Playback at a match |
+| --- | --- | --- |
+| ![Three street videos in the Framebase library](readme_assets/library.png) | ![Matching frames grouped by source video](readme_assets/search.png) | ![Local video opened at the matching timestamp](readme_assets/playback.png) |
+
+These are the shared Framebase video screens after access is granted. The
+unconfigured offline app opens on **Sign in to your street library** instead.
+
+## Run the offline example
From `uinterface/sdk_flutter`:
@@ -17,38 +26,96 @@ flutter_bin="$(bash ../../install.sh flutter_bin)"
"$flutter_bin" run --device-id DEVICE_ID
```
-The default `MockFirebaseAuth` emits an empty response, so the app opens on
-the sign-in page and makes no VMODAL requests. A fake account and queued
-`VmodalCredential` responses can be injected in tests. Fixture keys are
-placeholders, not live credentials. Email/password sign-in through the fake
-adapter only succeeds for accounts supplied to that adapter.
-
-## Session contract
-
-`lib/user/` owns auth state, credential validation, permissions, token renewal,
-and account transitions. A trusted app-owned credential issuer must bind a
-Firebase UID to a VMODAL principal and stable `collection_user_id`, returning
-an `ak_...` key accepted by the gateway. Firebase Auth does not issue that key.
-No Firebase project config or issuer endpoint exists in this repo yet, so this
-example does not enable a production Firebase adapter.
-
-The controller validates expiry and binding, checks `auth.me()`, then opens
-`framebase_streets__user_<collection_user_id>` with stream `street_study`.
-It refreshes the VMODAL credential one minute before expiry and before SDK
-operations. The VMODAL key lives in memory only. Sign-out clears the provider,
-stops work, closes the client, and removes the previous account from the UI.
-The gateway remains the authorization boundary; UI permissions only hide
-unavailable actions.
-
-Imported MP4s and the `archive.json` manifest are stored under
-`accounts/<collection_user_id>/` in application support. Search results,
-downloaded images, signed URLs, and credentials are never persisted. Firebase's
-native session may be restored by a future real adapter, but the VMODAL key
-must be reacquired after each process start.
+The default `MockFirebaseAuth` has no accounts, and the credential source has
+no usable key. You can inspect the sign-in screen without a backend. To exercise
+the signed-in flow, inject a fake account and queued `VmodalCredential` responses
+as the tests do. Fixture keys are placeholders, not live credentials. A real
+Firebase adapter and trusted credential issuer are still required for production.
+
+## 1. Sign-in and library setup
+
+```mermaid
+flowchart TD
+ A[App opens] --> B{Auth adapter has a user?}
+ B -- No --> C[Show sign-in screen with no VMODAL request]
+ B -- Yes --> D[Ask app adapter for Firebase ID token]
+ C -->|Configured fake account signs in| D
+ D --> E[App credential source returns VMODAL key and user IDs]
+ E --> F{UID, expiry, permission, and owner checks pass?}
+ F -- No --> G[Show access error or retry]
+ F -- Yes --> H[Open this user's local archive and library]
+```
+
+`UserSessionController` validates the credential's Firebase UID, expiry,
+`library:read` permission, and stable user IDs. `SearchGateway.connect()` calls
+`auth.me()` to confirm that the VMODAL key belongs to the expected VMODAL user.
+Only then does the app show the library. Firebase Auth does not issue the VMODAL
+key: an app-owned credential source must supply it.
+
+## 2. API access and account changes
+
+```mermaid
+flowchart TD
+ A[Read or write action] --> B{Permission allows action?}
+ B -- No --> C[Keep action unavailable]
+ B -- Yes --> D[Ensure credential is fresh]
+ D -->|Expires within 1 minute| E[Acquire renewed credential and rotate in-memory key]
+ D -->|Still valid| F[SDK request]
+ E --> F
+ F --> G[VMODAL collection scoped to this user]
+ G -->|401 or 403| H[Cancel work and clear key and archive state]
+ I[Sign out or switch account] --> H
+ H --> J[Close session and hide library]
+```
+
+Collection operations target `framebase_streets__user_<collection_user_id>`;
+upload, indexing, and search use stream `street_study`. Reads need
+`library:read`; uploads and index preparation need
+`library:write`. The archive controller checks permissions, and the gateway
+fixes the collection scope for SDK calls. A rejected or
+expired credential closes access; sign-out also stops work and clears the
+in-memory key. The next account gets its own archive under
+`accounts/<collection_user_id>/` in application support.
+
+## 3. Video upload, search, and playback
+
+```mermaid
+flowchart LR
+ A[Bundled or imported MP4] --> B[Local file in user archive]
+ B -->|Write access| C[Stream upload to user collection]
+ C --> D[Create image index; poll job]
+ D --> E[Discover ready index version]
+ E -->|Read access| F[Search video frames]
+ F --> G[Fetch matching frame images]
+ G --> H[Group moments by source video]
+ H --> I[Play local MP4 at match time]
+```
+
+Choose **Prepare videos for search** to upload clips that are not yet uploaded
+and create the visual index. Search becomes available once the index has a ready
+version. Results use bulk image URL lookup and image download; tapping a result
+opens the local source video at its returned timestamp. Imported MP4s and the
+`archive.json` manifest stay in the active account's local directory. Credentials,
+search responses, signed URLs, and downloaded images are never persisted. The
+app does not delete remote videos.
+
+## Code map
+
+| File | Responsibility |
+| --- | --- |
+| [`lib/user/auth_adapter.dart`](lib/user/auth_adapter.dart), [`lib/user/mock_firebase_auth.dart`](lib/user/mock_firebase_auth.dart) | App-owned auth interface and offline fake |
+| [`lib/user/vmodal_credential.dart`](lib/user/vmodal_credential.dart) | Credential envelope, validation, and source interface |
+| [`lib/user/user_session_controller.dart`](lib/user/user_session_controller.dart) | Session states, refresh, account switch, and teardown |
+| [`lib/data/search_gateway.dart`](lib/data/search_gateway.dart) | Owner check and scoped VMODAL SDK calls |
+| [`lib/data/archive_controller.dart`](lib/data/archive_controller.dart) | Per-user local files, upload, indexing, and search |
+| [`lib/main.dart`](lib/main.dart) | Signed-out and library screens |
## Verify
+From `example/05_framebase_userlogin`:
+
```bash
+flutter_bin="$(bash ../../install.sh flutter_bin)"
"$flutter_bin" pub get
"$(bash ../../install.sh dart_bin)" format --output=none --set-exit-if-changed lib test
"$flutter_bin" analyze
@@ -60,4 +127,5 @@ archive separation, result mapping, and UI gating. Device testing with two
real accounts, a trusted issuer, and a gateway-accepted key remains the
production integration step.
-The bundled footage is documented in [MEDIA_SOURCES.md](MEDIA_SOURCES.md).
+The bundled footage and its license are documented in
+[MEDIA_SOURCES.md](MEDIA_SOURCES.md).
diff --git a/test/regression_manifest_test.dart b/test/regression_manifest_test.dart
index 9a9257f..a35a4cf 100644
--- a/test/regression_manifest_test.dart
+++ b/test/regression_manifest_test.dart
@@ -187,9 +187,18 @@ void main() {
'example/04_example/lib/main.dart',
'example/04_example/test/widget_test.dart',
'example/05_framebase_userlogin/README.md',
+ 'example/05_framebase_userlogin/MEDIA_SOURCES.md',
+ 'example/05_framebase_userlogin/readme_assets/library.png',
+ 'example/05_framebase_userlogin/readme_assets/search.png',
+ 'example/05_framebase_userlogin/readme_assets/playback.png',
'example/05_framebase_userlogin/pubspec.lock',
'example/05_framebase_userlogin/lib/main.dart',
+ 'example/05_framebase_userlogin/lib/user/auth_adapter.dart',
+ 'example/05_framebase_userlogin/lib/user/mock_firebase_auth.dart',
+ 'example/05_framebase_userlogin/lib/user/vmodal_credential.dart',
'example/05_framebase_userlogin/lib/user/user_session_controller.dart',
+ 'example/05_framebase_userlogin/lib/data/search_gateway.dart',
+ 'example/05_framebase_userlogin/lib/data/archive_controller.dart',
'example/05_framebase_userlogin/test/user_session_controller_test.dart',
'doc/search_app.md',
'doc/sdk_doc.md',