# manishpatel00/error404-ui architecture

> Architecture diagram of the GitHub repository manishpatel00/error404-ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manishpatel00/error404-ui
- Repository: https://github.com/manishpatel00/error404-ui

## Overview

Error404 combines a public catalog and documentation site with a reusable 404 component library and CLI, plus account, pricing, and request features. The main user journey is browsing components, opening a component’s guide or live preview, and using its implementation; the server-side code lookup supports displaying component source. The graph also preserves documented platform capabilities. Some page and integration wiring is unsampled, so those relationships are omitted or marked unverified rather than inferred.

Main entry points: [`components/content/404/index.ts`](https://github.com/manishpatel00/error404-ui/blob/main/components/content/404/index.ts) (Component registry), [`app/(site)/components/[slug]/page.tsx`](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/%5Bslug%5D/page.tsx) (Component guides), [`components/Landing/Landing.tsx`](https://github.com/manishpatel00/error404-ui/blob/main/components/Landing/Landing.tsx) (Landing page), [`app/(site)/components/page.tsx`](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/page.tsx) (Component catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Discovery and docs"]
  node_landing["Landing page<br/>[Landing.tsx]"]
  node_catalog_page["Component catalog<br/>[page.tsx]"]
  node_component_docs["Component guides<br/>[page.tsx]"]
  node_preview_page["Live preview<br/>[page.tsx]"]
end

subgraph group_library["404 component library"]
  node_code_lookup["Code lookup<br/>[get-404-content.ts]"]
  node_component_registry["Component registry<br/>[index.ts]"]
  node_component_catalog["404 templates"]
end

subgraph group_accounts["Accounts and profiles"]
  node_signup["Sign-up page<br/>[page.tsx]"]
  node_signin["Sign-in page<br/>[page.tsx]"]
  node_auth_route["Auth API route<br/>[route.ts]"]
  node_auth_service["Authentication service<br/>[auth.ts]"]
  node_user_profile["User profile<br/>[page.tsx]"]
end

subgraph group_platform["Platform services"]
  node_database[("Application database<br/>[db.ts]")]
  node_pricing["Pricing page<br/>[page.tsx]"]
  node_payments["Paddle integration<br/>[paddle.ts]"]
  node_request_form["Component request form<br/>[page.tsx]"]
  node_request_action["Request submission<br/>[actions.ts]"]
  node_ai_page["AI feature page<br/>[page.tsx]"]
  node_ai_service["AI service<br/>[ai.ts]"]
end

subgraph group_distribution["Developer distribution"]
  node_react_package["React package"]
  node_cli["CLI installer<br/>[index.ts]"]
end

node_visitor(("Developer"))

node_visitor -->|"visits"| node_landing
node_visitor -->|"browses"| node_catalog_page
node_catalog_page -->|"opens guide"| node_component_docs
node_component_docs -->|"opens preview"| node_preview_page
node_preview_page -->|"resolves template"| node_component_registry
node_landing -->|"shows examples"| node_component_registry
node_component_registry -->|"registers templates"| node_component_catalog
node_component_docs -.->|"loads code"| node_code_lookup
node_code_lookup -->|"resolves slug"| node_component_registry
node_visitor -->|"installs templates"| node_cli
node_visitor -->|"creates account"| node_signup
node_visitor -->|"signs in"| node_signin
node_auth_route -->|"dispatches auth"| node_auth_service
node_auth_service -->|"uses adapter"| node_database
node_visitor -->|"views profile"| node_user_profile
node_visitor -->|"views plans"| node_pricing
node_pricing -.->|"uses payments"| node_payments
node_visitor -->|"submits idea"| node_request_form
node_request_form -->|"submits form"| node_request_action
node_visitor -.->|"opens AI feature"| node_ai_page
node_ai_page -.->|"uses AI service"| node_ai_service
node_component_catalog -->|"offers reusable components"| node_react_package

click node_landing "https://github.com/manishpatel00/error404-ui/blob/main/components/Landing/Landing.tsx"
click node_catalog_page "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/page.tsx"
click node_component_docs "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/%5Bslug%5D/page.tsx"
click node_preview_page "https://github.com/manishpatel00/error404-ui/blob/main/app/preview/%5Bkey%5D/page.tsx"
click node_code_lookup "https://github.com/manishpatel00/error404-ui/blob/main/app/actions/get-404-content.ts"
click node_component_registry "https://github.com/manishpatel00/error404-ui/blob/main/components/content/404/index.ts"
click node_component_catalog "https://github.com/manishpatel00/error404-ui/tree/main/components/404"
click node_react_package "https://github.com/manishpatel00/error404-ui/tree/main/packages/react/src"
click node_cli "https://github.com/manishpatel00/error404-ui/blob/main/packages/cli/src/index.ts"
click node_signup "https://github.com/manishpatel00/error404-ui/blob/main/app/signup/%5B%5B...signup%5D%5D/page.tsx"
click node_signin "https://github.com/manishpatel00/error404-ui/blob/main/app/signin/%5B%5B...signin%5D%5D/page.tsx"
click node_auth_route "https://github.com/manishpatel00/error404-ui/blob/main/app/api/auth/%5B...all%5D/route.ts"
click node_auth_service "https://github.com/manishpatel00/error404-ui/blob/main/lib/auth.ts"
click node_database "https://github.com/manishpatel00/error404-ui/blob/main/lib/db.ts"
click node_user_profile "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/user/page.tsx"
click node_pricing "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/pricing/page.tsx"
click node_payments "https://github.com/manishpatel00/error404-ui/blob/main/lib/paddle.ts"
click node_request_form "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/request/page.tsx"
click node_request_action "https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/request/actions.ts"
click node_ai_page "https://github.com/manishpatel00/error404-ui/blob/main/app/ai/page.tsx"
click node_ai_service "https://github.com/manishpatel00/error404-ui/blob/main/server/ai.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_landing,node_catalog_page,node_component_docs,node_preview_page toneBlue
class node_code_lookup,node_component_registry,node_component_catalog toneAmber
class node_signup,node_signin,node_auth_route,node_auth_service,node_user_profile toneMint
class node_database,node_pricing,node_payments,node_request_form,node_request_action,node_ai_page,node_ai_service toneRose
class node_react_package,node_cli,node_visitor toneIndigo
```

## Components

### Discovery and docs

- [Landing page](https://github.com/manishpatel00/error404-ui/blob/main/components/Landing/Landing.tsx): `components/Landing/Landing.tsx`
- [Component catalog](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/page.tsx): `app/(site)/components/page.tsx`
- [Component guides](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/components/%5Bslug%5D/page.tsx): `app/(site)/components/[slug]/page.tsx`
- [Live preview](https://github.com/manishpatel00/error404-ui/blob/main/app/preview/%5Bkey%5D/page.tsx): `app/preview/[key]/page.tsx`

### 404 component library

- [Code lookup](https://github.com/manishpatel00/error404-ui/blob/main/app/actions/get-404-content.ts): `app/actions/get-404-content.ts`
- [Component registry](https://github.com/manishpatel00/error404-ui/blob/main/components/content/404/index.ts): `components/content/404/index.ts`
- [404 templates](https://github.com/manishpatel00/error404-ui/tree/main/components/404): `components/404`

### Accounts and profiles

- [Sign-up page](https://github.com/manishpatel00/error404-ui/blob/main/app/signup/%5B%5B...signup%5D%5D/page.tsx): `app/signup/[[...signup]]/page.tsx`
- [Sign-in page](https://github.com/manishpatel00/error404-ui/blob/main/app/signin/%5B%5B...signin%5D%5D/page.tsx): `app/signin/[[...signin]]/page.tsx`
- [Auth API route](https://github.com/manishpatel00/error404-ui/blob/main/app/api/auth/%5B...all%5D/route.ts): `app/api/auth/[...all]/route.ts`
- [Authentication service](https://github.com/manishpatel00/error404-ui/blob/main/lib/auth.ts): `lib/auth.ts`
- [User profile](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/user/page.tsx): `app/(site)/user/page.tsx`

### Platform services

- [Application database](https://github.com/manishpatel00/error404-ui/blob/main/lib/db.ts): `lib/db.ts`
- [Pricing page](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/pricing/page.tsx): `app/(site)/pricing/page.tsx`
- [Paddle integration](https://github.com/manishpatel00/error404-ui/blob/main/lib/paddle.ts): `lib/paddle.ts`
- [Component request form](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/request/page.tsx): `app/(site)/request/page.tsx`
- [Request submission](https://github.com/manishpatel00/error404-ui/blob/main/app/(site)/request/actions.ts): `app/(site)/request/actions.ts`
- [AI feature page](https://github.com/manishpatel00/error404-ui/blob/main/app/ai/page.tsx): `app/ai/page.tsx`
- [AI service](https://github.com/manishpatel00/error404-ui/blob/main/server/ai.ts): `server/ai.ts`

### Developer distribution

- [React package](https://github.com/manishpatel00/error404-ui/tree/main/packages/react/src): `packages/react/src`
- [CLI installer](https://github.com/manishpatel00/error404-ui/blob/main/packages/cli/src/index.ts): `packages/cli/src/index.ts`

### Other components

- **Developer**

## Connections

- Developer → Landing page: visits (evidence: `README.md`)
- Developer → Component catalog: browses (evidence: `README.md`)
- Component catalog → Component guides: opens guide (evidence: `app/(site)/components/[slug]/page.tsx`)
- Component guides → Live preview: opens preview (evidence: `app/(site)/components/[slug]/page.tsx`)
- Live preview → Component registry: resolves template (evidence: `app/preview/[key]/page.tsx`)
- Landing page → Component registry: shows examples (evidence: `components/Landing/Landing.tsx`)
- Component registry → 404 templates: registers templates (evidence: `components/content/404/index.ts`)
- Component guides → Code lookup: loads code
- Code lookup → Component registry: resolves slug (evidence: `components/content/404/server.ts`)
- Developer → CLI installer: installs templates (evidence: `README.md`)
- Developer → Sign-up page: creates account (evidence: `README.md`)
- Developer → Sign-in page: signs in (evidence: `README.md`)
- Auth API route → Authentication service: dispatches auth (evidence: `app/api/auth/[...all]/route.ts`)
- Authentication service → Application database: uses adapter (evidence: `lib/auth.ts`)
- Developer → User profile: views profile (evidence: `README.md`)
- Developer → Pricing page: views plans (evidence: `README.md`)
- Pricing page → Paddle integration: uses payments
- Developer → Component request form: submits idea (evidence: `README.md`)
- Component request form → Request submission: submits form (evidence: `app/(site)/request/page.tsx`)
- Developer → AI feature page: opens AI feature
- AI feature page → AI service: uses AI service
- 404 templates → React package: offers reusable components (evidence: `README.md`)
