dreamwell_projects/lib.rs
1// dreamwell-projects — Project templates for QTTPS applications.
2//
3// Each template produces a complete project scaffold:
4// - tapestry.json (project manifest)
5// - tapestry.lock (sealed scene)
6// - index.dreamfile (landing page content)
7// - server_tapestry.json (QTTPS server config)
8//
9// Templates follow Clean Compute: explicit, measurable, deterministic.
10// All φ-derived constants are honored in template defaults.
11
12pub mod templates;
13
14/// Template metadata.
15#[derive(Debug, Clone)]
16pub struct TemplateInfo {
17 /// Template identifier (used in `dream up --<name>`).
18 pub id: &'static str,
19 /// Human-readable name.
20 pub name: &'static str,
21 /// One-line description.
22 pub description: &'static str,
23}
24
25/// List all available templates.
26pub fn list_templates() -> Vec<TemplateInfo> {
27 vec![TemplateInfo {
28 id: "hello-universe",
29 name: "Hello Universe!",
30 description: "Minimal QTTPS landing page — the quantum Hello World",
31 }]
32}
33
34#[cfg(test)]
35mod tests {
36 use super::*;
37
38 #[test]
39 fn templates_list_non_empty() {
40 let templates = list_templates();
41 assert!(!templates.is_empty());
42 }
43
44 #[test]
45 fn hello_universe_template_exists() {
46 let templates = list_templates();
47 assert!(templates.iter().any(|t| t.id == "hello-universe"));
48 }
49}