diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/Cargo.toml b/src/new/templates/rust/ui/hyperapp-skeleton/Cargo.toml index b750850e..cd1e8875 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/Cargo.toml +++ b/src/new/templates/rust/ui/hyperapp-skeleton/Cargo.toml @@ -5,7 +5,7 @@ panic = "abort" [workspace] members = [ - "skeleton-app", + "hyperapp-skeleton", "target/hyperapp-skeleton-caller-util?", ] resolver = "2" diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/README.md b/src/new/templates/rust/ui/hyperapp-skeleton/README.md index 6cb2270a..87c2a5bc 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/README.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/README.md @@ -59,7 +59,7 @@ kit build --hyperapp hyperapp-skeleton/ ├── Cargo.toml # Workspace configuration ├── metadata.json # App metadata -├── skeleton-app/ # Main Rust process +├── hyperapp-skeleton/ # Main Rust process │ ├── Cargo.toml # Process dependencies │ └── src/ │ ├── lib.rs # Main app logic (well-commented) @@ -127,7 +127,7 @@ Your app's state is automatically persisted based on the `save_config` option: ### 1. Modify App State -Edit `AppState` in `skeleton-app/src/lib.rs`: +Edit `AppState` in `hyperapp-skeleton/src/lib.rs`: ```rust #[derive(Default, Serialize, Deserialize)] pub struct AppState { @@ -163,8 +163,8 @@ There is also a `request_networking` field that must be true to send messages ov ### 4. Update Frontend -1. Add types in `ui/src/types/skeleton.ts` -2. Update store in `ui/src/store/skeleton.ts` +1. Add types in `ui/src/types/hyperapp-skeleton.ts` +2. Update store in `ui/src/store/hyperapp-skeleton.ts` 3. Modify UI in `ui/src/App.tsx` ### 5. Rename as appropriate @@ -209,7 +209,7 @@ In particular, note the example applications `resources/example-apps/sign/`, `re `file-explorer` demonstrates VFS interactions. Expand the prompt and/or `instructions.md` into a detailed implementation plan. -The implementor will be starting from this existing template that exists at `skeleton-app/` and `ui/`. +The implementor will be starting from this existing template that exists at `hyperapp-skeleton/` and `ui/`. Note in particular that bindings for the UI will be generated when the app is built with `kit build --hyperapp`. As such, first design and implement the backend; the interface will be generated from the backend; finally design and implement the frontend to consume the interface. @@ -229,7 +229,7 @@ Look carefully at `IMPLEMENTATION_PLAN.md` and in the `resources/` directory, if In particular, note the example applications `resources/example-apps/sign/`, `resources/example-apps/id/`, and `resources/example-apps/file-explorer`. Use them if useful. -Work from the existing template that exists at `skeleton-app/` and `ui/`. +Work from the existing template that exists at `hyperapp-skeleton/` and `ui/`. Note in particular that bindings for the UI will be generated when the app is built with `kit build --hyperapp`. As such, first design and implement the backend; the interface will be generated from the backend; finally design and implement the frontend to consume the interface. diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/Cargo.toml b/src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/Cargo.toml similarity index 96% rename from src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/Cargo.toml rename to src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/Cargo.toml index 9e3ea212..78b1033e 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/Cargo.toml +++ b/src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/Cargo.toml @@ -26,7 +26,7 @@ crate-type = ["cdylib"] [package] edition = "2021" -name = "skeleton-app" +name = "hyperapp-skeleton" version = "0.1.0" [package.metadata.component] diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/src/icon b/src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/src/icon similarity index 100% rename from src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/src/icon rename to src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/src/icon diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/src/lib.rs b/src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/src/lib.rs similarity index 95% rename from src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/src/lib.rs rename to src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/src/lib.rs index c1db672a..eb6345d0 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/skeleton-app/src/lib.rs +++ b/src/new/templates/rust/ui/hyperapp-skeleton/hyperapp-skeleton/src/lib.rs @@ -35,7 +35,7 @@ pub struct Status { // STEP 2: IMPLEMENT YOUR APP LOGIC // The #[hyperprocess] attribute goes HERE, before the impl block #[hyperprocess( - name = "Skeleton App", + name = "HyperappSkeleton App", ui = Some(hyperware_process_lib::http::server::HttpBindingConfig::default()), endpoints = vec![ hyperware_process_lib::hyperapp::Binding::Http { @@ -44,7 +44,7 @@ pub struct Status { }, ], save_config = hyperware_process_lib::hyperapp::SaveOptions::EveryMessage, - wit_world = "skeleton-app-skeleton-dot-os-v0" + wit_world = "hyperapp-skeleton-template-dot-os-v0" )] impl AppState { // INITIALIZATION FUNCTION @@ -57,7 +57,7 @@ impl AppState { async fn initialize(&mut self) { // Add your app to the Hyperware homepage // Parameters: name, icon, path, widget - add_to_homepage("Skeleton App", Some(ICON), Some("/"), None); + add_to_homepage("HyperappSkeleton App", Some(ICON), Some("/"), None); // Initialize your app state self.counter = 0; @@ -65,7 +65,7 @@ impl AppState { // Get our node identity (useful for P2P apps) let our_node = our().node.clone(); - println!("Skeleton app initialized on node: {}", our_node); + println!("HyperappSkeleton app initialized on node: {}", our_node); } // HTTP ENDPOINT EXAMPLE diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/metadata.json b/src/new/templates/rust/ui/hyperapp-skeleton/metadata.json index 73173a9e..2f7c2f7f 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/metadata.json +++ b/src/new/templates/rust/ui/hyperapp-skeleton/metadata.json @@ -1,11 +1,11 @@ { - "name": "SkeletonApp", + "name": "HyperappSkeleton", "description": "A minimal skeleton app for the Hyperware platform using the Hyperapp framework - demonstrates basic state management and HTTP endpoints", "image": "", "properties": { - "package_name": "skeleton-app", + "package_name": "hyperapp-skeleton", "current_version": "0.1.0", - "publisher": "skeleton.os", + "publisher": "template.os", "mirrors": [], "code_hashes": { "0.1.0": "" @@ -15,4 +15,4 @@ }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/pkg/manifest.json b/src/new/templates/rust/ui/hyperapp-skeleton/pkg/manifest.json index b400f8b7..9cb126db 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/pkg/manifest.json +++ b/src/new/templates/rust/ui/hyperapp-skeleton/pkg/manifest.json @@ -1,7 +1,7 @@ [ { - "process_name": "skeleton-app", - "process_wasm_path": "/skeleton-app.wasm", + "process_name": "hyperapp-skeleton", + "process_wasm_path": "/hyperapp-skeleton.wasm", "on_exit": "Restart", "request_networking": false, "request_capabilities": [ diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/00-QUICK-REFERENCE.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/00-QUICK-REFERENCE.md index 0764e0f2..c5c70cca 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/00-QUICK-REFERENCE.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/00-QUICK-REFERENCE.md @@ -96,10 +96,10 @@ kit b --hyperapp ## Project Structure ``` -skeleton-app/ +hyperapp-skeleton/ ├── Cargo.toml # Workspace config ├── metadata.json # App metadata -├── skeleton-app/ # Rust backend +├── hyperapp-skeleton/ # Rust backend │ ├── Cargo.toml # DO NOT add hyperware_process_lib here! │ └── src/ │ └── lib.rs # Main app logic diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/01-COMMON-PATTERNS.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/01-COMMON-PATTERNS.md index f768c871..5de643e0 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/01-COMMON-PATTERNS.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/01-COMMON-PATTERNS.md @@ -256,7 +256,7 @@ async fn sync_with_node(&mut self, request_body: String) -> Result() .map_err(|e| format!("Invalid process ID: {}", e))?; @@ -302,7 +302,7 @@ async fn broadcast_update(&mut self, request_body: String) -> Result() .unwrap(); @@ -338,7 +338,7 @@ async fn reliable_remote_call( data: String, max_retries: u32, ) -> Result { - let process_id = format!("skeleton-app:skeleton-app:{}", "skeleton.os") + let process_id = format!("hyperapp-skeleton:hyperapp-skeleton:{}", "template.os") .parse::() .map_err(|e| format!("Invalid process ID: {}", e))?; @@ -385,13 +385,13 @@ async fn reliable_remote_call( #[http] async fn upload_file(&mut self, file_name: String, mime_type: String, file_data: Vec) -> Result { let file_id = uuid::Uuid::new_v4().to_string(); - let file_path = format!("/skeleton-app:skeleton.os/files/{}", file_id); + let file_path = format!("/hyperapp-skeleton:template.os/files/{}", file_id); // Create directory if needed let vfs_address = Address::new(our().node.clone(), "vfs:distro:sys".parse::().unwrap()); let create_dir = json!({ - "path": "/skeleton-app:skeleton.os/files", + "path": "/hyperapp-skeleton:template.os/files", "action": "CreateDirAll" }); @@ -431,7 +431,7 @@ async fn upload_file(&mut self, file_name: String, mime_type: String, file_data: #[http] async fn download_file(&self, request_body: String) -> Result, String> { let file_id: String = serde_json::from_str(&request_body)?; - let file_path = format!("/skeleton-app:skeleton.os/files/{}", file_id); + let file_path = format!("/hyperapp-skeleton:template.os/files/{}", file_id); let vfs_address = Address::new(our().node.clone(), "vfs:distro:sys".parse::().unwrap()); diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/02-TROUBLESHOOTING.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/02-TROUBLESHOOTING.md index 612dc4fd..315a4b47 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/02-TROUBLESHOOTING.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/02-TROUBLESHOOTING.md @@ -288,8 +288,8 @@ let pid = "myapp-myapp-publisher".parse::(); // Wrong separator let pid = "myapp:myapp:publisher.os".parse::()?; // For your app matching remote nodes -let publisher = "skeleton.os"; // Or whatever the remote uses -let pid = format!("skeleton-app:skeleton-app:{}", publisher) +let publisher = "template.os"; // Or whatever the remote uses +let pid = format!("hyperapp-skeleton:hyperapp-skeleton:{}", publisher) .parse::()?; ``` @@ -637,8 +637,8 @@ ls -la pkg/ ```json // metadata.json must exist and be valid { - "package": "skeleton-app", - "publisher": "skeleton.os" + "package": "hyperapp-skeleton", + "publisher": "template.os" } ``` @@ -648,7 +648,7 @@ ls -la pkg/ **Example:** ``` -Error: Process skeleton-app:skeleton-app:user.os does not have capability vfs:distro:sys +Error: Process hyperapp-skeleton:hyperapp-skeleton:user.os does not have capability vfs:distro:sys ``` **Root Cause:** Using system feature without requesting capability @@ -715,7 +715,7 @@ ls -la pkg/ui/ ### Test Incrementally ```bash # 1. Test backend compiles -cd skeleton-app && cargo check +cd hyperapp-skeleton && cargo check # 2. Test UI builds cd ui && npm run build diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/04-P2P-PATTERNS.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/04-P2P-PATTERNS.md index 62b4e470..4829206a 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/04-P2P-PATTERNS.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/04-P2P-PATTERNS.md @@ -58,9 +58,9 @@ let process_id = "myapp:myapp:publisher.os" // For your app to talk to itself on other nodes // IMPORTANT: All nodes must use the same publisher! let my_process_id = format!("{}:{}:{}", - "skeleton-app", // process name (from metadata.json) - "skeleton-app", // package name (from metadata.json) - "skeleton.os" // publisher (must be consistent across nodes) + "hyperapp-skeleton", // process name (from metadata.json) + "hyperapp-skeleton", // package name (from metadata.json) + "template.os" // publisher (must be consistent across nodes) ).parse::()?; ``` @@ -120,7 +120,7 @@ async fn get_remote_data(&self, request_body: String) -> Result let target_node: String = serde_json::from_str(&request_body)?; // Build address - let process_id = "skeleton-app:skeleton-app:skeleton.os".parse::()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; let target = Address::new(target_node, process_id); // Create request @@ -204,7 +204,7 @@ async fn broadcast_event(&mut self, request_body: String) -> Result()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; let target = Address::new(node.clone(), process_id); // Fire and forget - still set timeout for reliability @@ -262,7 +262,7 @@ pub struct SyncResponse { // Periodic sync with peers impl AppState { async fn sync_with_peer(&mut self, peer_node: String) -> Result<(), String> { - let process_id = "skeleton-app:skeleton-app:skeleton.os".parse::()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; let target = Address::new(peer_node.clone(), process_id); // Send our state info @@ -359,7 +359,7 @@ impl AppState { "ApplyOperation": serde_json::to_string(&op).unwrap() }); - let process_id = "skeleton-app:skeleton-app:skeleton.os".parse::()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; for peer in &self.peers { let target = Address::new(peer.clone(), process_id); @@ -509,7 +509,7 @@ impl AppState { "RegisterNode": serde_json::to_string(&my_info).unwrap() }); - let process_id = "skeleton-app:skeleton-app:skeleton.os".parse::()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; // Announce to bootstrap nodes for bootstrap in &self.bootstrap_nodes { @@ -584,7 +584,7 @@ async fn start_transaction(&mut self, request_body: String) -> Result()?; + let process_id = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::()?; let mut votes = HashMap::new(); for participant in &tx.participants { diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/06-TESTING-DEBUGGING.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/06-TESTING-DEBUGGING.md index e2f1575a..1aa63e0d 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/06-TESTING-DEBUGGING.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/06-TESTING-DEBUGGING.md @@ -684,14 +684,14 @@ async fn diagnose_p2p(&self, request_body: String) -> String { let mut diagnostics = vec![]; // Check 1: ProcessId parsing - match "skeleton-app:skeleton-app:skeleton.os".parse::() { + match "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::() { Ok(pid) => diagnostics.push(format!("✅ ProcessId valid: {:?}", pid)), Err(e) => diagnostics.push(format!("❌ ProcessId error: {}", e)), } // Check 2: Address construction if !target_node.is_empty() { - let pid = "skeleton-app:skeleton-app:skeleton.os".parse::().ok(); + let pid = "hyperapp-skeleton:hyperapp-skeleton:template.os".parse::().ok(); if let Some(pid) = pid { let addr = Address::new(target_node.clone(), pid); diagnostics.push(format!("✅ Address created: {:?}", addr)); diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/07-COMPLETE-EXAMPLES.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/07-COMPLETE-EXAMPLES.md index 731d8b92..146140e2 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/07-COMPLETE-EXAMPLES.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/07-COMPLETE-EXAMPLES.md @@ -150,7 +150,7 @@ impl TodoState { "ReceiveTodoUpdate": serde_json::to_string(&todo).unwrap() }); - let process_id = "todo-app:todo-app:skeleton.os".parse::().unwrap(); + let process_id = "todo-app:todo-app:template.os".parse::().unwrap(); for node in &self.shared_with { let target = Address::new(node.clone(), process_id.clone()); @@ -163,7 +163,7 @@ impl TodoState { } async fn sync_todos_with_node(&self, node: String) -> Result<(), String> { - let process_id = "todo-app:todo-app:skeleton.os".parse::() + let process_id = "todo-app:todo-app:template.os".parse::() .map_err(|e| format!("Invalid process ID: {}", e))?; let target = Address::new(node, process_id); @@ -464,7 +464,7 @@ impl NotepadState { let node: String = serde_json::from_str(&request_body)?; // Request current state from node - let process_id = "notepad:notepad:skeleton.os".parse::()?; + let process_id = "notepad:notepad:template.os".parse::()?; let target = Address::new(node.clone(), process_id); let wrapper = json!({ "RequestState": our().node }); @@ -550,7 +550,7 @@ impl NotepadState { "ReceiveOperation": serde_json::to_string(&op).unwrap() }); - let process_id = "notepad:notepad:skeleton.os".parse::().unwrap(); + let process_id = "notepad:notepad:template.os".parse::().unwrap(); for node in &self.collaborators { if node != &op.author { // Don't send back to author @@ -736,7 +736,7 @@ impl KVStore { "Replicate": serde_json::to_string(&entry).unwrap() }); - let process_id = "kvstore:kvstore:skeleton.os".parse::().unwrap(); + let process_id = "kvstore:kvstore:template.os".parse::().unwrap(); for replica in &self.replicas { let target = Address::new(replica.clone(), process_id.clone()); @@ -754,7 +754,7 @@ impl KVStore { .cloned() .unwrap_or_else(|| "1970-01-01T00:00:00Z".to_string()); - let process_id = "kvstore:kvstore:skeleton.os".parse::()?; + let process_id = "kvstore:kvstore:template.os".parse::()?; let target = Address::new(node.clone(), process_id); let wrapper = json!({ "Sync": last_sync }); @@ -863,7 +863,7 @@ async fn share_file(&mut self, request_body: String) -> Result { } // Notify the node - let process_id = "fileshare:fileshare:skeleton.os".parse::()?; + let process_id = "fileshare:fileshare:template.os".parse::()?; let target = Address::new(req.node, process_id); let notification = json!({ @@ -927,7 +927,7 @@ async fn request_file(&self, file_id: String) -> Result, String> { cp -r hyperapp-skeleton myapp cd myapp # Update metadata.json with your app name -# Modify skeleton-app to match your app name +# Modify hyperapp-skeleton to match your app name ``` ### 2. Common Modifications @@ -935,7 +935,7 @@ cd myapp #### Change App Name 1. Update `metadata.json` 2. Update `Cargo.toml` (both workspace and app) -3. Rename `skeleton-app` directory +3. Rename `hyperapp-skeleton` directory 4. Update imports and ProcessId strings #### Add Dependencies @@ -1761,7 +1761,7 @@ impl ChatState { // Helper methods async fn send_to_node(&self, node: String, message: ChatMessage) -> Result<(), String> { - let publisher = "skeleton.os"; // Must match across all nodes! + let publisher = "template.os"; // Must match across all nodes! let process_id = format!("p2p-chat:p2p-chat:{}", publisher) .parse::() .map_err(|e| format!("Invalid ProcessId: {}", e))?; @@ -1779,7 +1779,7 @@ impl ChatState { } async fn notify_group_join(&self, node: String, group_id: String, name: String, participants: Vec) -> Result<(), String> { - let publisher = "skeleton.os"; + let publisher = "template.os"; let process_id = format!("p2p-chat:p2p-chat:{}", publisher) .parse::()?; diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/08-MANIFEST-AND-DEPLOYMENT.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/08-MANIFEST-AND-DEPLOYMENT.md index 1a9ccd81..8d9ab55f 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/08-MANIFEST-AND-DEPLOYMENT.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/08-MANIFEST-AND-DEPLOYMENT.md @@ -20,8 +20,8 @@ This file tells Hyperware: ```json [ { - "process_name": "skeleton-app", - "process_wasm_path": "/skeleton-app.wasm", + "process_name": "hyperapp-skeleton", + "process_wasm_path": "/hyperapp-skeleton.wasm", "on_exit": "Restart", "request_networking": true, "request_capabilities": [ @@ -38,8 +38,8 @@ This file tells Hyperware: | Field | Type | Description | Example | |-------|------|-------------|---------| -| `process_name` | string | Must match your metadata.json package name | `"skeleton-app"` | -| `process_wasm_path` | string | Path to compiled WASM file | `"/skeleton-app.wasm"` | +| `process_name` | string | Must match your metadata.json package name | `"hyperapp-skeleton"` | +| `process_wasm_path` | string | Path to compiled WASM file | `"/hyperapp-skeleton.wasm"` | | `on_exit` | string | What happens if process crashes | `"Restart"` or `"None"` | | `request_networking` | bool | Enables P2P messaging via Request API | `true` or `false` | | `request_capabilities` | array | System features needed | See capabilities section | @@ -185,7 +185,7 @@ process-name:package-name:publisher-node ``` For example: -- `skeleton-app:skeleton-app:skeleton.os` +- `hyperapp-skeleton:hyperapp-skeleton:template.os` - `samchat:samchat:samchat.os` This identity is used: diff --git a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/09-CAPABILITIES-GUIDE.md b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/09-CAPABILITIES-GUIDE.md index c44d28f3..0ed64424 100644 --- a/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/09-CAPABILITIES-GUIDE.md +++ b/src/new/templates/rust/ui/hyperapp-skeleton/resources/guides/09-CAPABILITIES-GUIDE.md @@ -413,7 +413,7 @@ match create_file("/data/test.txt", None) { ### ❌ "CapabilityNotFound" ``` -Error: Process skeleton-app:skeleton-app:user.os does not have capability vfs:distro:sys +Error: Process hyperapp-skeleton:hyperapp-skeleton:user.os does not have capability vfs:distro:sys ``` **Fix**: Add missing capability to manifest.json diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/index.html b/src/new/templates/ui/hyperapp-skeleton/ui/index.html index 51fc178f..a8805baf 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/index.html +++ b/src/new/templates/ui/hyperapp-skeleton/ui/index.html @@ -8,10 +8,10 @@ - Skeleton App - Hyperware + HyperappSkeleton App - Hyperware
- \ No newline at end of file + diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/package-lock.json b/src/new/templates/ui/hyperapp-skeleton/ui/package-lock.json index d6458a90..cd005573 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/package-lock.json +++ b/src/new/templates/ui/hyperapp-skeleton/ui/package-lock.json @@ -1,11 +1,11 @@ { - "name": "skeleton-app-ui", + "name": "hyperapp-skeleton-ui", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "skeleton-app-ui", + "name": "hyperapp-skeleton-ui", "version": "0.1.0", "dependencies": { "react": "^18.3.1", diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/package.json b/src/new/templates/ui/hyperapp-skeleton/ui/package.json index abc8ff41..9514acf8 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/package.json +++ b/src/new/templates/ui/hyperapp-skeleton/ui/package.json @@ -1,5 +1,5 @@ { - "name": "skeleton-app-ui", + "name": "hyperapp-skeleton-ui", "private": true, "version": "0.1.0", "type": "module", diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/src/App.tsx b/src/new/templates/ui/hyperapp-skeleton/ui/src/App.tsx index 8a3aac9a..72818f70 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/src/App.tsx +++ b/src/new/templates/ui/hyperapp-skeleton/ui/src/App.tsx @@ -1,7 +1,7 @@ -// Main App component for Skeleton App +// Main App component for Hyperapp Skeleton import { useEffect } from 'react'; import './App.css'; -import { useSkeletonStore } from './store/skeleton'; +import { useHyperappSkeletonStore } from './store/hyperapp-skeleton'; function App() { // Store state and actions @@ -16,7 +16,7 @@ function App() { fetchStatus, incrementCounter, clearError, - } = useSkeletonStore(); + } = useHyperappSkeletonStore(); // Initialize on mount @@ -40,7 +40,7 @@ function App() {
{/* Header */}
-

🦴 Skeleton App

+

🦴 HyperappSkeleton App

{isConnected ? ( <> @@ -122,7 +122,7 @@ function App() {

How to Use This Skeleton

-

This skeleton app demonstrates:

+

This HyperappSkeleton app demonstrates:

  • Basic state management with a counter
  • HTTP communication between frontend and backend
  • @@ -146,4 +146,4 @@ function App() { ); } -export default App; \ No newline at end of file +export default App; diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/src/store/skeleton.ts b/src/new/templates/ui/hyperapp-skeleton/ui/src/store/hyperapp-skeleton.ts similarity index 73% rename from src/new/templates/ui/hyperapp-skeleton/ui/src/store/skeleton.ts rename to src/new/templates/ui/hyperapp-skeleton/ui/src/store/hyperapp-skeleton.ts index bf7dbd36..c120e4d0 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/src/store/skeleton.ts +++ b/src/new/templates/ui/hyperapp-skeleton/ui/src/store/hyperapp-skeleton.ts @@ -1,10 +1,10 @@ -// Zustand store for Skeleton App state management +// Zustand store for Hyperapp Skeleton state management import { create } from 'zustand'; -import type { SkeletonState } from '../types/skeleton'; +import type { HyperappSkeletonState } from '../types/hyperapp-skeleton'; import { getNodeId } from '../types/global'; import { App } from '#caller-utils'; -interface SkeletonStore extends SkeletonState { +interface HyperappSkeletonStore extends HyperappSkeletonState { // Actions initialize: () => void; fetchStatus: () => Promise; @@ -15,7 +15,7 @@ interface SkeletonStore extends SkeletonState { } // Create the Zustand store -export const useSkeletonStore = create((set, get) => ({ +export const useHyperappSkeletonStore = create((set, get) => ({ // Initial state nodeId: null, isConnected: false, @@ -97,9 +97,9 @@ function getErrorMessage(error: unknown): string { } // Selector hooks for common use cases -export const useNodeId = () => useSkeletonStore((state) => state.nodeId); -export const useIsConnected = () => useSkeletonStore((state) => state.isConnected); -export const useCounter = () => useSkeletonStore((state) => state.counter); -export const useMessages = () => useSkeletonStore((state) => state.messages); -export const useIsLoading = () => useSkeletonStore((state) => state.isLoading); -export const useError = () => useSkeletonStore((state) => state.error); \ No newline at end of file +export const useNodeId = () => useHyperappSkeletonStore((state) => state.nodeId); +export const useIsConnected = () => useHyperappSkeletonStore((state) => state.isConnected); +export const useCounter = () => useHyperappSkeletonStore((state) => state.counter); +export const useMessages = () => useHyperappSkeletonStore((state) => state.messages); +export const useIsLoading = () => useHyperappSkeletonStore((state) => state.isLoading); +export const useError = () => useHyperappSkeletonStore((state) => state.error); diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/src/types/global.ts b/src/new/templates/ui/hyperapp-skeleton/ui/src/types/global.ts index f4b35ac5..e1367124 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/src/types/global.ts +++ b/src/new/templates/ui/hyperapp-skeleton/ui/src/types/global.ts @@ -6,7 +6,7 @@ declare global { interface Window { our?: { node: string; // e.g., "alice.os" - process: string; // e.g., "skeleton-app:skeleton-app:skeleton.os" + process: string; // e.g., "hyperapp-skeleton:hyperapp-skeleton:template.os" }; } } @@ -29,4 +29,4 @@ export const getNodeId = (): string | null => { // Get the current process identity export const getProcessId = (): string | null => { return window.our?.process || null; -}; \ No newline at end of file +}; diff --git a/src/new/templates/ui/hyperapp-skeleton/ui/src/types/skeleton.ts b/src/new/templates/ui/hyperapp-skeleton/ui/src/types/hyperapp-skeleton.ts similarity index 76% rename from src/new/templates/ui/hyperapp-skeleton/ui/src/types/skeleton.ts rename to src/new/templates/ui/hyperapp-skeleton/ui/src/types/hyperapp-skeleton.ts index 9d908544..d6f173bf 100644 --- a/src/new/templates/ui/hyperapp-skeleton/ui/src/types/skeleton.ts +++ b/src/new/templates/ui/hyperapp-skeleton/ui/src/types/hyperapp-skeleton.ts @@ -1,8 +1,8 @@ -// Type definitions for the Skeleton App +// Type definitions for the Hyperapp Skeleton App // These should match the types defined in your Rust backend // Store state interface -export interface SkeletonState { +export interface HyperappSkeletonState { // Connection state nodeId: string | null; isConnected: boolean; @@ -14,4 +14,4 @@ export interface SkeletonState { // UI state isLoading: boolean; error: string | null; -} \ No newline at end of file +}