// SPDX-FileCopyrightText: 2026 Progmasoft // SPDX-License-Identifier: AGPL-3.0-or-later import { JsonLd } from "@/components/JsonLd"; import { catalogData } from "@/lib/structured-data"; import type { Metadata } from "next"; import Link from "next/link"; import { CatalogPage, formatDay, ProductTable, } from "@/components/ProductCatalog"; import { getLocale } from "@/lib/locale.server"; import { filterProducts, getCatalogMessages, parseProductFilter, productCategories, productLanguages, productSlugs, productStatuses, products, releases, } from "@/lib/products"; export async function generateMetadata(): Promise { const catalog = getCatalogMessages(await getLocale()); return { title: catalog.metadataTitle, description: catalog.metadataDescription, alternates: { canonical: "https://product.progmasoft.com/" }, }; } interface CatalogProps { searchParams: Promise>; } /** * product.progmasoft.com: every project in numbers and in one table, which * the search form narrows without any script, and the latest releases. */ export default async function ProductsPage({ searchParams }: CatalogProps) { const locale = await getLocale(); const catalog = getCatalogMessages(locale); const filter = parseProductFilter(await searchParams); const found = filterProducts(locale, filter); const all = productSlugs.map((slug) => products[slug]); const stats: [string, number][] = [ [catalog.stats.projects, all.length], [catalog.stats.released, all.filter((p) => p.status === "released").length], [ catalog.stats.development, all.filter((p) => p.status === "development").length, ], [catalog.stats.languages, new Set(all.map((p) => p.language)).size], ]; const latest = releases().slice(0, 5); return (
{stats.map(([label, value]) => (
{label}
{value}
))}
{catalog.search.reset}

{found.length === 0 ? catalog.search.none : catalog.search.results.replace("{count}", String(found.length))}

{found.length > 0 ? ( ) : null}

{catalog.latestReleases}

{latest.length === 0 ? (

{catalog.noReleases}

) : ( )}
); }