Skip to main content

logicaffeine_web/ui/pages/contact/
content.rs

1//! What the contact page says, as data.
2//!
3//! The install commands, the FAQ and the few lines the page states live here rather than in the
4//! markup, so they read and review in one place and every line that states a fact carries the
5//! suites that prove it. `contact_page` in logicaffeine_tests holds every suite to existing, the
6//! page to showing every claim, and the page to a list of claims the product does not back.
7//! Figures come from [`claims`](super::claims), never from here.
8
9use std::sync::LazyLock;
10
11
12/// The team's address: the page's fallback, where the form's requests arrive, and
13/// `public/llms.txt`.
14pub const TEAM_EMAIL: &str = "[email protected]";
15
16/// The install one-liners, exactly as the Syntax Guide's Getting Started section gives them.
17pub const INSTALL_UNIX: &str = "curl -fsSL https://logicaffeine.com/install.sh | sh";
18pub const INSTALL_WINDOWS: &str = "irm https://logicaffeine.com/install.ps1 | iex";
19
20/// The hero's call to the form, and the form's heading. The prerender smoke tests look for it.
21pub const CONTACT_HEADING: &str = "Contact the team";
22
23/// The form's button.
24pub const SEND: &str = "Send";
25
26/// The page's one line on what LOGOS is: open source, under MIT, for anyone.
27pub const OPEN_SOURCE_LINE: &str = "LOGOS is open source under the MIT License. Use it for anything, for anyone, at any size.";
28
29pub const LICENSE_URL: &str = "https://github.com/Brahmastra-Labs/logicaffeine/blob/main/LICENSE.md";
30pub const SOURCE_URL: &str = "https://github.com/Brahmastra-Labs/logicaffeine";
31
32/// The guide an AI assistant reads before it writes LOGOS: every documentation guide in one file,
33/// served from `public/`.
34pub const ASSISTANT_GUIDE_URL: &str = "https://logicaffeine.com/llms-full.txt";
35
36/// What backs a line on the page.
37pub enum Evidence {
38    /// The suites under `crates/logicaffeine_tests/tests/` that prove the capability.
39    Suites(&'static [&'static str]),
40}
41
42/// One line the page states, and what backs it.
43pub struct Claim {
44    pub text: String,
45    pub evidence: Evidence,
46}
47
48fn proven(text: impl Into<String>, suites: &'static [&'static str]) -> Claim {
49    Claim { text: text.into(), evidence: Evidence::Suites(suites) }
50}
51
52#[derive(PartialEq)]
53pub struct FaqLink {
54    pub text: &'static str,
55    pub href: &'static str,
56}
57
58#[derive(PartialEq)]
59pub struct Faq {
60    pub question: String,
61    pub answer: String,
62    /// A run of the answer shown as a link.
63    pub link: Option<FaqLink>,
64}
65
66/// Whether LOGOS is free, as the landing page's FAQ answers it: open source, under MIT.
67pub fn free_answer() -> String {
68    format!("Yes. {OPEN_SOURCE_LINE}")
69}
70
71pub fn faq() -> &'static [Faq] {
72    static FAQ: LazyLock<Vec<Faq>> = LazyLock::new(|| {
73        let plain = |question: &str, answer: String| Faq { question: question.to_string(), answer, link: None };
74        vec![
75            plain("Is LOGOS free?", free_answer()),
76            Faq {
77                question: "What is the license?".into(),
78                answer: "The MIT License, the whole of it in LICENSE.md.".into(),
79                link: Some(FaqLink { text: "LICENSE.md", href: LICENSE_URL }),
80            },
81            Faq {
82                question: "Where is the source?".into(),
83                answer: "On GitHub: github.com/Brahmastra-Labs/logicaffeine".into(),
84                link: Some(FaqLink { text: "github.com/Brahmastra-Labs/logicaffeine", href: SOURCE_URL }),
85            },
86            plain("How do I reach the team?", format!("Send the form on this page, or write to {TEAM_EMAIL}.")),
87        ]
88    });
89    &FAQ
90}
91
92/// Every line the page states with its evidence: the one line on what LOGOS is.
93pub fn every_claim() -> Vec<(String, &'static Evidence)> {
94    static OPEN: LazyLock<Claim> = LazyLock::new(|| proven(OPEN_SOURCE_LINE, &["version_lock"]));
95    vec![(OPEN.text.clone(), &OPEN.evidence)]
96}