$ show cnumr/best-practices
This repository is a production-grade Next.js application (v14 with App Router) that serves as the official web eco-design best practices reference (RΓ©fΓ©rentiel d'Γ©coconception web) by GreenIT.fr. It provides a multi-language (French, English, Spanish) content site with a headless CMS (TinaCMS) for editing, a REST API for programmatic access, and a client-side search (Pagefind). The core content is a structured collection of 115+ best practice sheets (fiches) with frontmatter metadata including lifecycle stages, environmental impact, validation rules, and version tracking. The site is deployed on Vercel and uses MongoDB for TinaCMS indexing. While the primary purpose is an application, the underlying content is a well-structured, versioned dataset that could be used independently for compliance checking or analytical purposes, giving the repo a hybrid character. The application code is well-organized with reusable patterns for MDX rendering, glossary tooltips, content validation, and multi-referential configuration.
The LLM identified 4 files worth highlighting for reuse:
Provides a React context and hook for parsing inline glossary references (e.g., [[key|display]]) within MDX content and rendering them as interactive tooltips. This pattern is self-contained, relies only on standard React and DOM APIs, and can be extracted to any documentation site that needs inline tooltip definitions.
A custom remark plugin that validates persona references in MDX frontmatter (e.g., `responsible: developer`) against a list of known persona slugs. This is a clean, reusable pattern for enforcing referential integrity in content management systems. It can be adapted to validate any cross-references in markdown content.
Central configuration module that defines feature flags for multiple referentials (RWEB, RWP, REIPRO, RIA, REF_HOME) based on an environment variable. It encapsulates lifecycle options, tiers, RGESN fields, and scope settings. This pattern is a clean way to support multiple related content schemas from a single codebase and can be reused in any multi-tenant documentation application.
Defines custom MDX component overrides for headings (with slugified IDs), CTAWithIcon, PositionableImage, and inline HTML. This pattern is essential for any Next.js site using MDX and demonstrates a well-structured approach to extending markdown rendering with custom React components, while keeping the component mapping clean and extensible.