Enhance: Integrate Aether Native Bridge and update V3 deployment plan
- Updated +layout.ts to detect window.aetherNative and prioritize hydrated config. - Mapped native operational paths (cache, recordings) to global location store. - Refined NATIVE_APP_V3_REWRITE_PLAN.md with Two-Step Bootstrap strategy. - Updated TODO.md with project progress and next-gen launcher priorities.
This commit is contained in:
@@ -5,26 +5,39 @@
|
||||
**Development Platform:** Arch Linux
|
||||
**API Version:** Aether V3 (REST + JWT)
|
||||
|
||||
## 0. Project Purpose
|
||||
The sole purpose of this Native App is to serve as the **AE Events Launcher**. It provides the SvelteKit frontend with the ability to:
|
||||
- Persistently cache files in the local filesystem.
|
||||
- Execute OS-level shell commands and scripts (e.g., launching presentation software).
|
||||
- Provide a "Zero-Config" experience for onsite event laptops.
|
||||
|
||||
## 1. Minimalist Configuration Strategy
|
||||
To simplify laptop deployment, we will move away from large local JSON files.
|
||||
|
||||
### 1.1 The "Seed" Config
|
||||
Each laptop will contain a `seed.json` located in standard OS config paths (e.g., `~/.config/aether/seed.json` or `~/Library/Application Support/Aether/`).
|
||||
Each laptop will contain a `seed.json`. For development, this is located at `~/seed.json`. In production, it will move to standard OS config paths (e.g., `~/.config/aether/seed.json` or `~/Library/Application Support/Aether/`).
|
||||
|
||||
```json
|
||||
{
|
||||
"event_device_id": "AE-LPT-01",
|
||||
"api_base_url": "https://api.oneskyit.com"
|
||||
"event_device_id": "dbgMWS3KEHE",
|
||||
"primary_api_base_url": "https://dev-api.oneskyit.com",
|
||||
"backup_api_base_url": null,
|
||||
"onsite_api_base_url": null,
|
||||
"aether_api_key": "INSdG85ANwsEIru3nUttMw"
|
||||
}
|
||||
```
|
||||
*Note: only `event_device_id` is strictly required for the bootstrapper to start.*
|
||||
|
||||
### 1.2 The Bootstrap Flow
|
||||
1. **Launch:** Electron reads the `seed.json`.
|
||||
2. **Identity:** App calls `GET /v3/crud/event_device/{id}?view=full_config`.
|
||||
3. **Hydrate:** API returns the full operational config (Account context, Event settings, File cache paths).
|
||||
4. **Auth:** App uses its device-specific API key to exchange for a session JWT.
|
||||
2. **Identity:** App calls `GET /v3/crud/event_device/{id}`.
|
||||
3. **Hydrate:** App uses `app_base_url` from the device record to search for the corresponding `site_domain`.
|
||||
4. **Target URL:** Electron constructs the launcher URL:
|
||||
`http://[app_base_url]/events/[event_id]/launcher/[event_location_id]`
|
||||
5. **Inject:** Config and JWT are injected into the SvelteKit frontend via the Preload script.
|
||||
|
||||
## 2. macOS Hardening (Permissions)
|
||||
...
|
||||
macOS requires explicit user consent for several features. The new app will handle these during the "Splash Screen" phase.
|
||||
|
||||
- **AV Access:** Use `systemPreferences.askForMediaAccess('camera')` and `microphone`.
|
||||
|
||||
Reference in New Issue
Block a user