progmaweb
The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.
Clonegit clone https://git.progmasoft.com/progmaweb
Redesign progmasoft.com and add the product catalog and product sites
- Commit
20a55c4ccbb0f181346444a4c7f083e86389cf9c- Author
- Leitwolf11 ·
- Parents
06dfa204e4a6
Changes
apps/web/app/catch3/layout.tsx | 11 + apps/web/app/catch3/page.tsx | 106 ++++++ apps/web/app/globals.css | 8 + apps/web/app/ides/layout.tsx | 11 + apps/web/app/ides/page.tsx | 53 +++ apps/web/app/ides/xide/page.tsx | 93 +++++ apps/web/app/layout.tsx | 4 +- apps/web/app/page.tsx | 205 +++++------ apps/web/app/products/[slug]/page.tsx | 89 +++++ apps/web/app/products/layout.tsx | 11 + apps/web/app/products/page.tsx | 62 ++++ apps/web/app/site.css | 532 +++++++++++++++++++++++++++++ apps/web/components/Footer.tsx | 8 +- apps/web/components/PreferenceControls.tsx | 32 +- apps/web/components/SiteHeader.tsx | 7 +- apps/web/components/site/AreaIcon.tsx | 49 +++ apps/web/lib/home-messages.ts | 358 +++++++++++++++++++ apps/web/lib/localization.ts | 307 ----------------- apps/web/lib/product-sites.ts | 412 ++++++++++++++++++++++ apps/web/lib/products.ts | 505 +++++++++++++++++++++++++++ apps/web/lib/sites.ts | 38 +++ apps/web/proxy.ts | 77 +++-- apps/web/tests/localization.test.mjs | 3 +- apps/web/tests/sites.test.mjs | 81 +++++ ops/README.md | 5 +- ops/nginx/progmaweb.conf | 138 ++++++++ 26 files changed, 2751 insertions(+), 454 deletions(-) diff --git a/apps/web/app/catch3/layout.tsx b/apps/web/app/catch3/layout.tsx new file mode 100644 index 0000000..de7e946 --- /dev/null +++ b/apps/web/app/catch3/layout.tsx @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { ReactNode } from "react"; +import "../site.css"; + +export default function Catch3Layout({ + children, +}: Readonly<{ children: ReactNode }>) { + return children; +} diff --git a/apps/web/app/catch3/page.tsx b/apps/web/app/catch3/page.tsx new file mode 100644 index 0000000..eec2772 --- /dev/null +++ b/apps/web/app/catch3/page.tsx @@ -0,0 +1,106 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Metadata } from "next"; +import { Footer } from "@/components/Footer"; +import { SiteHeader } from "@/components/SiteHeader"; +import { getLocale } from "@/lib/locale.server"; +import { products } from "@/lib/products"; +import { getSitesMessages } from "@/lib/product-sites"; + +export async function generateMetadata(): Promise<Metadata> { + const { catch3 } = getSitesMessages(await getLocale()); + return { + title: `Catch3 · ${catch3.tagline}`, + description: catch3.description, + alternates: { canonical: "https://catch3.progmasoft.com/" }, + }; +} + +// The example of the Catch3 documentation (docs/progmasoft-properties.md). +const example = `#include <Progmasoft/Catch3.hpp> + +using namespace Progmasoft::Catch3; + +TEST_CASE( "reversing twice gives the original", "[property]" ) { + CATCH3_CHECK_FOR_ALL( + Gen::Vectors( Gen::Integers<int>() ), + []( const std::vector<int>& values ) { + auto copy = values; + std::reverse( copy.begin(), copy.end() ); + std::reverse( copy.begin(), copy.end() ); + return copy == values; + } ); +}`; + +/** catch3.progmasoft.com: the site of Catch3. */ +export default async function Catch3Page() { + const locale = await getLocale(); + const { catch3, common } = getSitesMessages(locale); + return ( + <div className="pm-page"> + <SiteHeader locale={locale} /> + <main> + <section className="pm-hero"> + <div className="pm-shell pm-hero-inner"> + <div> + <p className="eyebrow">{catch3.eyebrow}</p> + <h1> + Catch3 <span>{catch3.tagline}</span> + </h1> + <p className="pm-lede">{catch3.description}</p> + <div className="pm-actions"> + <a className="button" href={products.catch3.source}> + {common.source} + </a> + <a + className="button button-secondary" + href="https://product.progmasoft.com/catch3" + > + {common.productPage} + </a> + </div> + <p className="pm-note">{catch3.disclaimer}</p> + </div> + <div> + <p className="eyebrow">{catch3.exampleTitle}</p> + <pre className="pm-code pm-code-light" dir="ltr"> + <code>{example}</code> + </pre> + </div> + </div> + </section> + + <section className="pm-section"> + <div className="pm-shell"> + <div className="pm-heading"> + <h2>{catch3.featuresTitle}</h2> + </div> + <div className="pm-bento"> + {catch3.features.map(([title, description]) => ( + <article className="pm-card" key={title}> + <h3>{title}</h3> + <p>{description}</p> + </article> + ))} + </div> + </div> + </section> + + <section className="pm-section pm-section-muted"> + <div className="pm-shell"> + <div className="pm-heading"> + <h2>{catch3.roadmapTitle}</h2> + </div> + <ul className="pm-features pm-roadmap"> + {catch3.roadmap.map((item) => ( + <li key={item}>{item}</li> + ))} + </ul> + </div> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index 3a27983..c405f30 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -1415,3 +1415,11 @@ a { direction: ltr; unicode-bidi: isolate; } + +/* The theme changes in one frame; nothing animates its colours meanwhile. */ +.theme-switching, +.theme-switching *, +.theme-switching *::before, +.theme-switching *::after { + transition: none !important; +} diff --git a/apps/web/app/ides/layout.tsx b/apps/web/app/ides/layout.tsx new file mode 100644 index 0000000..8b1c6b7 --- /dev/null +++ b/apps/web/app/ides/layout.tsx @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { ReactNode } from "react"; +import "../site.css"; + +export default function IdesLayout({ + children, +}: Readonly<{ children: ReactNode }>) { + return children; +} diff --git a/apps/web/app/ides/page.tsx b/apps/web/app/ides/page.tsx new file mode 100644 index 0000000..3a832a8 --- /dev/null +++ b/apps/web/app/ides/page.tsx @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Metadata } from "next"; +import { Footer } from "@/components/Footer"; +import { SiteHeader } from "@/components/SiteHeader"; +import { getLocale } from "@/lib/locale.server"; +import { forwardArrow } from "@/lib/localization"; +import { getCatalogMessages, products } from "@/lib/products"; +import { getSitesMessages } from "@/lib/product-sites"; + +export async function generateMetadata(): Promise<Metadata> { + const { ides } = getSitesMessages(await getLocale()); + return { + title: ides.title, + description: ides.description, + alternates: { canonical: "https://ides.progmasoft.com/" }, + }; +} + +/** ides.progmasoft.com: the development environments of Progmasoft. */ +export default async function IdesPage() { + const locale = await getLocale(); + const { ides } = getSitesMessages(locale); + const xide = getCatalogMessages(locale).products.xide; + return ( + <div className="pm-page"> + <SiteHeader locale={locale} /> + <main> + <section className="pm-hero"> + <div className="pm-shell pm-product-hero"> + <h1>{ides.title}</h1> + <p className="pm-lede">{ides.description}</p> + </div> + </section> + <section className="pm-section"> + <div className="pm-shell pm-product-grid"> + <a className="pm-card pm-product-card" href="/xide"> + <span className={`pm-accent pm-accent-${products.xide.accent}`} /> + <span className="pm-tag">{xide.category}</span> + <h3>{products.xide.name}</h3> + <p>{xide.tagline}</p> + <span className="pm-more"> + {ides.open} {forwardArrow(locale)} + </span> + </a> + </div> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/ides/xide/page.tsx b/apps/web/app/ides/xide/page.tsx new file mode 100644 index 0000000..86022e0 --- /dev/null +++ b/apps/web/app/ides/xide/page.tsx @@ -0,0 +1,93 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Metadata } from "next"; +import { Footer } from "@/components/Footer"; +import { SiteHeader } from "@/components/SiteHeader"; +import { getLocale } from "@/lib/locale.server"; +import { products } from "@/lib/products"; +import { getSitesMessages } from "@/lib/product-sites"; + +export async function generateMetadata(): Promise<Metadata> { + const { xide } = getSitesMessages(await getLocale()); + return { + title: `Xide · ${xide.tagline}`, + description: xide.description, + alternates: { canonical: "https://ides.progmasoft.com/xide" }, + }; +} + +/** ides.progmasoft.com/xide: the site of Xide. */ +export default async function XidePage() { + const locale = await getLocale(); + const { xide, common } = getSitesMessages(locale); + return ( + <div className="pm-page"> + <SiteHeader locale={locale} /> + <main> + <section className="pm-hero"> + <div className="pm-shell pm-hero-inner"> + <div> + <p className="eyebrow">{xide.eyebrow}</p> + <h1> + Xide <span>{xide.tagline}</span> + </h1> + <p className="pm-lede">{xide.description}</p> + <div className="pm-actions"> + <a className="button" href={products.xide.source}> + {common.source} + </a> + <a + className="button button-secondary" + href="https://product.progmasoft.com/xide" + > + {common.productPage} + </a> + </div> + </div> + <aside className="pm-aside"> + <span className="pm-tag">{common.status}</span> + <p>{xide.status}</p> + </aside> + </div> + </section> + + <section className="pm-section"> + <div className="pm-shell"> + <div className="pm-heading"> + <h2>{xide.layoutTitle}</h2> + </div> + <div className="pm-bento"> + {xide.layout.map(([title, description]) => ( + <article className="pm-card" key={title}> + <h3>{title}</h3> + <p>{description}</p> + </article> + ))} + </div> + </div> + </section> + + <section className="pm-section pm-section-muted"> + <div className="pm-shell pm-detail"> + <div className="pm-heading"> + <h2>{xide.languagesTitle}</h2> + <p>{xide.languagesDescription}</p> + </div> + <div> + <div className="pm-heading"> + <h2>{xide.architectureTitle}</h2> + </div> + <ul className="pm-features"> + {xide.architecture.map((item) => ( + <li key={item}>{item}</li> + ))} + </ul> + </div> + </div> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index de04763..db5826b 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -46,7 +46,9 @@ export default async function RootLayout({ <html lang={locale} data-text-direction={textDirection(locale)} - data-theme="light" + // data-theme belongs to the bootstrap script and the theme control only. + // Rendered here, React would set it back to light whenever the server + // re-renders the layout (a language switch), and the page would flash. suppressHydrationWarning > <head> diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index ade7da8..ca8672e 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -2,11 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 import type { Metadata } from "next"; -import { Fragment } from "react"; import { Footer } from "@/components/Footer"; import { SiteHeader } from "@/components/SiteHeader"; +import { AreaIcon, areaKinds } from "@/components/site/AreaIcon"; +import { getHomeMessages } from "@/lib/home-messages"; import { getLocale } from "@/lib/locale.server"; import { forwardArrow, getMessages } from "@/lib/localization"; +import "./site.css"; export async function generateMetadata(): Promise<Metadata> { const { metadata } = getMessages(await getLocale()); @@ -18,154 +20,135 @@ export async function generateMetadata(): Promise<Metadata> { }; } -const productLinks = [ - { - href: "https://tala.run/", - accent: "violet", - }, - { - href: "https://viget.progmasoft.com/", - accent: "blue", - }, - { - href: "https://github.com/Progmasoft", - accent: "green", - }, -] as const; - +/** + * progmasoft.com. Progmasoft is presented as a pool of technology areas; the + * products have their own catalog on product.progmasoft.com. + */ export default async function Homepage() { const locale = await getLocale(); - const { home } = getMessages(locale); + const { hero, pool, principles, developers } = getHomeMessages(locale); + const arrow = forwardArrow(locale); return ( - <> + <div className="pm-page"> <SiteHeader locale={locale} /> <main> - <section className="hero organization-hero"> - <div className="shell hero-grid"> - <div className="hero-copy"> - <p className="eyebrow">{home.heroEyebrow}</p> + <section className="pm-hero"> + <div className="pm-shell pm-hero-inner"> + <div> + <p className="eyebrow">{hero.eyebrow}</p> <h1> - {home.heroTitleStart} <span>{home.heroTitleAccent}</span> + {hero.titleStart} <span>{hero.titleAccent}</span> </h1> - <p className="hero-lede">{home.heroDescription}</p> - <div className="hero-actions"> - <a className="button" href="#products"> - {home.exploreProducts} + <p className="pm-lede">{hero.description}</p> + <div className="pm-actions"> + <a className="button" href="#technology"> + {hero.explore} </a> <a className="button button-secondary" - href="https://github.com/Progmasoft" + href="https://product.progmasoft.com/" > - {home.browseSource} + {hero.products} {arrow} </a> </div> - <dl className="hero-facts"> - {home.facts.map(([term, description]) => ( - <div key={term}> - <dt>{term}</dt> - <dd>{description}</dd> - </div> - ))} - </dl> </div> - <div className="hero-visual" aria-label={home.visualLabel}> - <div className="system-window"> - <div className="window-bar"> - <span></span> - <span></span> - <span></span> - <code>progmasoft/organization</code> - </div> - <div className="system-stack"> - {home.stack.map(([label, title, description], index) => ( - <Fragment key={label}> - {index > 0 && ( - <div className="stack-arrow" aria-hidden="true"> - ↓ - </div> - )} - <div - className={`stack-row ${["stack-language", "stack-project", "stack-native"][index]}`} - > - <span>{label}</span> - <strong>{title}</strong> - <small>{description}</small> - </div> - </Fragment> - ))} + <div className="pm-pool-visual" aria-label={hero.poolLabel}> + {pool.areas.map(([title], index) => ( + <div className="pm-pool-tile" key={title}> + <span className={`pm-icon pm-icon-${areaKinds[index]}`}> + <AreaIcon kind={areaKinds[index] ?? "languages"} /> + </span> + <strong>{title}</strong> </div> - </div> + ))} </div> </div> </section> - <section className="section" id="products"> - <div className="shell"> - <div className="section-heading"> - <div> - <p className="eyebrow">{home.productsEyebrow}</p> - <h2>{home.productsTitle}</h2> - </div> - <p>{home.productsDescription}</p> + <section className="pm-section" id="technology"> + <div className="pm-shell"> + <div className="pm-heading"> + <p className="eyebrow">{pool.eyebrow}</p> + <h2>{pool.title}</h2> + <p>{pool.description}</p> + </div> + <div className="pm-bento"> + {pool.areas.map(([title, description], index) => ( + <article + className={`pm-card${[0, 3, 4].includes(index) ? " pm-card-wide" : ""}`} + key={title} + > + <span className={`pm-icon pm-icon-${areaKinds[index]}`}> + <AreaIcon kind={areaKinds[index] ?? "languages"} /> + </span> + <h3>{title}</h3> + <p>{description}</p> + </article> + ))} </div> - <div className="product-grid"> - {home.products.map( - ([eyebrow, name, description, action], index) => ( - <article - className={`product-card accent-${productLinks[index]?.accent}`} - key={name} - > - <p className="eyebrow">{eyebrow}</p> - <h3>{name}</h3> - <p>{description}</p> - <a href={productLinks[index]?.href}> - {action} {forwardArrow(locale)} - </a> - </article> - ), - )} + <div className="pm-catalog"> + <p>{pool.catalog}</p> + <a className="pm-link" href="https://product.progmasoft.com/"> + {pool.catalogLink} {arrow} + </a> </div> </div> </section> - <section className="section section-muted" id="principles"> - <div className="shell principles-grid"> - <div className="section-heading vertical"> - <p className="eyebrow">{home.principlesEyebrow}</p> - <h2>{home.principlesTitle}</h2> - <p>{home.principlesDescription}</p> + <section className="pm-section pm-section-muted" id="principles"> + <div className="pm-shell"> + <div className="pm-heading"> + <p className="eyebrow">{principles.eyebrow}</p> + <h2>{principles.title}</h2> </div> - <div className="principle-list"> - {home.principles.map(([title, description], index) => ( + <div className="pm-principles"> + {principles.items.map(([title, description], index) => ( <article key={title}> <span>{String(index + 1).padStart(2, "0")}</span> - <div> - <h3>{title}</h3> - <p>{description}</p> - </div> + <h3>{title}</h3> + <p>{description}</p> </article> ))} </div> </div> </section> - <section className="section callout-section"> - <div className="shell callout"> + <section className="pm-section" id="developers"> + <div className="pm-shell pm-band"> <div> - <p className="eyebrow">{home.accountEyebrow}</p> - <h2>{home.accountTitle}</h2> - <p>{home.accountDescription}</p> + <p className="eyebrow">{developers.eyebrow}</p> + <h2>{developers.title}</h2> + <p>{developers.description}</p> + <div className="pm-actions"> + <a + className="button button-light" + href="https://console.progmasoft.com/" + > + {developers.console} + </a> + <a + className="button button-secondary" + href="https://account.progmasoft.com/" + > + {developers.account} + </a> + </div> </div> - <a - className="button button-light" - href="https://account.progmasoft.com/" - > - {home.openAccount} - </a> + <pre className="pm-code" dir="ltr"> + <code> + <b>GET</b> https://credentials.progmasoft.com + {"\n"} + {" "}/.well-known/openid-configuration + {"\n\n"} + <b>scope</b> openid profile email + {"\n"} + {" "}viget.packages.read + </code> + </pre> </div> </section> </main> <Footer locale={locale} /> - </> + </div> ); } diff --git a/apps/web/app/products/[slug]/page.tsx b/apps/web/app/products/[slug]/page.tsx new file mode 100644 index 0000000..4731eba --- /dev/null +++ b/apps/web/app/products/[slug]/page.tsx @@ -0,0 +1,89 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Metadata } from "next"; +import Link from "next/link"; +import { notFound } from "next/navigation"; +import { Footer } from "@/components/Footer"; +import { SiteHeader } from "@/components/SiteHeader"; +import { getLocale } from "@/lib/locale.server"; +import { forwardArrow } from "@/lib/localization"; +import { getCatalogMessages, isProductSlug, products } from "@/lib/products"; + +interface ProductPageProps { + params: Promise<{ slug: string }>; +} + +export async function generateMetadata({ + params, +}: ProductPageProps): Promise<Metadata> { + const { slug } = await params; + if (!isProductSlug(slug)) { + return {}; + } + const text = getCatalogMessages(await getLocale()).products[slug]; + return { + title: `${products[slug].name} · ${text.category}`, + description: text.description, + alternates: { canonical: `https://product.progmasoft.com/${slug}` }, + }; +} + +/** One product: what it is, what it does, and where it lives. */ +export default async function ProductPage({ params }: ProductPageProps) { + const { slug } = await params; + if (!isProductSlug(slug)) { + notFound(); + } + const locale = await getLocale(); + const catalog = getCatalogMessages(locale); + const product = products[slug]; + const text = catalog.products[slug]; + const arrow = forwardArrow(locale); + return ( + <div className="pm-page"> + <SiteHeader locale={locale} /> + <main> + <section className="pm-hero"> + <div className="pm-shell pm-product-hero"> + <p className="eyebrow">{text.category}</p> + <h1> + {product.name} <span>{text.tagline}</span> + </h1> + <p className="pm-lede">{text.description}</p> + </div> + </section> + <section className="pm-section"> + <div className="pm-shell pm-detail"> + <div> + <div className="pm-heading"> + <h2>{catalog.features}</h2> + </div> + <ul className="pm-features"> + {text.features.map((feature) => ( + <li key={feature}>{feature}</li> + ))} + </ul> + </div> + <aside className="pm-aside"> + <span className={`pm-accent pm-accent-${product.accent}`} /> + <a className="button" href={product.site}> + {catalog.site} {arrow} + </a> + <a className="button button-secondary" href={product.source}> + {catalog.source} + </a> + <span className="pm-note" dir="ltr"> + {product.site.replace(/^https:\/\//, "").replace(/\/$/, "")} + </span> + <Link className="pm-link" href="/"> + {catalog.back} + </Link> + </aside> + </div> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/products/layout.tsx b/apps/web/app/products/layout.tsx new file mode 100644 index 0000000..c57d103 --- /dev/null +++ b/apps/web/app/products/layout.tsx @@ -0,0 +1,11 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { ReactNode } from "react"; +import "../site.css"; + +export default function ProductsLayout({ + children, +}: Readonly<{ children: ReactNode }>) { + return children; +} diff --git a/apps/web/app/products/page.tsx b/apps/web/app/products/page.tsx new file mode 100644 index 0000000..6b160ab --- /dev/null +++ b/apps/web/app/products/page.tsx @@ -0,0 +1,62 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Metadata } from "next"; +import { Footer } from "@/components/Footer"; +import { SiteHeader } from "@/components/SiteHeader"; +import { getLocale } from "@/lib/locale.server"; +import { forwardArrow } from "@/lib/localization"; +import { getCatalogMessages, productSlugs, products } from "@/lib/products"; + +export async function generateMetadata(): Promise<Metadata> { + const catalog = getCatalogMessages(await getLocale()); + return { + title: catalog.metadataTitle, + description: catalog.metadataDescription, + alternates: { canonical: "https://product.progmasoft.com/" }, + }; +} + +/** product.progmasoft.com: every product, each leading to its own page. */ +export default async function ProductsPage() { + const locale = await getLocale(); + const catalog = getCatalogMessages(locale); + return ( + <div className="pm-page"> + <SiteHeader locale={locale} /> + <main> + <section className="pm-hero"> + <div className="pm-shell pm-product-hero"> + <p className="eyebrow">{catalog.eyebrow}</p> + <h1>{catalog.title}</h1> + <p className="pm-lede">{catalog.description}</p> + </div> + </section> + <section className="pm-section"> + <div className="pm-shell pm-product-grid"> + {productSlugs.map((slug) => { + const product = products[slug]; + const text = catalog.products[slug]; + return ( + <a + className="pm-card pm-product-card" + href={`/${slug}`} + key={slug} + > + <span className={`pm-accent pm-accent-${product.accent}`} /> + <span className="pm-tag">{text.category}</span> + <h3>{product.name}</h3> + <p>{text.tagline}</p> + <span className="pm-more"> + {catalog.details} {forwardArrow(locale)} + </span> + </a> + ); + })} + </div> + </section> + </main> + <Footer locale={locale} /> + </div> + ); +} diff --git a/apps/web/app/site.css b/apps/web/app/site.css new file mode 100644 index 0000000..f9b26c7 --- /dev/null +++ b/apps/web/app/site.css @@ -0,0 +1,532 @@ +/* SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> */ +/* SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 */ + +/* progmasoft.com, product.progmasoft.com and the product sites. Static + gradients and borders only: no blur filters and no running animations, so + a theme change repaints in one frame. */ + +.pm-page { + --pm-violet: #6d4fe0; + --pm-teal: #0f9e94; + --pm-orange: #e46c2f; + --pm-glow: rgb(0 120 212 / 14%); + background: var(--surface); +} + +:root[data-theme="dark"] .pm-page { + --pm-violet: #a98bff; + --pm-teal: #4fd1c5; + --pm-orange: #ff9a62; + --pm-glow: rgb(54 159 232 / 18%); +} + +.pm-shell { + width: min(calc(100% - 40px), 1180px); + margin-inline: auto; +} + +/* Hero */ + +.pm-hero { + position: relative; + overflow: hidden; + border-bottom: 1px solid var(--line); + background: + radial-gradient(60% 80% at 85% 10%, rgb(109 79 224 / 14%), transparent 70%), + radial-gradient(50% 70% at 10% 90%, rgb(15 158 148 / 12%), transparent 70%), + radial-gradient(40% 60% at 60% 60%, var(--pm-glow), transparent 70%), + var(--surface); +} + +.pm-hero::before { + position: absolute; + inset: 0; + background-image: + linear-gradient(var(--line) 1px, transparent 1px), + linear-gradient(90deg, var(--line) 1px, transparent 1px); + background-size: 56px 56px; + content: ""; + mask-image: radial-gradient(70% 70% at 50% 40%, black, transparent); + opacity: 0.45; + pointer-events: none; +} + +.pm-hero-inner { + position: relative; + display: grid; + grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); + align-items: center; + gap: 64px; + padding-block: 96px 104px; +} + +.pm-hero h1 { + margin: 0; + font-size: clamp(40px, 5.4vw, 72px); + font-weight: 760; + letter-spacing: -0.05em; + line-height: 0.98; +} + +.pm-hero h1 span { + display: block; + background: linear-gradient( + 100deg, + var(--blue-600), + var(--pm-violet) 55%, + var(--pm-teal) + ); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} + +.pm-lede { + max-width: 620px; + margin: 28px 0 0; + color: var(--ink-650); + font-size: clamp(17px, 1.6vw, 20px); + line-height: 1.6; +} + +.pm-actions { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-top: 36px; +} + +.pm-actions .button { + padding: 13px 24px; + border-radius: 999px; +} + +/* The pool: six tiles that light up the areas. */ + +.pm-pool-visual { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 14px; +} + +.pm-pool-tile { + display: grid; + gap: 10px; + min-height: 108px; + border: 1px solid var(--line); + border-radius: 18px; + padding: 18px; + background: var(--surface); + box-shadow: var(--shadow-sm); +} + +.pm-pool-tile:nth-child(even) { + transform: translateY(22px); +} + +.pm-pool-tile strong { + font-size: 15px; + letter-spacing: -0.01em; +} + +.pm-icon { + width: 40px; + height: 40px; + display: grid; + place-items: center; + border-radius: 12px; + color: white; +} + +.pm-icon-languages { + background: linear-gradient(135deg, var(--pm-violet), var(--blue-600)); +} + +.pm-icon-build { + background: linear-gradient(135deg, var(--pm-orange), #d9468b); +} + +.pm-icon-tools { + background: linear-gradient(135deg, var(--blue-500), var(--pm-teal)); +} + +.pm-icon-quality { + background: linear-gradient(135deg, var(--green-600), var(--pm-teal)); +} + +.pm-icon-identity { + background: linear-gradient(135deg, #3a4a63, var(--blue-600)); +} + +.pm-icon-infrastructure { + background: linear-gradient(135deg, #59606b, #2a2f35); +} + +/* Sections */ + +.pm-section { + padding-block: 112px; +} + +.pm-section-muted { + border-block: 1px solid var(--line); + background: var(--surface-muted); +} + +.pm-heading { + max-width: 760px; + margin-bottom: 56px; +} + +.pm-heading h2 { + margin: 0; + font-size: clamp(32px, 4.2vw, 52px); + font-weight: 740; + letter-spacing: -0.04em; + line-height: 1.05; +} + +.pm-heading p:not(.eyebrow) { + margin: 18px 0 0; + color: var(--ink-650); + font-size: 18px; + line-height: 1.6; +} + +.pm-bento { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 18px; +} + +.pm-card { + position: relative; + display: grid; + align-content: start; + gap: 14px; + border: 1px solid var(--line); + border-radius: 22px; + padding: 28px; + background: var(--surface); + transition: + border-color 160ms ease, + box-shadow 160ms ease, + transform 160ms ease; +} + +.pm-card:hover { + border-color: var(--line-strong); + box-shadow: var(--shadow-md); + transform: translateY(-2px); +} + +.pm-card h3 { + margin: 6px 0 0; + font-size: 21px; + letter-spacing: -0.02em; +} + +.pm-card p { + margin: 0; + color: var(--ink-650); + line-height: 1.6; +} + +.pm-card-wide { + grid-column: span 2; +} + +.pm-catalog { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 16px; + margin-top: 28px; + border: 1px dashed var(--line-strong); + border-radius: 22px; + padding: 22px 28px; +} + +.pm-catalog p { + margin: 0; + font-size: 17px; + font-weight: 600; +} + +.pm-link { + font-weight: 650; +} + +/* Principles */ + +.pm-principles { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 40px; +} + +.pm-principles article { + border-top: 2px solid var(--ink-950); + padding-top: 22px; +} + +.pm-principles span { + display: block; + color: var(--ink-500); + font-family: ui-monospace, SFMono-Regular, Consolas, monospace; + font-size: 14px; +} + +.pm-principles h3 { + margin: 14px 0 10px; + font-size: 22px; + letter-spacing: -0.02em; +} + +.pm-principles p { + margin: 0; + color: var(--ink-650); + line-height: 1.6; +} + +/* The developers band */ + +.pm-band { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); + align-items: center; + gap: 48px; + border-radius: 28px; + padding: 56px; + background: + radial-gradient(60% 90% at 100% 0%, rgb(109 79 224 / 45%), transparent 70%), + radial-gradient(60% 90% at 0% 100%, rgb(0 120 212 / 40%), transparent 70%), + #111722; + color: #f4f6f8; +} + +.pm-band h2 { + margin: 0; + font-size: clamp(30px, 3.6vw, 46px); + letter-spacing: -0.035em; +} + +.pm-band p:not(.eyebrow) { + margin: 16px 0 0; + color: #c8d0da; + font-size: 17px; + line-height: 1.6; +} + +.pm-band .eyebrow { + color: #8fc8ff; +} + +.pm-band .button-secondary { + border-color: rgb(255 255 255 / 30%); + background: transparent; + color: #f4f6f8; +} + +.pm-code { + overflow-x: auto; + margin: 0; + border: 1px solid rgb(255 255 255 / 12%); + border-radius: 16px; + padding: 22px; + background: rgb(0 0 0 / 35%); + color: #dfe7f1; + font-family: ui-monospace, SFMono-Regular, Consolas, monospace; + font-size: 14px; + line-height: 1.7; +} + +.pm-code b { + color: #8fc8ff; + font-weight: 600; +} + +/* Product pages */ + +.pm-product-hero { + padding-block: 80px 72px; +} + +.pm-product-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); + gap: 18px; +} + +.pm-product-card { + text-decoration: none; + color: inherit; +} + +.pm-product-card:hover { + text-decoration: none; +} + +.pm-product-card .pm-more { + margin-top: 6px; + color: var(--blue-600); + font-weight: 650; +} + +.pm-tag { + justify-self: start; + border-radius: 999px; + padding: 4px 12px; + background: var(--surface-muted); + color: var(--ink-650); + font-size: 13px; + font-weight: 600; +} + +.pm-accent { + height: 4px; + border-radius: 999px; +} + +.pm-accent-violet { + background: linear-gradient(90deg, var(--pm-violet), var(--blue-500)); +} + +.pm-accent-blue { + background: linear-gradient(90deg, var(--blue-600), var(--pm-teal)); +} + +.pm-accent-teal { + background: linear-gradient(90deg, var(--pm-teal), var(--green-600)); +} + +.pm-accent-green { + background: linear-gradient(90deg, var(--green-600), var(--pm-teal)); +} + +.pm-accent-orange { + background: linear-gradient(90deg, var(--pm-orange), #d9468b); +} + +.pm-accent-slate { + background: linear-gradient(90deg, #59606b, var(--blue-600)); +} + +.pm-detail { + display: grid; + grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); + gap: 48px; + align-items: start; +} + +.pm-features { + display: grid; + gap: 12px; + margin: 0; + padding: 0; + list-style: none; +} + +.pm-features li { + display: flex; + gap: 12px; + border: 1px solid var(--line); + border-radius: 14px; + padding: 14px 16px; + background: var(--surface); +} + +.pm-features li::before { + flex: none; + width: 20px; + height: 20px; + display: grid; + place-items: center; + margin-top: 2px; + border-radius: 50%; + background: var(--blue-100); + color: var(--blue-600); + content: "✓"; + font-size: 12px; + font-weight: 800; +} + +.pm-aside { + display: grid; + gap: 12px; + border: 1px solid var(--line); + border-radius: 22px; + padding: 26px; + background: var(--surface-muted); +} + +.pm-aside .button { + text-align: center; +} + +.pm-note { + color: var(--ink-650); + font-size: 14px; +} + +.pm-code-light { + border-color: var(--line); + background: #111722; + font-size: 13px; +} + +.pm-roadmap { + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); +} + +.pm-roadmap li::before { + background: var(--surface-muted); + color: var(--ink-500); + content: "→"; +} + +@media (max-width: 960px) { + .pm-hero-inner, + .pm-band, + .pm-detail { + grid-template-columns: 1fr; + } + + .pm-bento, + .pm-principles { + grid-template-columns: 1fr; + } + + .pm-card-wide { + grid-column: auto; + } + + .pm-band { + padding: 36px 26px; + } + + .pm-section { + padding-block: 80px; + } +} + +@media (max-width: 560px) { + .pm-pool-visual { + grid-template-columns: 1fr; + } + + .pm-pool-tile:nth-child(even) { + transform: none; + } +} + +@media (prefers-reduced-motion: reduce) { + .pm-card { + transition: none; + } + + .pm-card:hover { + transform: none; + } +} diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsx index 1551fae..d7f72e8 100644 --- a/apps/web/components/Footer.tsx +++ b/apps/web/components/Footer.tsx @@ -2,10 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 import { Brand } from "./Brand"; +import { getHomeMessages } from "@/lib/home-messages"; import { getMessages, type Locale } from "@/lib/localization"; +import { getCatalogMessages } from "@/lib/products"; export function Footer({ locale }: { locale: Locale }) { const { footer } = getMessages(locale); + const site = getHomeMessages(locale).navigation; + const catalog = getCatalogMessages(locale); return ( <footer className="site-footer"> <div className="shell footer-grid"> @@ -15,8 +19,8 @@ export function Footer({ locale }: { locale: Locale }) { </div> <div> <strong>{footer.products}</strong> - <a href="https://tala.run/">Tala</a> - <a href="https://viget.progmasoft.com/">ViGet</a> + <a href="https://product.progmasoft.com/">{catalog.back}</a> + <a href="https://console.progmasoft.com/">{site.developers}</a> <a href="https://github.com/Progmasoft">{footer.openSource}</a> </div> <div> diff --git a/apps/web/components/PreferenceControls.tsx b/apps/web/components/PreferenceControls.tsx index c4f5690..9296b77 100644 --- a/apps/web/components/PreferenceControls.tsx +++ b/apps/web/components/PreferenceControls.tsx @@ -32,6 +32,25 @@ function readTheme(): Theme { : "light"; } +/** + * Applies a theme to the document at once, in the click that chose it. + * + * Transitions are switched off for the two frames of the change: otherwise + * every button and link would animate its colours while the page around it + * has already changed, which looks like flicker. + */ +function applyTheme(theme: Theme) { + const root = document.documentElement; + root.classList.add("theme-switching"); + root.dataset.theme = theme; + root.style.colorScheme = theme; + window.requestAnimationFrame(() => + window.requestAnimationFrame(() => + root.classList.remove("theme-switching"), + ), + ); +} + function subscribeTheme(onStoreChange: () => void) { window.addEventListener("storage", onStoreChange); window.addEventListener(themeEvent, onStoreChange); @@ -45,16 +64,23 @@ export function PreferenceControls({ locale, labels, }: PreferenceControlsProps) { - const theme = useSyncExternalStore(subscribeTheme, readTheme, () => "light"); + const theme = useSyncExternalStore<Theme>( + subscribeTheme, + readTheme, + () => "light", + ); const [switchingLocale, startLocaleSwitch] = useTransition(); + // Another tab, or another control on this page, changed the theme. useEffect(() => { - document.documentElement.dataset.theme = theme; - document.documentElement.style.colorScheme = theme; + if (document.documentElement.dataset.theme !== theme) { + applyTheme(theme); + } }, [theme]); function toggleTheme() { const selected: Theme = theme === "light" ? "dark" : "light"; + applyTheme(selected); window.localStorage.setItem("progmasoft_theme", selected); window.dispatchEvent(new Event(themeEvent)); } diff --git a/apps/web/components/SiteHeader.tsx b/apps/web/components/SiteHeader.tsx index 7ca6e8e..23187e5 100644 --- a/apps/web/components/SiteHeader.tsx +++ b/apps/web/components/SiteHeader.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 import Link from "next/link"; +import { getHomeMessages } from "@/lib/home-messages"; import { getMessages, type Locale } from "@/lib/localization"; import { Brand } from "./Brand"; import { PreferenceControls } from "./PreferenceControls"; @@ -18,6 +19,7 @@ export function SiteHeader({ signedInName, }: SiteHeaderProps) { const { navigation } = getMessages(locale); + const site = getHomeMessages(locale).navigation; return ( <header className="site-header"> <div className="shell header-inner"> @@ -46,8 +48,9 @@ export function SiteHeader({ </> ) : ( <> - <a href="#products">{navigation.products}</a> - <a href="#principles">{navigation.principles}</a> + <a href="https://progmasoft.com/#technology">{site.technology}</a> + <a href="https://product.progmasoft.com/">{site.products}</a> + <a href="https://console.progmasoft.com/">{site.developers}</a> <a href="https://github.com/Progmasoft">GitHub</a> <Link className="button button-small" diff --git a/apps/web/components/site/AreaIcon.tsx b/apps/web/components/site/AreaIcon.tsx new file mode 100644 index 0000000..2a1f594 --- /dev/null +++ b/apps/web/components/site/AreaIcon.tsx @@ -0,0 +1,49 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +/** The areas of the Progmasoft technology pool, in the order the home page lists them. */ +export const areaKinds = [ + "languages", + "build", + "tools", + "quality", + "identity", + "infrastructure", +] as const; +export type AreaKind = (typeof areaKinds)[number]; + +const paths: Record<AreaKind, string> = { + // Angle brackets around a slash: source code. + languages: "M8 7 3 12l5 5M16 7l5 5-5 5M14 4l-4 16", + // Stacked boxes: packages. + build: "M4 8l8-4 8 4-8 4-8-4Zm0 0v8l8 4 8-4V8M12 12v8", + // A wrench. + tools: + "M14.5 4.5a4 4 0 0 0-5 5L4 15l5 5 5.5-5.5a4 4 0 0 0 5-5l-2.5 2.5-3-.5-.5-3 3-3Z", + // A check inside a shield. + quality: "M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3Zm-3 9 2 2 4-4", + // A key. + identity: "M15 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-1 3 7 7m-3-3 2-2m-4 0 2-2", + // Three stacked servers. + infrastructure: + "M4 4h16v5H4V4Zm0 6h16v5H4v-5Zm0 6h16v4H4v-4ZM7 6.5h.01M7 12.5h.01M7 18h.01", +}; + +/** A line icon for an area of the technology pool. */ +export function AreaIcon({ kind }: { kind: AreaKind }) { + return ( + <svg + viewBox="0 0 24 24" + width="24" + height="24" + fill="none" + stroke="currentColor" + strokeWidth="1.7" + strokeLinecap="round" + strokeLinejoin="round" + aria-hidden="true" + > + <path d={paths[kind]} /> + </svg> + ); +} diff --git a/apps/web/lib/home-messages.ts b/apps/web/lib/home-messages.ts new file mode 100644 index 0000000..d0f2734 --- /dev/null +++ b/apps/web/lib/home-messages.ts @@ -0,0 +1,358 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Locale } from "./localization"; + +/** + * The text of progmasoft.com. The page describes Progmasoft as a pool of + * technology areas, not as a list of products: the products have their own + * catalog on product.progmasoft.com. + */ +interface HomeMessages { + navigation: { + technology: string; + products: string; + developers: string; + }; + hero: { + eyebrow: string; + titleStart: string; + titleAccent: string; + description: string; + explore: string; + products: string; + poolLabel: string; + }; + pool: { + eyebrow: string; + title: string; + description: string; + areas: [title: string, description: string][]; + catalog: string; + catalogLink: string; + }; + principles: { + eyebrow: string; + title: string; + items: [title: string, description: string][]; + }; + developers: { + eyebrow: string; + title: string; + description: string; + console: string; + account: string; + }; +} + +export const homeMessages: Record<Locale, HomeMessages> = { + "en-US": { + navigation: { + technology: "Technology", + products: "Products", + developers: "Developers", + }, + hero: { + eyebrow: "Progmasoft", + titleStart: "Technology built to", + titleAccent: "last and to explain itself.", + description: + "Progmasoft designs languages, compilers, build systems, developer tools and the services around them. Everything shares one discipline: explicit contracts, real verification and names that mean what they say.", + explore: "Explore the technology", + products: "See the products", + poolLabel: "Areas of the Progmasoft technology pool", + }, + pool: { + eyebrow: "Technology pool", + title: "Areas, not just products.", + description: + "Products come and grow; the technology underneath them is what we keep building. Each area is shared by everything Progmasoft makes.", + areas: [ + [ + "Languages and compilers", + "Language design, type systems, intermediate representations and native code generation.", + ], + [ + "Build and packages", + "Reproducible builds, dependency resolution, lockfiles and a package registry.", + ], + [ + "Developer tools", + "Formatters, linters, language servers and integrated development environments.", + ], + [ + "Quality and testing", + "Property-based, stateful and mutation testing, coverage and test selection.", + ], + [ + "Identity and access", + "Progmasoft accounts, OAuth 2.1 and OpenID Connect for every application.", + ], + [ + "Infrastructure", + "Services Progmasoft operates itself: hosting, mail, registries and continuous integration.", + ], + ], + catalog: "Looking for a specific product?", + catalogLink: "Open the product catalog", + }, + principles: { + eyebrow: "How we build", + title: "Engineering that stays legible.", + items: [ + [ + "Explicit contracts", + "Typed boundaries make ownership, compatibility and failure behaviour visible.", + ], + [ + "Real verification", + "Tests exercise installed artifacts, production-shaped paths and observable behaviour.", + ], + [ + "Durable names", + "Public vocabulary follows the model, not the history of an implementation.", + ], + ], + }, + developers: { + eyebrow: "For developers", + title: "Build on Progmasoft.", + description: + "Sign people in with their Progmasoft account through OAuth 2.1, and manage the tokens of your applications in the Progmasoft Console.", + console: "Open the Console", + account: "Progmasoft account", + }, + }, + "de-DE": { + navigation: { + technology: "Technologie", + products: "Produkte", + developers: "Entwickler", + }, + hero: { + eyebrow: "Progmasoft", + titleStart: "Technologie, gebaut um", + titleAccent: "zu bleiben und sich zu erklären.", + description: + "Progmasoft entwirft Sprachen, Compiler, Build-Systeme, Entwicklerwerkzeuge und die Dienste um sie herum. Alles folgt einer Disziplin: explizite Verträge, echte Prüfung und Namen, die sagen, was sie meinen.", + explore: "Technologie entdecken", + products: "Zu den Produkten", + poolLabel: "Bereiche des Progmasoft-Technologiepools", + }, + pool: { + eyebrow: "Technologiepool", + title: "Bereiche, nicht nur Produkte.", + description: + "Produkte entstehen und wachsen; die Technologie darunter bauen wir dauerhaft weiter. Jeder Bereich trägt alles, was Progmasoft macht.", + areas: [ + [ + "Sprachen und Compiler", + "Sprachentwurf, Typsysteme, Zwischendarstellungen und native Codeerzeugung.", + ], + [ + "Build und Pakete", + "Reproduzierbare Builds, Abhängigkeitsauflösung, Lockfiles und eine Paketregistrierung.", + ], + [ + "Entwicklerwerkzeuge", + "Formatierer, Linter, Language Server und integrierte Entwicklungsumgebungen.", + ], + [ + "Qualität und Tests", + "Eigenschaftsbasierte, zustandsbehaftete und Mutationstests, Abdeckung und Testauswahl.", + ], + [ + "Identität und Zugriff", + "Progmasoft-Konten, OAuth 2.1 und OpenID Connect für jede Anwendung.", + ], + [ + "Infrastruktur", + "Dienste, die Progmasoft selbst betreibt: Hosting, Mail, Registrierungen und kontinuierliche Integration.", + ], + ], + catalog: "Suchen Sie ein bestimmtes Produkt?", + catalogLink: "Produktkatalog öffnen", + }, + principles: { + eyebrow: "Wie wir bauen", + title: "Technik, die lesbar bleibt.", + items: [ + [ + "Explizite Verträge", + "Typisierte Grenzen machen Zuständigkeit, Kompatibilität und Fehlerverhalten sichtbar.", + ], + [ + "Echte Prüfung", + "Tests prüfen installierte Artefakte, produktionsnahe Wege und beobachtbares Verhalten.", + ], + [ + "Beständige Namen", + "Das öffentliche Vokabular folgt dem Modell, nicht der Geschichte einer Implementierung.", + ], + ], + }, + developers: { + eyebrow: "Für Entwickler", + title: "Mit Progmasoft entwickeln.", + description: + "Melden Sie Menschen mit ihrem Progmasoft-Konto über OAuth 2.1 an und verwalten Sie die Tokens Ihrer Anwendungen in der Progmasoft Console.", + console: "Console öffnen", + account: "Progmasoft-Konto", + }, + }, + "ru-RU": { + navigation: { + technology: "Технологии", + products: "Продукты", + developers: "Разработчикам", + }, + hero: { + eyebrow: "Progmasoft", + titleStart: "Технологии, созданные,", + titleAccent: "чтобы служить долго и быть понятными.", + description: + "Progmasoft создаёт языки, компиляторы, системы сборки, инструменты разработчика и сервисы вокруг них. Всё подчиняется одной дисциплине: явные контракты, настоящая проверка и имена, которые значат то, что говорят.", + explore: "Изучить технологии", + products: "Перейти к продуктам", + poolLabel: "Направления технологического пула Progmasoft", + }, + pool: { + eyebrow: "Технологический пул", + title: "Направления, а не только продукты.", + description: + "Продукты появляются и растут; технологии под ними мы развиваем постоянно. Каждое направление служит всему, что делает Progmasoft.", + areas: [ + [ + "Языки и компиляторы", + "Проектирование языков, системы типов, промежуточные представления и генерация машинного кода.", + ], + [ + "Сборка и пакеты", + "Воспроизводимые сборки, разрешение зависимостей, lock-файлы и реестр пакетов.", + ], + [ + "Инструменты разработчика", + "Форматировщики, линтеры, языковые серверы и интегрированные среды разработки.", + ], + [ + "Качество и тестирование", + "Тестирование на основе свойств, с состоянием и мутационное, покрытие и выбор тестов.", + ], + [ + "Идентификация и доступ", + "Аккаунты Progmasoft, OAuth 2.1 и OpenID Connect для любого приложения.", + ], + [ + "Инфраструктура", + "Сервисы, которыми Progmasoft управляет сам: хостинг, почта, реестры и непрерывная интеграция.", + ], + ], + catalog: "Ищете конкретный продукт?", + catalogLink: "Открыть каталог продуктов", + }, + principles: { + eyebrow: "Как мы работаем", + title: "Инженерия, которая остаётся понятной.", + items: [ + [ + "Явные контракты", + "Типизированные границы делают видимыми ответственность, совместимость и поведение при ошибках.", + ], + [ + "Настоящая проверка", + "Тесты проверяют установленные артефакты, пути как в продакшене и наблюдаемое поведение.", + ], + [ + "Устойчивые имена", + "Публичный словарь следует модели, а не истории реализации.", + ], + ], + }, + developers: { + eyebrow: "Разработчикам", + title: "Разрабатывайте на Progmasoft.", + description: + "Позвольте людям входить с аккаунтом Progmasoft через OAuth 2.1 и управляйте токенами своих приложений в Progmasoft Console.", + console: "Открыть Console", + account: "Аккаунт Progmasoft", + }, + }, + "he-IL": { + navigation: { + technology: "טכנולוגיה", + products: "מוצרים", + developers: "מפתחים", + }, + hero: { + eyebrow: "Progmasoft", + titleStart: "טכנולוגיה שנבנתה", + titleAccent: "כדי להחזיק מעמד ולהסביר את עצמה.", + description: + "Progmasoft מתכננת שפות, מהדרים, מערכות בנייה, כלי פיתוח והשירותים שסביבם. הכול נשען על משמעת אחת: חוזים מפורשים, אימות אמיתי ושמות שאומרים את מה שהם מתכוונים.", + explore: "לגלות את הטכנולוגיה", + products: "למוצרים", + poolLabel: "התחומים במאגר הטכנולוגיה של Progmasoft", + }, + pool: { + eyebrow: "מאגר טכנולוגיה", + title: "תחומים, לא רק מוצרים.", + description: + "מוצרים נולדים וגדלים; הטכנולוגיה שמתחתיהם היא מה שאנחנו ממשיכים לבנות. כל תחום משרת את כל מה ש־Progmasoft עושה.", + areas: [ + [ + "שפות ומהדרים", + "תכנון שפות, מערכות טיפוסים, ייצוגי ביניים ויצירת קוד מכונה.", + ], + [ + "בנייה וחבילות", + "בנייה שחוזרת על עצמה, פתרון תלויות, קובצי נעילה ומאגר חבילות.", + ], + ["כלי פיתוח", "מעצבי קוד, לינטרים, שרתי שפה וסביבות פיתוח משולבות."], + [ + "איכות ובדיקות", + "בדיקות מבוססות תכונות, בדיקות עם מצב ובדיקות מוטציה, כיסוי ובחירת בדיקות.", + ], + [ + "זהות וגישה", + "חשבונות Progmasoft, OAuth 2.1 ו־OpenID Connect לכל אפליקציה.", + ], + [ + "תשתית", + "שירותים ש־Progmasoft מפעילה בעצמה: אירוח, דואר, מאגרים ואינטגרציה רציפה.", + ], + ], + catalog: "מחפשים מוצר מסוים?", + catalogLink: "לקטלוג המוצרים", + }, + principles: { + eyebrow: "איך אנחנו בונים", + title: "הנדסה שנשארת קריאה.", + items: [ + [ + "חוזים מפורשים", + "גבולות עם טיפוסים חושפים בעלות, תאימות והתנהגות בכשל.", + ], + [ + "אימות אמיתי", + "הבדיקות מפעילות תוצרים מותקנים, נתיבים כמו בייצור והתנהגות נצפית.", + ], + [ + "שמות עמידים", + "אוצר המילים הציבורי הולך אחרי המודל, לא אחרי ההיסטוריה של מימוש.", + ], + ], + }, + developers: { + eyebrow: "למפתחים", + title: "לבנות על Progmasoft.", + description: + "אפשרו לאנשים להיכנס עם חשבון Progmasoft דרך OAuth 2.1, ונהלו את אסימוני האפליקציות שלכם ב־Progmasoft Console.", + console: "לפתוח את ה־Console", + account: "חשבון Progmasoft", + }, + }, +}; + +export function getHomeMessages(locale: Locale): HomeMessages { + return homeMessages[locale]; +} diff --git a/apps/web/lib/localization.ts b/apps/web/lib/localization.ts index aeeb5a7..13b65ec 100644 --- a/apps/web/lib/localization.ts +++ b/apps/web/lib/localization.ts @@ -171,85 +171,6 @@ export const messages = { websiteSource: "Website source", closing: "Designed for clarity, security, and long-term maintenance.", }, - home: { - heroEyebrow: "Developer systems by Progmasoft", - heroTitleStart: "Tools should make hard work", - heroTitleAccent: "understandable.", - heroDescription: - "We build programming-language infrastructure, package systems, and developer tools around explicit contracts instead of accidental complexity.", - exploreProducts: "Explore products", - browseSource: "Browse source", - facts: [ - ["Open", "Public engineering"], - ["Typed", "Contracts before shortcuts"], - ["Native", "Performance without mystery"], - ], - visualLabel: "Progmasoft product principles", - stack: [ - [ - "Products", - "Focused experiences", - "Clear purpose · durable names · public identity", - ], - [ - "Platform", - "Shared account foundation", - "Authentication · service access · recovery", - ], - [ - "Operations", - "First-party infrastructure", - "Observable · maintainable · directly operated", - ], - ], - productsEyebrow: "Products and projects", - productsTitle: "One ecosystem, clear boundaries.", - productsDescription: - "Each surface has one responsibility and a documented contract with the next layer.", - products: [ - [ - "Programming language", - "Tala", - "A modern programming language developed by Progmasoft, with its own dedicated product and documentation site.", - "Explore Tala", - ], - [ - "Package registry", - "ViGet", - "The canonical package and DSL-plugin registry for the Tala ecosystem, operated directly by Progmasoft.", - "Open ViGet", - ], - [ - "Developer tooling", - "Open engineering", - "Compiler, formatter, linter, analyzer, project-system, and editor work developed in public repositories.", - "View on GitHub", - ], - ], - principlesEyebrow: "Engineering principles", - principlesTitle: "Built to remain legible.", - principlesDescription: - "Architecture is useful only when a new contributor can understand where a decision belongs and how to verify it.", - principles: [ - [ - "Explicit contracts", - "Typed boundaries make ownership, compatibility, and failure behavior visible.", - ], - [ - "Real verification", - "Tests exercise installed artifacts, production-shaped paths, and observable behavior.", - ], - [ - "Durable naming", - "Public vocabulary follows the product model rather than historical implementation accidents.", - ], - ], - accountEyebrow: "Progmasoft account", - accountTitle: "A single identity for Progmasoft services.", - accountDescription: - "Manage your profile and future service access from the dedicated account surface.", - openAccount: "Open account", - }, account: { securityLabel: "Account security properties", trust: [ @@ -502,85 +423,6 @@ export const messages = { closing: "Entwickelt für Klarheit, Sicherheit und langfristige Wartbarkeit.", }, - home: { - heroEyebrow: "Entwicklersysteme von Progmasoft", - heroTitleStart: "Werkzeuge sollen schwierige Arbeit", - heroTitleAccent: "verständlich machen.", - heroDescription: - "Wir entwickeln Programmiersprachen-Infrastruktur, Paketsysteme und Entwicklerwerkzeuge rund um eindeutige Verträge statt zufälliger Komplexität.", - exploreProducts: "Produkte entdecken", - browseSource: "Quellcode ansehen", - facts: [ - ["Offen", "Öffentliche Entwicklung"], - ["Typisiert", "Verträge vor Abkürzungen"], - ["Nativ", "Leistung ohne Rätsel"], - ], - visualLabel: "Produktgrundsätze von Progmasoft", - stack: [ - [ - "Produkte", - "Fokussierte Erlebnisse", - "Klarer Zweck · beständige Namen · öffentliche Identität", - ], - [ - "Plattform", - "Gemeinsame Kontobasis", - "Authentifizierung · Dienstzugriff · Wiederherstellung", - ], - [ - "Betrieb", - "Eigene Infrastruktur", - "Beobachtbar · wartbar · direkt betrieben", - ], - ], - productsEyebrow: "Produkte und Projekte", - productsTitle: "Ein Ökosystem, klare Grenzen.", - productsDescription: - "Jede Oberfläche hat eine Aufgabe und einen dokumentierten Vertrag mit der nächsten Schicht.", - products: [ - [ - "Programmiersprache", - "Tala", - "Eine moderne, von Progmasoft entwickelte Programmiersprache mit eigener Produkt- und Dokumentationsseite.", - "Tala entdecken", - ], - [ - "Paketregistrierung", - "ViGet", - "Die offizielle Paket- und DSL-Plugin-Registrierung für das Tala-Ökosystem, direkt von Progmasoft betrieben.", - "ViGet öffnen", - ], - [ - "Entwicklerwerkzeuge", - "Offene Entwicklung", - "Compiler, Formatter, Linter, Analyzer, Projektsystem und Editor werden in öffentlichen Repositorys entwickelt.", - "Auf GitHub ansehen", - ], - ], - principlesEyebrow: "Entwicklungsgrundsätze", - principlesTitle: "Auf dauerhafte Verständlichkeit ausgelegt.", - principlesDescription: - "Architektur ist nur dann nützlich, wenn neue Mitwirkende erkennen, wohin eine Entscheidung gehört und wie sie geprüft wird.", - principles: [ - [ - "Eindeutige Verträge", - "Typisierte Grenzen machen Zuständigkeit, Kompatibilität und Fehlerverhalten sichtbar.", - ], - [ - "Echte Verifikation", - "Tests prüfen installierte Artefakte, produktionsnahe Pfade und beobachtbares Verhalten.", - ], - [ - "Beständige Benennung", - "Öffentliche Begriffe folgen dem Produktmodell statt historischen Implementierungszufällen.", - ], - ], - accountEyebrow: "Progmasoft-Konto", - accountTitle: "Eine Identität für Progmasoft-Dienste.", - accountDescription: - "Verwalten Sie Ihr Profil und künftige Dienstzugriffe in der dafür vorgesehenen Kontooberfläche.", - openAccount: "Konto öffnen", - }, account: { securityLabel: "Sicherheitsmerkmale des Kontos", trust: [ @@ -836,85 +678,6 @@ export const messages = { closing: "Создано ради ясности, безопасности и долгосрочного сопровождения.", }, - home: { - heroEyebrow: "Системы для разработчиков от Progmasoft", - heroTitleStart: "Инструменты должны делать сложную работу", - heroTitleAccent: "понятной.", - heroDescription: - "Мы создаём инфраструктуру языков программирования, системы пакетов и инструменты разработчика на основе явных контрактов, а не случайной сложности.", - exploreProducts: "Обзор продуктов", - browseSource: "Исходный код", - facts: [ - ["Открыто", "Публичная разработка"], - ["Типизировано", "Контракты важнее обходных путей"], - ["Нативно", "Производительность без загадок"], - ], - visualLabel: "Принципы продуктов Progmasoft", - stack: [ - [ - "Продукты", - "Сфокусированные решения", - "Ясное назначение · устойчивые имена · публичная идентичность", - ], - [ - "Платформа", - "Общая основа аккаунтов", - "Аутентификация · доступ к сервисам · восстановление", - ], - [ - "Эксплуатация", - "Собственная инфраструктура", - "Наблюдаемая · сопровождаемая · под нашим прямым управлением", - ], - ], - productsEyebrow: "Продукты и проекты", - productsTitle: "Одна экосистема, чёткие границы.", - productsDescription: - "У каждой части одна зона ответственности и документированный контракт со следующим уровнем.", - products: [ - [ - "Язык программирования", - "Tala", - "Современный язык программирования, разрабатываемый Progmasoft, с собственным сайтом продукта и документации.", - "Подробнее о Tala", - ], - [ - "Реестр пакетов", - "ViGet", - "Канонический реестр пакетов и DSL-плагинов экосистемы Tala, которым напрямую управляет Progmasoft.", - "Открыть ViGet", - ], - [ - "Инструменты разработчика", - "Открытая разработка", - "Компилятор, форматтер, линтер, анализатор, система проектов и редактор разрабатываются в публичных репозиториях.", - "Смотреть на GitHub", - ], - ], - principlesEyebrow: "Инженерные принципы", - principlesTitle: "Создано, чтобы оставаться понятным.", - principlesDescription: - "Архитектура полезна только тогда, когда новый участник может понять, к чему относится решение и как его проверить.", - principles: [ - [ - "Явные контракты", - "Типизированные границы делают видимыми ответственность, совместимость и поведение при сбоях.", - ], - [ - "Настоящая проверка", - "Тесты проверяют установленные артефакты, пути, близкие к рабочим, и наблюдаемое поведение.", - ], - [ - "Устойчивые имена", - "Публичная терминология следует модели продукта, а не историческим случайностям реализации.", - ], - ], - accountEyebrow: "Аккаунт Progmasoft", - accountTitle: "Единая учётная запись для сервисов Progmasoft.", - accountDescription: - "Управляйте профилем и будущим доступом к сервисам на отдельном сайте аккаунта.", - openAccount: "Открыть аккаунт", - }, account: { securityLabel: "Свойства безопасности аккаунта", trust: [ @@ -1167,76 +930,6 @@ export const messages = { websiteSource: "קוד המקור של האתר", closing: "מתוכנן לבהירות, לאבטחה ולתחזוקה ארוכת טווח.", }, - home: { - heroEyebrow: "מערכות למפתחים מבית Progmasoft", - heroTitleStart: "כלים צריכים להפוך עבודה קשה", - heroTitleAccent: "למובנת.", - heroDescription: - "אנחנו בונים תשתית לשפות תכנות, מערכות חבילות וכלי פיתוח סביב חוזים מפורשים במקום מורכבות מקרית.", - exploreProducts: "למוצרים", - browseSource: "לעיון בקוד המקור", - facts: [ - ["פתוח", "הנדסה גלויה לציבור"], - ["מבוסס טיפוסים", "חוזים לפני קיצורי דרך"], - ["קוד מכונה", "ביצועים בלי מסתורין"], - ], - visualLabel: "עקרונות המוצר של Progmasoft", - stack: [ - ["מוצרים", "חוויות ממוקדות", "מטרה ברורה · שמות יציבים · זהות ציבורית"], - ["פלטפורמה", "בסיס חשבון משותף", "אימות · גישה לשירותים · שחזור"], - [ - "תפעול", - "תשתית בבעלותנו", - "ניתנת לניטור · ניתנת לתחזוקה · בהפעלה ישירה", - ], - ], - productsEyebrow: "מוצרים ופרויקטים", - productsTitle: "אקוסיסטם אחד, גבולות ברורים.", - productsDescription: "לכל רכיב יש אחריות אחת וחוזה מתועד מול השכבה הבאה.", - products: [ - [ - "שפת תכנות", - "Tala", - "שפת תכנות מודרנית שמפתחת Progmasoft, עם אתר מוצר ותיעוד ייעודי משלה.", - "להכיר את Tala", - ], - [ - "מאגר חבילות", - "ViGet", - "המאגר הרשמי של חבילות ותוספי DSL לאקוסיסטם של Tala, בהפעלה ישירה של Progmasoft.", - "לפתיחת ViGet", - ], - [ - "כלי פיתוח", - "הנדסה פתוחה", - "מהדר, מעצב קוד, linter, מנתח, מערכת פרויקטים ועורך, המפותחים במאגרים ציבוריים.", - "לצפייה ב-GitHub", - ], - ], - principlesEyebrow: "עקרונות הנדסיים", - principlesTitle: "בנוי כדי להישאר קריא.", - principlesDescription: - "ארכיטקטורה מועילה רק כאשר תורם חדש יכול להבין לאן שייכת החלטה וכיצד לאמת אותה.", - principles: [ - [ - "חוזים מפורשים", - "גבולות מבוססי טיפוסים חושפים בעלות, תאימות והתנהגות בעת כשל.", - ], - [ - "אימות אמיתי", - "הבדיקות מפעילות תוצרים מותקנים, נתיבים דמויי סביבת ייצור והתנהגות נצפית.", - ], - [ - "שמות יציבים", - "אוצר המילים הציבורי נגזר ממודל המוצר ולא משאריות היסטוריות של המימוש.", - ], - ], - accountEyebrow: "חשבון Progmasoft", - accountTitle: "זהות אחת לשירותי Progmasoft.", - accountDescription: - "ניהול הפרופיל והגישה העתידית לשירותים מאזור החשבון הייעודי.", - openAccount: "לחשבון", - }, account: { securityLabel: "מאפייני האבטחה של החשבון", trust: [ diff --git a/apps/web/lib/product-sites.ts b/apps/web/lib/product-sites.ts new file mode 100644 index 0000000..f88ecda --- /dev/null +++ b/apps/web/lib/product-sites.ts @@ -0,0 +1,412 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Locale } from "./localization"; + +/** + * The text of the product sites Progmaweb serves itself: ides.progmasoft.com + * (with Xide at /xide) and catch3.progmasoft.com. The facts follow the + * READMEs and documentation of the product repositories. + */ +interface SitesMessages { + common: { + source: string; + productPage: string; + status: string; + }; + ides: { + title: string; + description: string; + open: string; + }; + xide: { + eyebrow: string; + tagline: string; + description: string; + status: string; + layoutTitle: string; + layout: [title: string, description: string][]; + languagesTitle: string; + languagesDescription: string; + architectureTitle: string; + architecture: string[]; + }; + catch3: { + eyebrow: string; + tagline: string; + description: string; + disclaimer: string; + exampleTitle: string; + featuresTitle: string; + features: [title: string, description: string][]; + roadmapTitle: string; + roadmap: string[]; + }; +} + +export const sitesMessages: Record<Locale, SitesMessages> = { + "en-US": { + common: { + source: "Source code", + productPage: "Product page", + status: "Status", + }, + ides: { + title: "Progmasoft IDEs", + description: + "Development environments by Progmasoft, built around the Tala tools and the languages next to them.", + open: "Open", + }, + xide: { + eyebrow: "Progmasoft IDEs", + tagline: "The planned IDE for Tala.", + description: + "Xide is an integrated development environment written in Kotlin with Compose Multiplatform. It brings the editor, the project and the Tala compiler's diagnostics into one window.", + status: + "Early work: Xide is not ready for daily use. Today it lays the foundation that keeps the architecture coherent.", + layoutTitle: "A familiar layout", + layout: [ + [ + "Project", + "Open a folder as a tree; directories load one level at a time and symbolic links are never followed.", + ], + [ + "Editor", + "A tab per document, line numbers, a marker on each line with a problem, and no silent closing of modified files.", + ], + [ + "Problems", + "Diagnostics bound to the exact document version that was checked; results that went stale are dropped.", + ], + ], + languagesTitle: "Languages", + languagesDescription: + "Tala, Kotlin, Java, Groovy and Python open, edit and save, with syntax colouring for all five. Checking is connected for Tala: Xide runs talac and reads its structured diagnostics instead of scraping terminal text.", + architectureTitle: "Architecture", + architecture: [ + "Kotlin/JVM components with a Compose Multiplatform desktop interface", + "A minimized Java runtime ships with Xide; no separate JDK to install", + "Extensions are Kotlin/JVM JARs loaded from the extension directory", + ], + }, + catch3: { + eyebrow: "Progmasoft Catch3", + tagline: "C++ testing beyond assertions.", + description: + "Catch3 keeps the expressive test-writing model of Catch2 and adds a C++20 library of its own: native property testing, snapshots and structured results.", + disclaimer: + "Catch3 is independently maintained. It is not an official Catch2 release and is not endorsed by Catch2's maintainers.", + exampleTitle: "A first property", + featuresTitle: "What Catch3 adds", + features: [ + [ + "Familiar tests", + "Assertions, sections, reporters, benchmarks and the command line keep working through the Catch2-compatible surface.", + ], + [ + "Shrinking that always holds", + "Inputs shrink through their recorded choices, so a smaller counterexample still satisfies every filter and dependency.", + ], + [ + "Failures that come back", + "An example database replays failures first on the next run, on every machine that shares it, until they are fixed.", + ], + [ + "Oracles without expected values", + "Equivalent, Metamorphic, RoundTrip and Idempotent check properties that need no expected result, and state machines test stateful code.", + ], + [ + "Search and coverage", + "Target scores guide the search towards rare inputs, and Cover fails a property that reaches an interesting case too rarely.", + ], + [ + "Snapshots and results", + "Text snapshots with explicit files, and a structured result model written as JUnit-style XML.", + ], + ], + roadmapTitle: "On the roadmap", + roadmap: [ + "An independent test runner", + "Mocking", + "Coverage per test", + "Change-impact test selection and prioritization", + "Mutation testing", + "Coverage- and mutation-guided test generation", + ], + }, + }, + "de-DE": { + common: { + source: "Quellcode", + productPage: "Produktseite", + status: "Status", + }, + ides: { + title: "Progmasoft-IDEs", + description: + "Entwicklungsumgebungen von Progmasoft, gebaut um die Tala-Werkzeuge und die Sprachen daneben.", + open: "Öffnen", + }, + xide: { + eyebrow: "Progmasoft-IDEs", + tagline: "Die geplante IDE für Tala.", + description: + "Xide ist eine integrierte Entwicklungsumgebung in Kotlin mit Compose Multiplatform. Sie vereint Editor, Projekt und die Diagnosen des Tala-Compilers in einem Fenster.", + status: + "Frühes Stadium: Xide ist noch nicht für den täglichen Einsatz bereit. Derzeit entsteht das Fundament, das die Architektur zusammenhält.", + layoutTitle: "Eine vertraute Anordnung", + layout: [ + [ + "Projekt", + "Einen Ordner als Baum öffnen; Verzeichnisse laden Ebene für Ebene, symbolischen Links wird nie gefolgt.", + ], + [ + "Editor", + "Ein Tab pro Dokument, Zeilennummern, eine Markierung an jeder Zeile mit einem Problem und kein stilles Schließen geänderter Dateien.", + ], + [ + "Probleme", + "Diagnosen gehören genau zu der geprüften Dokumentversion; veraltete Ergebnisse werden verworfen.", + ], + ], + languagesTitle: "Sprachen", + languagesDescription: + "Tala, Kotlin, Java, Groovy und Python lassen sich öffnen, bearbeiten und speichern, alle fünf mit Syntaxhervorhebung. Die Prüfung ist für Tala angebunden: Xide startet talac und liest seine strukturierten Diagnosen, statt Terminaltext auszuwerten.", + architectureTitle: "Architektur", + architecture: [ + "Kotlin/JVM-Komponenten mit einer Desktop-Oberfläche in Compose Multiplatform", + "Xide bringt eine minimierte Java-Laufzeit mit; kein separates JDK nötig", + "Erweiterungen sind Kotlin/JVM-JARs aus dem Erweiterungsverzeichnis", + ], + }, + catch3: { + eyebrow: "Progmasoft Catch3", + tagline: "C++-Tests jenseits von Assertions.", + description: + "Catch3 behält das ausdrucksstarke Testmodell von Catch2 und ergänzt eine eigene C++20-Bibliothek: native Eigenschaftstests, Snapshots und strukturierte Ergebnisse.", + disclaimer: + "Catch3 wird unabhängig gepflegt. Es ist keine offizielle Catch2-Version und wird von den Catch2-Maintainern nicht unterstützt.", + exampleTitle: "Eine erste Eigenschaft", + featuresTitle: "Was Catch3 ergänzt", + features: [ + [ + "Vertraute Tests", + "Assertions, Sections, Reporter, Benchmarks und die Kommandozeile funktionieren weiter über die Catch2-kompatible Oberfläche.", + ], + [ + "Verkleinerung, die immer gilt", + "Eingaben werden über ihre aufgezeichneten Entscheidungen verkleinert; ein kleineres Gegenbeispiel erfüllt weiterhin alle Filter und Abhängigkeiten.", + ], + [ + "Fehler, die wiederkommen", + "Eine Beispieldatenbank spielt Fehler im nächsten Lauf zuerst ab, auf jedem Rechner, der sie teilt, bis sie behoben sind.", + ], + [ + "Orakel ohne erwartete Werte", + "Equivalent, Metamorphic, RoundTrip und Idempotent prüfen Eigenschaften ohne erwartetes Ergebnis; Zustandsmaschinen testen zustandsbehafteten Code.", + ], + [ + "Suche und Abdeckung", + "Target-Werte lenken die Suche zu seltenen Eingaben, und Cover lässt eine Eigenschaft scheitern, die einen interessanten Fall zu selten erreicht.", + ], + [ + "Snapshots und Ergebnisse", + "Text-Snapshots mit expliziten Dateien und ein strukturiertes Ergebnismodell als XML im JUnit-Stil.", + ], + ], + roadmapTitle: "Auf dem Fahrplan", + roadmap: [ + "Ein eigener Test-Runner", + "Mocking", + "Abdeckung pro Test", + "Testauswahl und Priorisierung nach Änderungsauswirkung", + "Mutationstests", + "Abdeckungs- und mutationsgesteuerte Testerzeugung", + ], + }, + }, + "ru-RU": { + common: { + source: "Исходный код", + productPage: "Страница продукта", + status: "Статус", + }, + ides: { + title: "Среды разработки Progmasoft", + description: + "Среды разработки Progmasoft, построенные вокруг инструментов Tala и соседних языков.", + open: "Открыть", + }, + xide: { + eyebrow: "Среды разработки Progmasoft", + tagline: "Будущая среда разработки для Tala.", + description: + "Xide — интегрированная среда разработки на Kotlin и Compose Multiplatform. Она объединяет редактор, проект и диагностику компилятора Tala в одном окне.", + status: + "Ранняя стадия: Xide ещё не готова к повседневной работе. Сейчас закладывается основа, которая сохраняет архитектуру цельной.", + layoutTitle: "Привычная компоновка", + layout: [ + [ + "Проект", + "Папка открывается деревом; каталоги загружаются по одному уровню, по символическим ссылкам переход не выполняется.", + ], + [ + "Редактор", + "Вкладка на каждый документ, номера строк, отметка у каждой строки с проблемой и никакого тихого закрытия изменённых файлов.", + ], + [ + "Проблемы", + "Диагностика привязана к той версии документа, которая проверялась; устаревшие результаты отбрасываются.", + ], + ], + languagesTitle: "Языки", + languagesDescription: + "Tala, Kotlin, Java, Groovy и Python открываются, редактируются и сохраняются, все пять — с подсветкой синтаксиса. Проверка подключена для Tala: Xide запускает talac и читает его структурированную диагностику, а не разбирает текст терминала.", + architectureTitle: "Архитектура", + architecture: [ + "Компоненты на Kotlin/JVM с настольным интерфейсом на Compose Multiplatform", + "Вместе с Xide поставляется минимальная среда Java; отдельный JDK не нужен", + "Расширения — это JAR для Kotlin/JVM из каталога расширений", + ], + }, + catch3: { + eyebrow: "Progmasoft Catch3", + tagline: "Тестирование C++ за пределами утверждений.", + description: + "Catch3 сохраняет выразительную модель тестов Catch2 и добавляет собственную библиотеку на C++20: тестирование на основе свойств, снимки и структурированные результаты.", + disclaimer: + "Catch3 развивается независимо. Это не официальный выпуск Catch2, и сопровождающие Catch2 его не поддерживают.", + exampleTitle: "Первое свойство", + featuresTitle: "Что добавляет Catch3", + features: [ + [ + "Привычные тесты", + "Утверждения, секции, отчёты, бенчмарки и командная строка работают через совместимый с Catch2 интерфейс.", + ], + [ + "Упрощение, которое не ломается", + "Входные данные упрощаются через записанные выборы, поэтому меньший контрпример по-прежнему проходит все фильтры и зависимости.", + ], + [ + "Ошибки, которые возвращаются", + "База примеров первым делом повторяет найденные ошибки при следующем запуске на каждой машине, где она общая, пока их не исправят.", + ], + [ + "Оракулы без ожидаемых значений", + "Equivalent, Metamorphic, RoundTrip и Idempotent проверяют свойства без ожидаемого результата, а конечные автоматы тестируют код с состоянием.", + ], + [ + "Поиск и покрытие", + "Оценки Target ведут поиск к редким входам, а Cover проваливает свойство, которое слишком редко доходит до интересного случая.", + ], + [ + "Снимки и результаты", + "Текстовые снимки с явными файлами и структурированная модель результатов в XML в стиле JUnit.", + ], + ], + roadmapTitle: "В планах", + roadmap: [ + "Собственный запускатель тестов", + "Моки", + "Покрытие по каждому тесту", + "Выбор и приоритизация тестов по влиянию изменений", + "Мутационное тестирование", + "Генерация тестов под управлением покрытия и мутаций", + ], + }, + }, + "he-IL": { + common: { + source: "קוד מקור", + productPage: "דף המוצר", + status: "מצב", + }, + ides: { + title: "סביבות הפיתוח של Progmasoft", + description: + "סביבות פיתוח של Progmasoft, שנבנות סביב כלי Tala והשפות שלצידם.", + open: "לפתוח", + }, + xide: { + eyebrow: "סביבות הפיתוח של Progmasoft", + tagline: "סביבת הפיתוח המתוכננת ל־Tala.", + description: + "Xide היא סביבת פיתוח משולבת שנכתבת ב־Kotlin עם Compose Multiplatform. היא מביאה את העורך, הפרויקט והאבחונים של מהדר Tala לחלון אחד.", + status: + "שלב מוקדם: Xide עדיין לא מוכנה לשימוש יומיומי. כרגע נבנה הבסיס ששומר על ארכיטקטורה עקבית.", + layoutTitle: "פריסה מוכרת", + layout: [ + [ + "פרויקט", + "פתיחת תיקייה כעץ; תיקיות נטענות רמה אחר רמה, וקישורים סימבוליים לא נעקבים לעולם.", + ], + [ + "עורך", + "לשונית לכל מסמך, מספרי שורות, סימון בכל שורה עם בעיה, ואין סגירה שקטה של קבצים שהשתנו.", + ], + [ + "בעיות", + "האבחונים קשורים לגרסת המסמך המדויקת שנבדקה; תוצאות שהתיישנו נזרקות.", + ], + ], + languagesTitle: "שפות", + languagesDescription: + "Tala, Kotlin, Java, Groovy ו־Python נפתחות, נערכות ונשמרות, כולן עם צביעת תחביר. הבדיקה מחוברת ל־Tala: Xide מריצה את talac וקוראת את האבחונים המובנים שלו במקום לפענח טקסט מהמסוף.", + architectureTitle: "ארכיטקטורה", + architecture: [ + "רכיבי Kotlin/JVM עם ממשק לשולחן העבודה ב־Compose Multiplatform", + "סביבת Java מצומצמת מגיעה עם Xide; אין צורך להתקין JDK נפרד", + "הרחבות הן קובצי JAR של Kotlin/JVM מתיקיית ההרחבות", + ], + }, + catch3: { + eyebrow: "Progmasoft Catch3", + tagline: "בדיקות C++ מעבר לטענות.", + description: + "Catch3 שומרת על מודל כתיבת הבדיקות של Catch2 ומוסיפה ספריית C++20 משלה: בדיקות מבוססות תכונות, תמונות מצב ותוצאות מובנות.", + disclaimer: + "Catch3 מתוחזקת באופן עצמאי. היא אינה גרסה רשמית של Catch2 ואינה נתמכת על ידי המתחזקים של Catch2.", + exampleTitle: "תכונה ראשונה", + featuresTitle: "מה Catch3 מוסיפה", + features: [ + [ + "בדיקות מוכרות", + "טענות, סעיפים, מדווחים, מדדי ביצועים ושורת הפקודה ממשיכים לעבוד דרך הממשק התואם ל־Catch2.", + ], + [ + "צמצום שתמיד תקף", + "הקלטים מצטמצמים דרך הבחירות שנרשמו, כך שדוגמה נגדית קטנה יותר עדיין עומדת בכל המסננים והתלויות.", + ], + [ + "כשלים שחוזרים", + "מסד דוגמאות מריץ קודם את הכשלים בהרצה הבאה, בכל מחשב שחולק אותו, עד שהם מתוקנים.", + ], + [ + "אורקלים בלי ערכים צפויים", + "Equivalent, Metamorphic, RoundTrip ו־Idempotent בודקים תכונות שלא צריכות תוצאה צפויה, ומכונות מצבים בודקות קוד עם מצב.", + ], + [ + "חיפוש וכיסוי", + "ציוני Target מכוונים את החיפוש לקלטים נדירים, ו־Cover מכשיל תכונה שמגיעה למקרה מעניין לעיתים רחוקות מדי.", + ], + [ + "תמונות מצב ותוצאות", + "תמונות מצב טקסטואליות עם קבצים מפורשים, ומודל תוצאות מובנה שנכתב כ־XML בסגנון JUnit.", + ], + ], + roadmapTitle: "בתוכנית", + roadmap: [ + "מריץ בדיקות עצמאי", + "אובייקטים מדומים", + "כיסוי לכל בדיקה", + "בחירת בדיקות ותעדוף לפי השפעת השינוי", + "בדיקות מוטציה", + "יצירת בדיקות מונחית כיסוי ומוטציות", + ], + }, + }, +}; + +export function getSitesMessages(locale: Locale): SitesMessages { + return sitesMessages[locale]; +} diff --git a/apps/web/lib/products.ts b/apps/web/lib/products.ts new file mode 100644 index 0000000..70f19da --- /dev/null +++ b/apps/web/lib/products.ts @@ -0,0 +1,505 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import type { Locale } from "./localization"; + +/** + * The products of product.progmasoft.com. Each one has a page there and its + * own site; the catalog only introduces it and leads on. + */ +export const productSlugs = [ + "tala-lang", + "talac", + "talafmt", + "talalint", + "tazel", + "xide", + "catch3", +] as const; +export type ProductSlug = (typeof productSlugs)[number]; + +export function isProductSlug(value: string): value is ProductSlug { + return productSlugs.includes(value as ProductSlug); +} + +interface ProductFacts { + name: string; + /** The product's own site. */ + site: string; + /** The public source repository. */ + source: string; + accent: "violet" | "blue" | "green" | "orange" | "teal" | "slate"; +} + +export const products: Record<ProductSlug, ProductFacts> = { + "tala-lang": { + name: "Tala", + site: "https://tala.run/", + source: "https://github.com/Progmasoft/tala", + accent: "violet", + }, + talac: { + name: "talac", + site: "https://talac.tala.run/", + source: "https://github.com/Progmasoft/tala", + accent: "blue", + }, + talafmt: { + name: "talafmt", + site: "https://talafmt.tala.run/", + source: "https://github.com/Progmasoft/talafmt", + accent: "teal", + }, + talalint: { + name: "talalint", + site: "https://talalint.tala.run/", + source: "https://github.com/Progmasoft/talalint", + accent: "green", + }, + tazel: { + name: "Tazel", + site: "https://tazel.tala.run/", + source: "https://github.com/Progmasoft/tazel", + accent: "orange", + }, + xide: { + name: "Xide", + site: "https://ides.progmasoft.com/xide", + source: "https://github.com/Progmasoft/xide", + accent: "slate", + }, + catch3: { + name: "Catch3", + site: "https://catch3.progmasoft.com/", + source: "https://github.com/Progmasoft/catch3", + accent: "green", + }, +}; + +interface ProductText { + category: string; + tagline: string; + description: string; + features: string[]; +} + +interface CatalogMessages { + metadataTitle: string; + metadataDescription: string; + eyebrow: string; + title: string; + description: string; + details: string; + site: string; + source: string; + features: string; + back: string; + products: Record<ProductSlug, ProductText>; +} + +export const catalogMessages: Record<Locale, CatalogMessages> = { + "en-US": { + metadataTitle: "Products", + metadataDescription: + "The products of Progmasoft: the Tala language and its tools, the Xide IDE and the Catch3 testing toolkit.", + eyebrow: "Progmasoft products", + title: "Products", + description: + "Each product grows out of the Progmasoft technology pool and has its own site. Choose one to read more.", + details: "Details", + site: "Visit the site", + source: "Source code", + features: "What it does", + back: "All products", + products: { + "tala-lang": { + category: "Programming language", + tagline: "A lazy, statically typed language.", + description: + "Tala evaluates by need and checks types before it runs. Programs are organized in namespaces and classes, and an executable starts at a parameterless static Main method.", + features: [ + "Call-by-need evaluation with effects kept out of sight of the types", + "Namespaces and classes; no top-level functions", + "The System standard library and the Progmasoft library", + "Packages published on ViGet", + ], + }, + talac: { + category: "Compiler", + tagline: "The Tala compiler.", + description: + "talac turns Tala sources into native executables. Its frontend parses, resolves and type-checks in Haskell; its backend lowers through its own intermediate representations to LLVM in C++.", + features: [ + "One program from any number of source files", + "Inspectable intermediate stages (.core, .xpp, .xmm)", + "Native executables through LLVM", + "A command line read by a typed parser", + ], + }, + talafmt: { + category: "Formatter", + tagline: "One layout for every Tala file.", + description: + "talafmt rewrites Tala sources in place to one consistent layout, or checks them without changing anything.", + features: [ + "Formats files in place by default", + "--check for continuous integration", + "Output as files, standard output, coverage, Checkstyle or JSON", + "Settings in talafmt.kts", + ], + }, + talalint: { + category: "Linter", + tagline: "Finds what a compiler lets through.", + description: + "talalint reports suspicious Tala code and can fix what it knows how to fix.", + features: [ + "Reports findings with their location", + "--fix applies the safe fixes", + "Settings in talalint.kts", + "Runs from Tazel with tazel lint", + ], + }, + tazel: { + category: "Build system and package manager", + tagline: "Builds Tala projects and their packages.", + description: + "Tazel reads a project from BUILD.kts, resolves its packages from ViGet, records them in a lockfile and runs talac to build.", + features: [ + "Projects described in a Kotlin DSL (BUILD.kts)", + "Packages from ViGet, with a lockfile", + "Runs the compiler, formatter and linter", + "Extensible with DSL plugins", + ], + }, + xide: { + category: "Integrated development environment", + tagline: "The planned IDE for Tala.", + description: + "Xide is the integrated development environment for Tala, written in Kotlin with Compose Multiplatform. It is early work and not yet ready for daily use.", + features: [ + "A desktop shell with a project tree, tabbed editor and problems view", + "Tala, Kotlin, Java, Groovy and Python with syntax colouring", + "Checks Tala files with the structured diagnostics of talac", + "Extensions as Kotlin/JVM JARs", + ], + }, + catch3: { + category: "Testing toolkit", + tagline: "C++ testing beyond assertions.", + description: + "Catch3 keeps Catch2 compatibility and adds a native property-testing engine, with more kinds of testing on its roadmap.", + features: [ + "Catch2-compatible tests", + "Property, stateful and metamorphic tests with shrinking", + "Text snapshots and JUnit-style XML results", + "Planned: own runner, mocking, coverage and mutation testing", + ], + }, + }, + }, + "de-DE": { + metadataTitle: "Produkte", + metadataDescription: + "Die Produkte von Progmasoft: die Sprache Tala und ihre Werkzeuge, die IDE Xide und das Testwerkzeug Catch3.", + eyebrow: "Progmasoft-Produkte", + title: "Produkte", + description: + "Jedes Produkt wächst aus dem Progmasoft-Technologiepool und hat eine eigene Website. Wählen Sie eines, um mehr zu lesen.", + details: "Details", + site: "Zur Website", + source: "Quellcode", + features: "Was es kann", + back: "Alle Produkte", + products: { + "tala-lang": { + category: "Programmiersprache", + tagline: "Eine träge, statisch typisierte Sprache.", + description: + "Tala wertet nach Bedarf aus und prüft Typen vor der Ausführung. Programme sind in Namespaces und Klassen gegliedert; ein Programm beginnt bei einer parameterlosen statischen Main-Methode.", + features: [ + "Auswertung nach Bedarf, Effekte bleiben für die Typen unsichtbar", + "Namespaces und Klassen; keine Funktionen auf oberster Ebene", + "Die Standardbibliothek System und die Progmasoft-Bibliothek", + "Pakete auf ViGet", + ], + }, + talac: { + category: "Compiler", + tagline: "Der Tala-Compiler.", + description: + "talac übersetzt Tala-Quellen in native Programme. Das Frontend parst, löst Namen auf und prüft Typen in Haskell; das Backend senkt über eigene Zwischendarstellungen in C++ nach LLVM ab.", + features: [ + "Ein Programm aus beliebig vielen Quelldateien", + "Einsehbare Zwischenstufen (.core, .xpp, .xmm)", + "Native Programme über LLVM", + "Eine Kommandozeile mit typisiertem Parser", + ], + }, + talafmt: { + category: "Formatierer", + tagline: "Ein Layout für jede Tala-Datei.", + description: + "talafmt bringt Tala-Quellen direkt in ein einheitliches Layout oder prüft sie, ohne etwas zu ändern.", + features: [ + "Formatiert Dateien standardmäßig direkt", + "--check für die kontinuierliche Integration", + "Ausgabe als Dateien, Standardausgabe, Abdeckung, Checkstyle oder JSON", + "Einstellungen in talafmt.kts", + ], + }, + talalint: { + category: "Linter", + tagline: "Findet, was ein Compiler durchlässt.", + description: + "talalint meldet verdächtigen Tala-Code und behebt, was es sicher beheben kann.", + features: [ + "Meldet Befunde mit ihrer Position", + "--fix wendet sichere Korrekturen an", + "Einstellungen in talalint.kts", + "Läuft aus Tazel mit tazel lint", + ], + }, + tazel: { + category: "Build-System und Paketmanager", + tagline: "Baut Tala-Projekte und ihre Pakete.", + description: + "Tazel liest ein Projekt aus BUILD.kts, löst seine Pakete aus ViGet auf, hält sie in einer Lock-Datei fest und baut mit talac.", + features: [ + "Projekte in einer Kotlin-DSL (BUILD.kts)", + "Pakete aus ViGet mit Lock-Datei", + "Startet Compiler, Formatierer und Linter", + "Erweiterbar mit DSL-Plugins", + ], + }, + xide: { + category: "Integrierte Entwicklungsumgebung", + tagline: "Die geplante IDE für Tala.", + description: + "Xide ist die integrierte Entwicklungsumgebung für Tala, geschrieben in Kotlin mit Compose Multiplatform. Sie ist in einem frühen Stadium und noch nicht für den täglichen Einsatz bereit.", + features: [ + "Eine Desktop-Oberfläche mit Projektbaum, Editor-Tabs und Problemansicht", + "Tala, Kotlin, Java, Groovy und Python mit Syntaxhervorhebung", + "Prüft Tala-Dateien mit den strukturierten Diagnosen von talac", + "Erweiterungen als Kotlin/JVM-JARs", + ], + }, + catch3: { + category: "Testwerkzeug", + tagline: "C++-Tests jenseits von Assertions.", + description: + "Catch3 bleibt Catch2-kompatibel und ergänzt eine native Engine für eigenschaftsbasierte Tests; weitere Testarten stehen auf dem Fahrplan.", + features: [ + "Catch2-kompatible Tests", + "Eigenschafts-, zustandsbehaftete und metamorphe Tests mit Verkleinerung", + "Text-Snapshots und XML-Ergebnisse im JUnit-Stil", + "Geplant: eigener Runner, Mocking, Abdeckung und Mutationstests", + ], + }, + }, + }, + "ru-RU": { + metadataTitle: "Продукты", + metadataDescription: + "Продукты Progmasoft: язык Tala и его инструменты, среда разработки Xide и набор для тестирования Catch3.", + eyebrow: "Продукты Progmasoft", + title: "Продукты", + description: + "Каждый продукт вырастает из технологического пула Progmasoft и имеет собственный сайт. Выберите продукт, чтобы узнать больше.", + details: "Подробнее", + site: "Перейти на сайт", + source: "Исходный код", + features: "Что он умеет", + back: "Все продукты", + products: { + "tala-lang": { + category: "Язык программирования", + tagline: "Ленивый язык со статической типизацией.", + description: + "Tala вычисляет по необходимости и проверяет типы до запуска. Программы организованы в пространства имён и классы, а исполняемая программа начинается со статического метода Main без параметров.", + features: [ + "Вычисление по необходимости; эффекты скрыты от типов", + "Пространства имён и классы; без функций верхнего уровня", + "Стандартная библиотека System и библиотека Progmasoft", + "Пакеты публикуются в ViGet", + ], + }, + talac: { + category: "Компилятор", + tagline: "Компилятор Tala.", + description: + "talac превращает исходные тексты Tala в исполняемые программы. Фронтенд разбирает, разрешает имена и проверяет типы на Haskell; бэкенд на C++ через собственные промежуточные представления доходит до LLVM.", + features: [ + "Одна программа из любого числа исходных файлов", + "Доступные для просмотра промежуточные этапы (.core, .xpp, .xmm)", + "Исполняемые программы через LLVM", + "Командная строка с типизированным разбором", + ], + }, + talafmt: { + category: "Форматировщик", + tagline: "Единое оформление для каждого файла Tala.", + description: + "talafmt приводит исходные тексты Tala к единому оформлению на месте или только проверяет их, ничего не меняя.", + features: [ + "По умолчанию форматирует файлы на месте", + "--check для непрерывной интеграции", + "Вывод в файлы, стандартный вывод, покрытие, Checkstyle или JSON", + "Настройки в talafmt.kts", + ], + }, + talalint: { + category: "Линтер", + tagline: "Находит то, что пропускает компилятор.", + description: + "talalint сообщает о подозрительном коде Tala и исправляет то, что умеет исправлять.", + features: [ + "Сообщает о находках с их местоположением", + "--fix применяет безопасные исправления", + "Настройки в talalint.kts", + "Запускается из Tazel командой tazel lint", + ], + }, + tazel: { + category: "Система сборки и менеджер пакетов", + tagline: "Собирает проекты Tala и их пакеты.", + description: + "Tazel читает проект из BUILD.kts, разрешает его пакеты из ViGet, фиксирует их в lock-файле и собирает с помощью talac.", + features: [ + "Проекты описываются на Kotlin DSL (BUILD.kts)", + "Пакеты из ViGet с lock-файлом", + "Запускает компилятор, форматировщик и линтер", + "Расширяется DSL-плагинами", + ], + }, + xide: { + category: "Интегрированная среда разработки", + tagline: "Будущая среда разработки для Tala.", + description: + "Xide — интегрированная среда разработки для Tala на Kotlin и Compose Multiplatform. Это ранняя стадия, ещё не готовая к повседневной работе.", + features: [ + "Настольная оболочка с деревом проекта, вкладками редактора и окном проблем", + "Tala, Kotlin, Java, Groovy и Python с подсветкой синтаксиса", + "Проверка файлов Tala через структурированную диагностику talac", + "Расширения в виде JAR для Kotlin/JVM", + ], + }, + catch3: { + category: "Набор для тестирования", + tagline: "Тестирование C++ за пределами утверждений.", + description: + "Catch3 сохраняет совместимость с Catch2 и добавляет собственный движок тестирования на основе свойств; другие виды тестирования — в планах.", + features: [ + "Тесты, совместимые с Catch2", + "Тесты свойств, с состоянием и метаморфные, с упрощением", + "Текстовые снимки и результаты в XML в стиле JUnit", + "В планах: свой запускатель, моки, покрытие и мутационное тестирование", + ], + }, + }, + }, + "he-IL": { + metadataTitle: "מוצרים", + metadataDescription: + "המוצרים של Progmasoft: שפת Tala והכלים שלה, סביבת הפיתוח Xide וערכת הבדיקות Catch3.", + eyebrow: "המוצרים של Progmasoft", + title: "מוצרים", + description: + "כל מוצר צומח ממאגר הטכנולוגיה של Progmasoft ויש לו אתר משלו. בחרו מוצר כדי לקרוא עוד.", + details: "פרטים", + site: "לאתר", + source: "קוד מקור", + features: "מה הוא עושה", + back: "כל המוצרים", + products: { + "tala-lang": { + category: "שפת תכנות", + tagline: "שפה עצלה עם טיפוסים סטטיים.", + description: + "Tala מחשבת לפי הצורך ובודקת טיפוסים לפני ההרצה. התוכניות מאורגנות במרחבי שמות ובמחלקות, ותוכנית מתחילה במתודת Main סטטית בלי פרמטרים.", + features: [ + "חישוב לפי הצורך; האפקטים נשארים מחוץ לטיפוסים", + "מרחבי שמות ומחלקות; אין פונקציות ברמה העליונה", + "הספרייה הסטנדרטית System והספרייה של Progmasoft", + "חבילות שמתפרסמות ב־ViGet", + ], + }, + talac: { + category: "מהדר", + tagline: "המהדר של Tala.", + description: + "talac הופך קוד Tala לתוכניות מכונה. החלק הקדמי מנתח, פותר שמות ובודק טיפוסים ב־Haskell; החלק האחורי ב־C++ יורד דרך ייצוגי ביניים משלו אל LLVM.", + features: [ + "תוכנית אחת מכל מספר של קובצי מקור", + "שלבי ביניים שאפשר לבחון (.core, .xpp, .xmm)", + "תוכניות מכונה דרך LLVM", + "שורת פקודה שנקראת במנתח עם טיפוסים", + ], + }, + talafmt: { + category: "מעצב קוד", + tagline: "פריסה אחת לכל קובץ Tala.", + description: + "talafmt משכתב קוד Tala במקום לפריסה אחידה, או בודק אותו בלי לשנות דבר.", + features: [ + "מעצב קבצים במקום כברירת מחדל", + "--check לאינטגרציה רציפה", + "פלט כקבצים, פלט תקני, כיסוי, Checkstyle או JSON", + "הגדרות ב־talafmt.kts", + ], + }, + talalint: { + category: "לינטר", + tagline: "מוצא את מה שהמהדר מעביר.", + description: + "talalint מדווח על קוד Tala חשוד ומתקן את מה שהוא יודע לתקן.", + features: [ + "מדווח על ממצאים עם המיקום שלהם", + "--fix מחיל את התיקונים הבטוחים", + "הגדרות ב־talalint.kts", + "רץ מתוך Tazel עם tazel lint", + ], + }, + tazel: { + category: "מערכת בנייה ומנהל חבילות", + tagline: "בונה פרויקטים של Tala ואת החבילות שלהם.", + description: + "Tazel קורא פרויקט מ־BUILD.kts, פותר את החבילות שלו מ־ViGet, רושם אותן בקובץ נעילה ובונה עם talac.", + features: [ + "פרויקטים שמתוארים ב־Kotlin DSL (BUILD.kts)", + "חבילות מ־ViGet עם קובץ נעילה", + "מפעיל את המהדר, מעצב הקוד והלינטר", + "ניתן להרחבה בתוספי DSL", + ], + }, + xide: { + category: "סביבת פיתוח משולבת", + tagline: "סביבת הפיתוח המתוכננת ל־Tala.", + description: + "Xide היא סביבת הפיתוח המשולבת ל־Tala, שנכתבת ב־Kotlin עם Compose Multiplatform. היא בשלב מוקדם ועדיין לא מוכנה לשימוש יומיומי.", + features: [ + "מעטפת לשולחן העבודה עם עץ פרויקט, לשוניות עורך ותצוגת בעיות", + "Tala, Kotlin, Java, Groovy ו־Python עם צביעת תחביר", + "בודקת קובצי Tala עם האבחונים המובנים של talac", + "הרחבות כקובצי JAR של Kotlin/JVM", + ], + }, + catch3: { + category: "ערכת בדיקות", + tagline: "בדיקות C++ מעבר לטענות.", + description: + "Catch3 שומרת על תאימות ל־Catch2 ומוסיפה מנוע בדיקות מבוססות תכונות משלה; סוגי בדיקות נוספים נמצאים בתוכנית.", + features: [ + "בדיקות תואמות Catch2", + "בדיקות תכונות, בדיקות עם מצב ובדיקות מטמורפיות, עם צמצום", + "תמונות מצב טקסטואליות ותוצאות XML בסגנון JUnit", + "בתוכנית: מריץ משלה, אובייקטים מדומים, כיסוי ובדיקות מוטציה", + ], + }, + }, + }, +}; + +export function getCatalogMessages(locale: Locale): CatalogMessages { + return catalogMessages[locale]; +} diff --git a/apps/web/lib/sites.ts b/apps/web/lib/sites.ts new file mode 100644 index 0000000..bcfc358 --- /dev/null +++ b/apps/web/lib/sites.ts @@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +/** Drops the trailing slash of every path but the root. */ +function trimmed(pathname: string): string { + return pathname.length > 1 && pathname.endsWith("/") + ? pathname.slice(0, -1) + : pathname; +} + +/** + * The public pages of product.progmasoft.com and the internal routes that + * render them: the catalog, and one page per product. + */ +export function productRoute(pathname: string): string | null { + const path = trimmed(pathname); + if (path === "/") { + return "/products"; + } + const segments = path.split("/"); + return segments.length === 2 && /^[a-z0-9-]+$/.test(segments[1] ?? "") + ? `/products${path}` + : null; +} + +/** The public pages of ides.progmasoft.com: the list and Xide. */ +export function idesRoute(pathname: string): string | null { + const path = trimmed(pathname); + if (path === "/") { + return "/ides"; + } + return path === "/xide" ? "/ides/xide" : null; +} + +/** The public page of catch3.progmasoft.com. */ +export function catch3Route(pathname: string): string | null { + return trimmed(pathname) === "/" ? "/catch3" : null; +} diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts index 2aa7e95..dd47981 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.ts @@ -10,18 +10,51 @@ import { requestHost, } from "@/lib/localization"; import { authorizeRoute, consoleRoute, issuerRoute } from "@/lib/credentials"; +import { catch3Route, idesRoute, productRoute } from "@/lib/sites"; const accountHosts = new Set(["account.progmasoft.com", "account.localhost"]); const vigetHosts = new Set(["viget.progmasoft.com", "viget.localhost"]); -const issuerHosts = new Set([ - "credentials.progmasoft.com", - "credentials.localhost", -]); -const authorizeHosts = new Set([ - "authorize.progmasoft.com", - "authorize.localhost", -]); -const consoleHosts = new Set(["console.progmasoft.com", "console.localhost"]); +interface OwnSite { + hosts: Set<string>; + /** The internal tree of the site's pages. */ + root: string; + route: (pathname: string) => string | null; + /** Whether /api reaches the account API on this host. */ + api: boolean; +} + +function hostsOf(name: string): Set<string> { + return new Set([`${name}.progmasoft.com`, `${name}.localhost`]); +} + +const ownSites: OwnSite[] = [ + { + hosts: hostsOf("authorize"), + root: "/authorize", + route: authorizeRoute, + api: true, + }, + { + hosts: hostsOf("credentials"), + root: "/issuer", + route: issuerRoute, + api: true, + }, + { + hosts: hostsOf("console"), + root: "/console", + route: consoleRoute, + api: true, + }, + { + hosts: hostsOf("product"), + root: "/products", + route: productRoute, + api: false, + }, + { hosts: hostsOf("ides"), root: "/ides", route: idesRoute, api: false }, + { hosts: hostsOf("catch3"), root: "/catch3", route: catch3Route, api: false }, +]; export function proxy(request: NextRequest) { const host = requestHost( @@ -57,32 +90,26 @@ export function proxy(request: NextRequest) { return response; } - // Progmasoft OAuth serves its own pages and nothing else of the site: the - // account pages keep their own host and cookies. - // Progmasoft OAuth and the Progmasoft Console serve their own pages and - // nothing else of the site: the account pages keep their own host and cookies. - const oauthSite = authorizeHosts.has(host) - ? { route: authorizeRoute, root: "/authorize" } - : issuerHosts.has(host) - ? { route: issuerRoute, root: "/issuer" } - : consoleHosts.has(host) - ? { route: consoleRoute, root: "/console" } - : null; - if (oauthSite) { - if (pathname.startsWith("/api/")) { + // Hosts with pages of their own: Progmasoft OAuth, the Progmasoft Console, + // the product catalog and the product sites. Each serves its own tree and + // nothing else of the site, so the account pages keep their own host and + // cookies. + const site = ownSites.find((candidate) => candidate.hosts.has(host)); + if (site) { + if (site.api && pathname.startsWith("/api/")) { return NextResponse.next(); } const destination = internalRoute( request, - oauthSite.route(pathname) ?? `${oauthSite.root}/not-found`, + site.route(pathname) ?? `${site.root}/not-found`, ); // The sign-in page reads ReturnUrl and the consent page every parameter // of the authorization request. destination.search = request.nextUrl.search; return NextResponse.rewrite(destination); } - for (const internal of ["/authorize", "/issuer", "/console"]) { - if (pathname === internal || pathname.startsWith(`${internal}/`)) { + for (const { root } of ownSites) { + if (pathname === root || pathname.startsWith(`${root}/`)) { return NextResponse.rewrite(internalRoute(request, "/not-found")); } } diff --git a/apps/web/tests/localization.test.mjs b/apps/web/tests/localization.test.mjs index 9e4a361..af22b04 100644 --- a/apps/web/tests/localization.test.mjs +++ b/apps/web/tests/localization.test.mjs @@ -13,6 +13,7 @@ import { requestHost, supportedLocales, } from "../lib/localization.ts"; +import { homeMessages } from "../lib/home-messages.ts"; test("only the published locales are accepted", () => { assert.deepEqual(supportedLocales, ["en-US", "de-DE", "ru-RU", "he-IL"]); @@ -164,7 +165,7 @@ test("the Russian messages are written in Cyrillic", () => { const russian = messages["ru-RU"]; for (const text of [ russian.navigation.language, - russian.home.heroTitleStart, + homeMessages["ru-RU"].hero.titleStart, russian.auth.signIn, russian.viget.emptyTitle, ]) { diff --git a/apps/web/tests/sites.test.mjs b/apps/web/tests/sites.test.mjs new file mode 100644 index 0000000..7aa2b5a --- /dev/null +++ b/apps/web/tests/sites.test.mjs @@ -0,0 +1,81 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 + +import assert from "node:assert/strict"; +import { test } from "node:test"; +import { homeMessages } from "../lib/home-messages.ts"; +import { supportedLocales } from "../lib/localization.ts"; +import { sitesMessages } from "../lib/product-sites.ts"; +import { + catalogMessages, + isProductSlug, + productSlugs, + products, +} from "../lib/products.ts"; +import { catch3Route, idesRoute, productRoute } from "../lib/sites.ts"; + +function shape(value) { + if (Array.isArray(value)) { + return ["array", value.length]; + } + if (typeof value !== "object" || value === null) { + return typeof value; + } + return Object.fromEntries( + Object.keys(value) + .sort() + .map((key) => [key, shape(value[key])]), + ); +} + +test("every language has the same home, catalog and product-site text", () => { + for (const messages of [homeMessages, catalogMessages, sitesMessages]) { + const english = shape(messages["en-US"]); + for (const locale of supportedLocales) { + assert.deepEqual(shape(messages[locale]), english, locale); + } + } +}); + +test("the catalog lists the products the user named, each with a site", () => { + assert.deepEqual( + [...productSlugs], + ["tala-lang", "talac", "talafmt", "talalint", "tazel", "xide", "catch3"], + ); + for (const slug of productSlugs) { + assert.match(products[slug].site, /^https:\/\//, slug); + assert.match( + products[slug].source, + /^https:\/\/github\.com\/Progmasoft\//, + slug, + ); + } + assert.equal(products.xide.site, "https://ides.progmasoft.com/xide"); + assert.equal(products.catch3.site, "https://catch3.progmasoft.com/"); + assert.equal(isProductSlug("viget"), false); +}); + +test("the home page names areas, not products", () => { + const productNames = Object.values(products).map((product) => product.name); + for (const locale of supportedLocales) { + for (const [title, description] of homeMessages[locale].pool.areas) { + for (const name of productNames) { + assert.ok(!title.includes(name), `${locale}: ${title}`); + assert.ok(!description.includes(name), `${locale}: ${description}`); + } + } + } +}); + +test("the product hosts map to their internal routes", () => { + assert.equal(productRoute("/"), "/products"); + assert.equal(productRoute("/talac"), "/products/talac"); + assert.equal(productRoute("/tala-lang/"), "/products/tala-lang"); + assert.equal(productRoute("/talac/extra"), null); + assert.equal(productRoute("/../x"), null); + assert.equal(idesRoute("/"), "/ides"); + assert.equal(idesRoute("/xide"), "/ides/xide"); + assert.equal(idesRoute("/other"), null); + assert.equal(catch3Route("/"), "/catch3"); + assert.equal(catch3Route("/docs"), null); +}); diff --git a/ops/README.md b/ops/README.md index 1800d5f..61836d3 100644 --- a/ops/README.md +++ b/ops/README.md @@ -148,6 +148,7 @@ The service refuses to start in production without them. Replacing the signing k clients still hold; replacing the encryption key invalidates every access token, authorization code and refresh token, so every application has to ask again. Back up both files with the database. -The certificate of `progmasoft.com` must name `credentials.progmasoft.com`, `authorize.progmasoft.com` and -`console.progmasoft.com` as well; expand it with certbot's webroot plugin before the vhosts are enabled, then check +The certificate of `progmasoft.com` must name `credentials.progmasoft.com`, `authorize.progmasoft.com`, +`console.progmasoft.com`, `product.progmasoft.com`, `ides.progmasoft.com` and `catch3.progmasoft.com` as well; expand +it with certbot's webroot plugin before the vhosts are enabled, then check `/.well-known/openid-configuration`, the sign-in page and the console from outside. diff --git a/ops/nginx/progmaweb.conf b/ops/nginx/progmaweb.conf index a775fa5..39a2546 100644 --- a/ops/nginx/progmaweb.conf +++ b/ops/nginx/progmaweb.conf @@ -378,3 +378,141 @@ server { proxy_read_timeout 60s; } } + +# The product catalog (product.progmasoft.com) and the product sites Progmaweb +# serves itself (ides.progmasoft.com, catch3.progmasoft.com): pages of the +# Next.js site only. +server { + listen 80; + listen [::]:80; + server_name product.progmasoft.com; + + location ^~ /.well-known/acme-challenge/ { + root /var/lib/letsencrypt; + default_type text/plain; + } + + location / { + return 308 https://product.progmasoft.com$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name product.progmasoft.com; + + ssl_certificate /etc/letsencrypt/live/progmasoft.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + + client_max_body_size 1m; + + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; + + location / { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_read_timeout 60s; + } +} + +server { + listen 80; + listen [::]:80; + server_name ides.progmasoft.com; + + location ^~ /.well-known/acme-challenge/ { + root /var/lib/letsencrypt; + default_type text/plain; + } + + location / { + return 308 https://ides.progmasoft.com$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name ides.progmasoft.com; + + ssl_certificate /etc/letsencrypt/live/progmasoft.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + + client_max_body_size 1m; + + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; + + location / { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_read_timeout 60s; + } +} + +server { + listen 80; + listen [::]:80; + server_name catch3.progmasoft.com; + + location ^~ /.well-known/acme-challenge/ { + root /var/lib/letsencrypt; + default_type text/plain; + } + + location / { + return 308 https://catch3.progmasoft.com$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name catch3.progmasoft.com; + + ssl_certificate /etc/letsencrypt/live/progmasoft.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + + client_max_body_size 1m; + + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; + + location / { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_read_timeout 60s; + } +}