# inkithai/convertlab architecture

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

- Interactive diagram: https://gitdiagram.com/inkithai/convertlab
- Repository: https://github.com/inkithai/convertlab

## Overview

#### Purpose and Runtime
This is a Next.js TypeScript application for discovering file-conversion tools and presenting conversion workflows. It is primarily a frontend product surface; no server-side conversion engine, API routes, database, or external service integration is present in the repository.

#### Application Entry and Shell
The root route and shared application shell establish the landing experience and persistent navigation.
- `src/app/layout.tsx`
- `src/app/page.tsx`
- `src/app/globals.css`

`layout.tsx` wraps routes with site-wide structure, while the home page uses a format-selection UI to direct users into conversion-specific routes.

#### Navigation and Site Structure
Reusable header/footer components define the global navigation boundary. Conversion and tool-directory routes are separate product entry points.
- `src/components/layout/header.tsx`
- `src/components/layout/footer.tsx`
- `src/app/conversion/page.tsx`
- `src/app/tools/page.tsx`

#### Conversion Discovery Flow
Users choose a source/target format from the landing picker or conversion directory, then navigate to a dynamic conversion URL keyed by conversion type.
- `src/app/hero-format-picker.tsx`
- `src/app/conversion/conversion-picker.tsx`
- `src/app/conversion/[type]/page.tsx`

The `[type]` route is the principal per-conversion boundary: it resolves the route parameter and renders the appropriate conversion experience.

#### Client-side Conversion Experience
Interactive behavior for an individual conversion route is isolated in a client component.
- `src/app/conversion/[type]/conversion-client.tsx`
- `src/app/conversion/[type]/page.tsx`

This separation suggests server-rendered route setup plus browser-side file/input interaction. Actual file transformation implementation is not visible, so the UI should be treated as decoupled from any future conversion backend or browser processing layer.

#### Conversion Catalog and Domain Data
Converter definitions are organized by format family and likely supply the route metadata, supported pairings, labels, and tool descriptions consumed by pickers and dynamic pages.
- `src/lib/converters/data.ts`
- `src/lib/converters/documents.ts`
- `src/lib/converters/office.ts`

This catalog is the central domain boundary: adding supported conversions should primarily extend these modules rather than route code.

#### Tool Directory
The tools section provides a catalog-style browsing surface distinct from the direct conversion flow.
- `src/app/tools/tool-directory.tsx`
- `src/app/tools/page.tsx`
- `src/lib/converters/data.ts`

It likely consumes the same converter catalog, making catalog consistency important across landing, conversion, and directory experiences.

#### Shared Contracts and Deployment Configuration
Application-wide naming/constants and TypeScript declarations support consistent UI/domain usage; Next.js is the runtime and build/deployment framework.
- `src/constants/app.ts`
- `src/types/declarations.d.ts`
- `next.config.js`
- `package.json`

