# AGENTS.md — Frontend Components > **Parent**: `../../AGENTS.md` — commands, auth flow, Next.js 16 rules, deployment. ## Overview 100+ client components organized by domain. The `(frontend)` layout renders guests `LandingPage` (no app shell); authed users get `AppSidebar` + `SiteHeader` + `CommandPalette`. ## Structure ``` components/frontend/ auth/ 2 files LoginForm, LoginLink (returnTo via usePathname) account/ 16 files Profile, password, preferences, Discord link awards/ 4 files Medal/ribbon display, award dialogs banking/ 9 files Account cards, ledger, deposit/withdraw/transfer dialogs baseManagement/ 4 files StaffRoster, HireStaffDialog, EmploymentCard, UpgradeCard (structure page) blocks/ 7 files AppSidebar (data in sidebarData.ts), NavCore, NavUser, XPDisplay dashboard/ 6 files ProfileSummary, QuickStats, MissionBriefing, RecentEvents eod/ 4 files Minefield Clearance minigame evaluations/ 0 files EMPTY directory (placeholder — no components yet) flappy/ 4 files Flight Simulator canvas game, leaderboard, sounds helpdesk/ 8 files Ticket list/detail, create dialog, timeline impersonation/ 2 files Admin impersonation banner/controls intelligence/ 17 files Mission cards/attendance/comms, campaign/faction cards locker/ 13 files Grid, equipment editor, loadouts, wardrobe logistics/ 8 files Shipment cards/actions, toast notifications market/ 10 files Listing cards, negotiation flow, NPC chat, patience meter notifications/ 2 files Bell (polling), inbox page personnel/ 3 files NpcDirectory, NpcCard, NpcProfile (/personnel/contacts) profile/ 3 files Profile page components (incl. rating dialog) projects/ 12 files Jira-like boards, releases, sprints qualification/ 6 files Aim trainer arena/game/canvas/leaderboard, sounds radio/ 5 files Radio Traffic game, message generator, leaderboard realtime/ 1 file GameTickRealtime (SSE -> router.refresh) roster/ 1 file Org chart view session/ 1 file Session expiry UI (pairs with useSessionExpired hook) shims/ 1 file Frontend shim renderer storage/ 14 files Structure grid, storage dialogs, event ledger transfers/ 7 files Assignment transfer request/decision UI wiki/ 11 files Index, editor + toolbar, content renderer, revisions, standards dialog + root files: LandingPage.tsx, SiteHeader.tsx, ClientDate.tsx, PayloadButtons.tsx ``` ## Conventions ### Server → Client data flow Pages are server components that fetch via `getPayload()`, then pass data as props to client components. Client components receive typed props and never call Payload directly. ### Item compound component `storage/` uses a compound `` component for grid cells with slots: ``, ``, ``. Attachments render as stacked badges on the grid cell; popover shows full detail on hover. ### Rich-text rendering Front-end surfaces render serialized Lexical with the shared `RichTextView` (`src/components/frontend/RichTextView.tsx`): it applies `.lexical-content` typography and paints saved text colours (TextStateFeature state or inline styles), both of which Payload's default JSX renderer drops. Briefings render through this component too (mission briefing sections use it directly). Editors come from `ptfLexicalEditor()` (`src/lib/lexical/editor.ts`) so every rich-text field gets the fixed toolbar + colour palette by default. ### Wiki body editor `/wiki/new` and the edit route render `WikiMarkdownEditor` (`src/components/frontend/wiki/WikiMarkdownEditor.tsx`), a CodeMirror 6 markdown editor over the page's plain markdown string; the body field stays markdown, so `prepareMarkdown`, templates, `:::` directives, wikilinks and the preview pipeline are untouched. Do NOT reintroduce a mirrored overlay (a highlighted `
` behind a transparent `