Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ members = [
"crates/helix-timeline",
"crates/helix-evolve",
"crates/helix-refranges",
"crates/helix-demo",
"crates/helix-wasm",
]

Expand Down
21 changes: 21 additions & 0 deletions crates/helix-demo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "helix-demo"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Synthetic, fictional demo dossier (the 'Alex Rivera' persona) that seeds the Helix UI/mobile demo across all six data domains. SAMPLE DATA — not a real person."

[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
helix-provenance = { path = "../helix-provenance" }
helix-pipeline = { path = "../helix-pipeline" }
helix-escalation = { path = "../helix-escalation" }
helix-focus = { path = "../helix-focus" }
helix-score = { path = "../helix-score" }
helix-bioage = { path = "../helix-bioage" }
helix-timeline = { path = "../helix-timeline" }
helix-numeric = { path = "../helix-numeric" }
25 changes: 25 additions & 0 deletions crates/helix-demo/examples/generate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//! Regenerate `ui/demo-dossier.json` from the Rust source of truth.
//!
//! Run: `cargo run -p helix-demo --example generate`
//!
//! The UI (`ui/app.js`) and mobile PWA (`mobile/mobile.js`) fetch that JSON and
//! feed its records through the real WASM pipeline — so this file is the one
//! place the synthetic "Alex Rivera" dossier is defined.

use std::path::PathBuf;

fn main() -> std::io::Result<()> {
// crate dir → repo root → ui/demo-dossier.json
let repo_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("..")
.join("..");
let out = repo_root.join("ui").join("demo-dossier.json");

let json = helix_demo::dossier_json_pretty();
std::fs::write(&out, format!("{json}\n"))?;

let counts = helix_demo::domain_counts();
println!("wrote {} ({} bytes)", out.display(), json.len());
println!("domain counts: {counts:#}");
Ok(())
}
Loading
Loading