From 82e90ec10df8b7c93410eef5d0f9f51fdf2cf89d Mon Sep 17 00:00:00 2001 From: Shannon Lockett <155769623+shazzar00ni@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:40:52 +0800 Subject: [PATCH 1/5] docs: add KNOWLEDGE.md with codebase patterns and conventions --- KNOWLEDGE.md | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 KNOWLEDGE.md diff --git a/KNOWLEDGE.md b/KNOWLEDGE.md new file mode 100644 index 00000000..8ce410fc --- /dev/null +++ b/KNOWLEDGE.md @@ -0,0 +1,233 @@ +# Knowledge: DocuGen Patterns & Conventions + +This document captures architectural decisions, patterns, and conventions that are implemented in the codebase but not formally documented elsewhere. + +--- + +## 1. Centralized Content Management + +All site copy lives in a single file: **`src/data/content.ts`** + +- Components import content from this central source rather than containing inline text +- Export naming convention: uppercase constants (`SITE`, `NAV_LINKS`, `HERO_COPY`, `FEATURES`, `FAQS`, etc.) +- Content is organized by feature/section + +```typescript +// Example structure +export const SITE = { name: 'DocuGen', tagline: '...', ... }; +export const HERO_COPY = { headline: '...', subheadline: '...', ... }; +export const FEATURES = [{ icon: '...', title: '...', ... }, ...]; +export const FAQS = [{ question: '...', answer: '...', ... }]; +``` + +**Rationale:** Enables copy updates without touching component logic. Supports i18n migration. + +--- + +## 2. CSS Class Utility (`cn()`) + +**Location:** `src/lib/utils.ts` + +```typescript +cn(...classes: (string | undefined | null | false)[]): string +``` + +Filters falsy values and joins class names with spaces. + +```tsx +