Skip to content

Commit e3f1e22

Browse files
Update documentation
1 parent 5369d85 commit e3f1e22

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Note: Some libraries have custom/patched versions (raphael-connections.js, rapha
136136
- `'server'` — PHP backend available, data loaded/saved via AJAX to `src/_server/ajaxServer.php`
137137
- `'local'` — File System Access API active, data read/written via `StorageAdapterLocal` to a user-selected folder
138138
- `'needsFolder'` — File System Access API supported but no folder selected yet; launcher prompts user to pick a `_data` directory
139-
- `'download'` — No persistent storage available (Firefox/Safari, or any browser without File System Access API and no PHP); `StorageAdapterDownload` is used, which stores data in memory and lets users export/download it. Viewing and editing work; saves persist only until page reload.
139+
- `'download'` — No persistent storage available (Firefox/Safari, or any browser without File System Access API and no PHP); `StorageAdapterDownload` is used, which stores data in memory and lets users export/download it. Viewing and editing work; `canSave` is `false` (no persistent target); changes are exported via Save As. Data persists only until page reload.
140140

141141
### Application Modes
142142

@@ -162,6 +162,7 @@ Note: Some libraries have custom/patched versions (raphael-connections.js, rapha
162162
4. **File-Based Persistence**: All data stored as JSON files (no database)
163163
5. **Event-Driven**: Timeline events, user actions broadcast to listeners
164164
6. **W3C Web Annotations**: Uses standardized annotation format with FrameTrail extensions
165+
7. **Guest Mode is orthogonal to storage mode**: `UserManagement.isGuestMode()` is an identity-layer flag — it means "editing without a server account", not "in download mode". A user can be in guest mode in any storage mode (local, download, or server). `StorageManager.canSave()` is the authoritative gate for save UI: it returns `false` for server mode when in guest mode, and delegates to `adapter.canSave` otherwise (`StorageAdapterDownload.canSave` is always `false`; `StorageAdapterLocal.canSave` is `true`). Always use `canSave()` rather than checking `isGuestMode()` or `storageMode` directly in save-related UI.
165166

166167
**Important: FrameTrail instance vs global:**
167168
- The global `FrameTrail` object is the factory/registry. `FrameTrail.module()`, `FrameTrail.changeState()`, etc. are only available on **initialized instances** (the `FrameTrail` parameter passed into `defineModule` callbacks).

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ FrameTrail supports a wide range of embeddable content:
8080

8181
## Getting Started
8282

83-
1. **Login** — Click the Edit button (top right) and log in with your admin account
83+
1. **Enter edit mode** — Click the Edit button (top right). In server mode, log in with your account or continue as a guest (name only). In local folder and in-memory modes, only the guest option is shown.
8484
2. **Create a hypervideo** — In the titlebar, click "New Hypervideo" and choose a video source
8585
3. **Add resources** — Click "Manage Resources" to upload or link media
8686
4. **Edit** — Drag resources onto the video timeline as overlays or annotations
87-
5. **Share** — Copy the URL or use iframe embedding
87+
5. **Save** — In server/local mode, Ctrl+S saves directly. As a guest, use Save As to export your changes as JSON.
88+
6. **Share** — Copy the URL or use iframe embedding
8889

8990
---
9091

docs/ARCHITECTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ FrameTrail.defineModule('ModuleName', function(FrameTrail) {
9797
| Module | Purpose |
9898
|--------|---------|
9999
| `Database` | Loads/saves all JSON data via the active storage adapter |
100-
| `StorageManager` | Selects and initializes the appropriate storage adapter |
100+
| `StorageManager` | Selects and initializes the appropriate storage adapter; exposes `canSave()` / `canSaveToServer()` |
101101
| `RouteNavigation` | URL parsing, hash parameters, environment detection |
102-
| `UserManagement` | Login, registration, user settings |
102+
| `UserManagement` | Login, registration, user settings, and guest editing (name-only, no account required) |
103103
| `Localization` | Multi-language string management (en-US, de) |
104104
| `ResourceManager` | Resource CRUD operations |
105105
| `ViewResources` | Resource gallery/grid view |
@@ -295,7 +295,7 @@ FrameTrail uses a strategy pattern for data persistence. The `StorageManager` mo
295295
|---------|-------|-----------|
296296
| Server | `StorageAdapterServer` | HTTP/HTTPS with PHP backend responding at `_server/ajaxServer.php` |
297297
| Local | `StorageAdapterLocal` | File System Access API available (Chrome/Edge) and folder selected |
298-
| Download | `StorageAdapterDownload` | Primary adapter when no server and no File System Access API (Firefox/Safari, or `file://` protocol). Stores data in memory; exports via Save As. Also available as a supplemental export tool in server and local modes. |
298+
| Download | `StorageAdapterDownload` | Primary adapter when no server and no File System Access API (Firefox/Safari, or `file://` protocol). Stores data in memory; `canSave` is `false` (no persistent target); exports via Save As. Also available as a supplemental export tool in server and local modes. |
299299

300300
All adapters implement the same interface, so the rest of the application doesn't need to know which storage backend is active.
301301

docs/DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Full editing without a server. Uses the [File System Access API](https://develop
5454
The `StorageAdapterLocal` class uses the File System Access API (`showDirectoryPicker`, `FileSystemDirectoryHandle`, etc.) to read and write JSON files and uploaded media. The browser asks for permission the first time you access a folder, then remembers it for the session.
5555

5656
**Limitations:**
57-
- No user management (everyone is effectively admin)
57+
- Identity is name-only (a login dialog prompts for a display name before entering edit mode; no account or password required)
5858
- No PHP-based file processing (image optimization, video transcoding)
5959
- Browser must support File System Access API (Chrome/Edge only)
6060

@@ -67,7 +67,7 @@ No server, no file system access required. FrameTrail automatically falls back t
6767

6868
**How it works:**
6969

70-
The `StorageAdapterDownload` holds all data in memory. Hypervideo data is passed via init options at startup (see [Inline on a Page](#inline-on-a-page) below). Viewing and editing are fully functional. The Save button is disabled (since there is nowhere to persist); use **Save As** to export a JSON snapshot that can be reloaded later.
70+
The `StorageAdapterDownload` holds all data in memory. Hypervideo data is passed via init options at startup (see [Inline on a Page](#inline-on-a-page) below). Viewing is always available. For editing, a login dialog prompts for a display name (guest mode — no account needed). The Save button is disabled (no persistent target); use **Save As** to export a JSON snapshot that can be reloaded later.
7171

7272
**Limitations:**
7373
- No persistence — changes are lost on page reload unless exported via Save As

0 commit comments

Comments
 (0)