Main entry points: [`src/app/layout.tsx`](https://github.com/inkithai/convertlab/blob/main/src/app/layout.tsx) (Root layout), [`src/lib/converters/data.ts`](https://github.com/inkithai/convertlab/blob/main/src/lib/converters/data.ts) (Converter catalog), [`src/app/conversion/[type]/page.tsx`](https://github.com/inkithai/convertlab/blob/main/src/app/conversion/%5Btype%5D/page.tsx) (Dynamic conversion route), [`src/app/hero-format-picker.tsx`](https://github.com/inkithai/convertlab/blob/main/src/app/hero-format-picker.tsx) (Hero format picker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App Shell"]
  node_layout["Root layout<br/>route shell<br/>[layout.tsx]"]
  node_header["Header<br/>navigation component<br/>[header.tsx]"]
  node_footer["Footer<br/>navigation component<br/>[footer.tsx]"]
  node_styles["Global styles<br/>stylesheet<br/>[globals.css]"]
end

subgraph group_routes["Product Routes"]
  node_home["Home page<br/>root route<br/>[page.tsx]"]
  node_conversion_index["Conversion directory<br/>route<br/>[page.tsx]"]
  node_tools_page["Tools page<br/>route<br/>[page.tsx]"]
  node_tool_directory["Tool directory<br/>catalog browser<br/>[tool-directory.tsx]"]
end

subgraph group_conversion["Conversion Flow"]
  node_hero_picker["Hero format picker<br/>format selector"]
  node_conversion_picker["Conversion picker<br/>format selector"]
  node_conversion_route["Dynamic conversion route<br/>parameterized route<br/>[page.tsx]"]
  node_conversion_client["Conversion client<br/>client interaction"]
end

subgraph group_catalog["Converter Catalog"]
  node_converter_data[("Converter catalog<br/>domain data<br/>[data.ts]")]
  node_document_converters["Document converters<br/>catalog family<br/>[documents.ts]"]
  node_office_converters["Office converters<br/>catalog family<br/>[office.ts]"]
end

node_next{{"Next.js runtime<br/>framework<br/>[next.config.js]"}}
node_app_config["App constants &amp; types<br/>shared contracts<br/>[app.ts]"]

node_next -->|"runs"| node_layout
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_layout -->|"loads"| node_styles
node_layout -->|"wraps"| node_home
node_layout -->|"wraps"| node_conversion_index
node_layout -->|"wraps"| node_tools_page
node_home -->|"renders"| node_hero_picker
node_conversion_index -->|"renders"| node_conversion_picker
node_hero_picker -->|"navigates to"| node_conversion_route
node_conversion_picker -->|"navigates to"| node_conversion_route
node_conversion_route -->|"renders"| node_conversion_client
node_tools_page -->|"renders"| node_tool_directory
node_converter_data -->|"organizes"| node_document_converters
node_converter_data -->|"organizes"| node_office_converters
node_hero_picker -->|"uses formats"| node_converter_data
node_conversion_picker -->|"uses formats"| node_converter_data
node_conversion_route -->|"resolves type"| node_converter_data
node_tool_directory -->|"browses"| node_converter_data
node_app_config -.->|"supports"| node_layout
node_app_config -.->|"shared naming"| node_converter_data

click node_next "https://github.com/inkithai/convertlab/blob/main/next.config.js"
click node_app_config "https://github.com/inkithai/convertlab/blob/main/src/constants/app.ts"
click node_layout "https://github.com/inkithai/convertlab/blob/main/src/app/layout.tsx"
click node_header "https://github.com/inkithai/convertlab/blob/main/src/components/layout/header.tsx"
click node_footer "https://github.com/inkithai/convertlab/blob/main/src/components/layout/footer.tsx"
click node_styles "https://github.com/inkithai/convertlab/blob/main/src/app/globals.css"
click node_home "https://github.com/inkithai/convertlab/blob/main/src/app/page.tsx"
click node_conversion_index "https://github.com/inkithai/convertlab/blob/main/src/app/conversion/page.tsx"
click node_tools_page "https://github.com/inkithai/convertlab/blob/main/src/app/tools/page.tsx"
click node_hero_picker "https://github.com/inkithai/convertlab/blob/main/src/app/hero-format-picker.tsx"
click node_conversion_picker "https://github.com/inkithai/convertlab/blob/main/src/app/conversion/conversion-picker.tsx"
click node_conversion_route "https://github.com/inkithai/convertlab/blob/main/src/app/conversion/%5Btype%5D/page.tsx"
click node_conversion_client "https://github.com/inkithai/convertlab/blob/main/src/app/conversion/%5Btype%5D/conversion-client.tsx"
click node_tool_directory "https://github.com/inkithai/convertlab/blob/main/src/app/tools/tool-directory.tsx"
click node_converter_data "https://github.com/inkithai/convertlab/blob/main/src/lib/converters/data.ts"
click node_document_converters "https://github.com/inkithai/convertlab/blob/main/src/lib/converters/documents.ts"
click node_office_converters "https://github.com/inkithai/convertlab/blob/main/src/lib/converters/office.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_layout,node_header,node_footer,node_styles toneBlue
class node_home,node_conversion_index,node_tools_page,node_tool_directory toneAmber
class node_hero_picker,node_conversion_picker,node_conversion_route,node_conversion_client toneMint
class node_converter_data,node_document_converters,node_office_converters toneRose
class node_next,node_app_config toneNeutral
```

## Components

### App Shell

- [Root layout](https://github.com/inkithai/convertlab/blob/main/src/app/layout.tsx): route shell · `src/app/layout.tsx`
- [Header](https://github.com/inkithai/convertlab/blob/main/src/components/layout/header.tsx): navigation component · `src/components/layout/header.tsx`
- [Footer](https://github.com/inkithai/convertlab/blob/main/src/components/layout/footer.tsx): navigation component · `src/components/layout/footer.tsx`
- [Global styles](https://github.com/inkithai/convertlab/blob/main/src/app/globals.css): stylesheet · `src/app/globals.css`

### Product Routes

- [Home page](https://github.com/inkithai/convertlab/blob/main/src/app/page.tsx): root route · `src/app/page.tsx`
- [Conversion directory](https://github.com/inkithai/convertlab/blob/main/src/app/conversion/page.tsx): route · `src/app/conversion/page.tsx`
- [Tools page](https://github.com/inkithai/convertlab/blob/main/src/app/tools/page.tsx): route · `src/app/tools/page.tsx`
- [Tool directory](https://github.com/inkithai/convertlab/blob/main/src/app/tools/tool-directory.tsx): catalog browser · `src/app/tools/tool-directory.tsx`

### Conversion Flow

- [Hero format picker](https://github.com/inkithai/convertlab/blob/main/src/app/hero-format-picker.tsx): format selector · `src/app/hero-format-picker.tsx`
- [Conversion picker](https://github.com/inkithai/convertlab/blob/main/src/app/conversion/conversion-picker.tsx): format selector · `src/app/conversion/conversion-picker.tsx`
- [Dynamic conversion route](https://github.com/inkithai/convertlab/blob/main/src/app/conversion/%5Btype%5D/page.tsx): parameterized route · Resolves the conversion type and sets up its experience. · `src/app/conversion/[type]/page.tsx`
- [Conversion client](https://github.com/inkithai/convertlab/blob/main/src/app/conversion/%5Btype%5D/conversion-client.tsx): client interaction · Browser-side file and input interaction surface. · `src/app/conversion/[type]/conversion-client.tsx`

### Converter Catalog

- [Converter catalog](https://github.com/inkithai/convertlab/blob/main/src/lib/converters/data.ts): domain data · Central source for supported conversions and metadata. · `src/lib/converters/data.ts`
- [Document converters](https://github.com/inkithai/convertlab/blob/main/src/lib/converters/documents.ts): catalog family · `src/lib/converters/documents.ts`
- [Office converters](https://github.com/inkithai/convertlab/blob/main/src/lib/converters/office.ts): catalog family · `src/lib/converters/office.ts`

### Other components

- [Next.js runtime](https://github.com/inkithai/convertlab/blob/main/next.config.js): framework · Build and deployment runtime. · `next.config.js`
- [App constants & types](https://github.com/inkithai/convertlab/blob/main/src/constants/app.ts): shared contracts · `src/constants/app.ts`

## Connections

- Next.js runtime → Root layout: runs
- Root layout → Header: renders
- Root layout → Footer: renders
- Root layout → Global styles: loads
- Root layout → Home page: wraps
- Root layout → Conversion directory: wraps
- Root layout → Tools page: wraps
- Home page → Hero format picker: renders
- Conversion directory → Conversion picker: renders
- Hero format picker → Dynamic conversion route: navigates to
- Conversion picker → Dynamic conversion route: navigates to
- Dynamic conversion route → Conversion client: renders
- Tools page → Tool directory: renders
- Converter catalog → Document converters: organizes
- Converter catalog → Office converters: organizes
- Hero format picker → Converter catalog: uses formats
- Conversion picker → Converter catalog: uses formats
- Dynamic conversion route → Converter catalog: resolves type
- Tool directory → Converter catalog: browses
- App constants & types → Root layout: supports
- App constants & types → Converter catalog: shared naming
