dreamwell-projects 1.0.0

Dreamwell project templates — starter kits for QTTPS applications
Documentation
// dreamwell-projects — Project templates for QTTPS applications.
//
// Each template produces a complete project scaffold:
//   - tapestry.json (project manifest)
//   - tapestry.lock (sealed scene)
//   - index.dreamfile (landing page content)
//   - server_tapestry.json (QTTPS server config)
//
// Templates follow Clean Compute: explicit, measurable, deterministic.
// All φ-derived constants are honored in template defaults.

pub mod templates;

/// Template metadata.
#[derive(Debug, Clone)]
pub struct TemplateInfo {
    /// Template identifier (used in `dream up --<name>`).
    pub id: &'static str,
    /// Human-readable name.
    pub name: &'static str,
    /// One-line description.
    pub description: &'static str,
}

/// List all available templates.
pub fn list_templates() -> Vec<TemplateInfo> {
    vec![TemplateInfo {
        id: "hello-universe",
        name: "Hello Universe!",
        description: "Minimal QTTPS landing page — the quantum Hello World",
    }]
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn templates_list_non_empty() {
        let templates = list_templates();
        assert!(!templates.is_empty());
    }

    #[test]
    fn hello_universe_template_exists() {
        let templates = list_templates();
        assert!(templates.iter().any(|t| t.id == "hello-universe"));
    }
}