# insforge/insforge-templates architecture

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

- Interactive diagram: https://gitdiagram.com/insforge/insforge-templates
- Repository: https://github.com/insforge/insforge-templates

## Overview

This repository is a collection of independent InsForge application templates, rather than one deployed product. Developers select a starter or app template, adapt it, and build a product workflow using its framework and InsForge integrations. The React starter is the clearest sampled runtime: the app hosts sign-in/sign-up and a protected todo example; auth forms call shared auth operations, and the todo view reads data and delegates add/edit UI to child components. Other template capabilities are summarized from the README and file tree; their internal call paths were not sampled.

Main entry points: [`react/src/App.tsx`](https://github.com/insforge/insforge-templates/blob/main/react/src/App.tsx) (React starter app), [`react/src/components/sign-in-form.tsx`](https://github.com/insforge/insforge-templates/blob/main/react/src/components/sign-in-form.tsx) (Sign-in and signup), [`react/src/components/todos-display.tsx`](https://github.com/insforge/insforge-templates/blob/main/react/src/components/todos-display.tsx) (Todo list), [`react/src/lib/auth.ts`](https://github.com/insforge/insforge-templates/blob/main/react/src/lib/auth.ts) (Auth operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_starters["Framework starters"]
  node_react_app["React starter app<br/>[App.tsx]"]
  node_react_auth_forms["Sign-in and signup<br/>[sign-in-form.tsx]"]
  node_react_auth["Auth operations<br/>[auth.ts]"]
  node_react_auth_state["Auth context<br/>[auth-context.tsx]"]
  node_react_client["InsForge client<br/>[insforge.ts]"]
  node_react_todos["Todo list<br/>[todos-display.tsx]"]
  node_react_todo_controls["Todo controls<br/>[add-todo-form.tsx]"]
  node_next_starter["Next.js starter<br/>[page.tsx]"]
end

subgraph group_ai["AI products"]
  node_chatbot["AI chatbot<br/>[chat-service.ts]"]
  node_pdf_chat["PDF study assistant<br/>[route.ts]"]
end

subgraph group_business["Business apps"]
  node_crm["CRM pipeline<br/>[lead-pipeline.tsx]"]
  node_commerce["E-commerce store<br/>[store.ts]"]
  node_booking["Booking marketplace<br/>[booking-actions.ts]"]
  node_admin["Admin dashboard<br/>[tasks-page.tsx]"]
  node_landing["Landing and waitlist<br/>[waitlist.ts]"]
end

subgraph group_collaboration["Workspace apps"]
  node_workspace["Collaborative workspace<br/>[PageEditor.tsx]"]
end

subgraph group_auth["Auth overlay"]
  node_better_auth["Better Auth overlay<br/>[auth.ts]"]
end

node_developer(("Template developer"))
node_insforge[("InsForge services")]

node_developer -->|"adapts template"| node_react_app
node_react_app -->|"renders forms"| node_react_auth_forms
node_react_auth_forms -->|"calls auth"| node_react_auth
node_react_auth_forms -->|"refreshes viewer"| node_react_auth_state
node_react_auth_state -->|"gets viewer"| node_react_auth
node_react_auth -->|"uses client"| node_react_client
node_react_app -->|"renders list"| node_react_todos
node_react_todos -->|"reads todos"| node_react_client
node_react_todos -->|"renders controls"| node_react_todo_controls
node_react_client -.->|"connects to"| node_insforge
node_developer -->|"adapts template"| node_next_starter
node_developer -->|"adapts template"| node_chatbot
node_developer -.->|"adapts template"| node_pdf_chat
node_developer -->|"adapts template"| node_crm
node_developer -->|"adapts template"| node_commerce
node_developer -.->|"adapts template"| node_booking
node_developer -.->|"adapts template"| node_admin
node_developer -.->|"adapts template"| node_landing
node_developer -.->|"adapts template"| node_workspace
node_developer -->|"overlays provider"| node_better_auth

click node_react_app "https://github.com/insforge/insforge-templates/blob/main/react/src/App.tsx"
click node_react_auth_forms "https://github.com/insforge/insforge-templates/blob/main/react/src/components/sign-in-form.tsx"
click node_react_auth "https://github.com/insforge/insforge-templates/blob/main/react/src/lib/auth.ts"
click node_react_auth_state "https://github.com/insforge/insforge-templates/blob/main/react/src/lib/auth-context.tsx"
click node_react_client "https://github.com/insforge/insforge-templates/blob/main/react/src/lib/insforge.ts"
click node_react_todos "https://github.com/insforge/insforge-templates/blob/main/react/src/components/todos-display.tsx"
click node_react_todo_controls "https://github.com/insforge/insforge-templates/blob/main/react/src/components/add-todo-form.tsx"
click node_next_starter "https://github.com/insforge/insforge-templates/blob/main/nextjs/src/app/protected/page.tsx"
click node_chatbot "https://github.com/insforge/insforge-templates/blob/main/chatbot/lib/chat-service.ts"
click node_pdf_chat "https://github.com/insforge/insforge-templates/blob/main/ai-pdf-chatbot/app/api/chat/route.ts"
click node_crm "https://github.com/insforge/insforge-templates/blob/main/crm/components/leads/lead-pipeline.tsx"
click node_commerce "https://github.com/insforge/insforge-templates/blob/main/e-commerce/lib/store.ts"
click node_booking "https://github.com/insforge/insforge-templates/blob/main/booking/lib/booking-actions.ts"
click node_admin "https://github.com/insforge/insforge-templates/blob/main/admin-dashboard/src/features/tasks/tasks-page.tsx"
click node_landing "https://github.com/insforge/insforge-templates/blob/main/landing/app/actions/waitlist.ts"
click node_workspace "https://github.com/insforge/insforge-templates/blob/main/workspace/components/editor/PageEditor.tsx"
click node_better_auth "https://github.com/insforge/insforge-templates/blob/main/auth-providers/better-auth/src/lib/auth.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_react_app,node_react_auth_forms,node_react_auth,node_react_auth_state,node_react_client,node_react_todos,node_react_todo_controls,node_next_starter toneBlue
class node_chatbot,node_pdf_chat,node_insforge toneAmber
class node_crm,node_commerce,node_booking,node_admin,node_landing toneMint
class node_workspace toneRose
class node_better_auth,node_developer toneIndigo
```

## Components

### Framework starters

- [React starter app](https://github.com/insforge/insforge-templates/blob/main/react/src/App.tsx): `react/src/App.tsx`
- [Sign-in and signup](https://github.com/insforge/insforge-templates/blob/main/react/src/components/sign-in-form.tsx): `react/src/components/sign-in-form.tsx`
- [Auth operations](https://github.com/insforge/insforge-templates/blob/main/react/src/lib/auth.ts): `react/src/lib/auth.ts`
- [Auth context](https://github.com/insforge/insforge-templates/blob/main/react/src/lib/auth-context.tsx): `react/src/lib/auth-context.tsx`
- [InsForge client](https://github.com/insforge/insforge-templates/blob/main/react/src/lib/insforge.ts): `react/src/lib/insforge.ts`
- [Todo list](https://github.com/insforge/insforge-templates/blob/main/react/src/components/todos-display.tsx): `react/src/components/todos-display.tsx`
- [Todo controls](https://github.com/insforge/insforge-templates/blob/main/react/src/components/add-todo-form.tsx): `react/src/components/add-todo-form.tsx`
- [Next.js starter](https://github.com/insforge/insforge-templates/blob/main/nextjs/src/app/protected/page.tsx): `nextjs/src/app/protected/page.tsx`

### AI products

- [AI chatbot](https://github.com/insforge/insforge-templates/blob/main/chatbot/lib/chat-service.ts): `chatbot/lib/chat-service.ts`
- [PDF study assistant](https://github.com/insforge/insforge-templates/blob/main/ai-pdf-chatbot/app/api/chat/route.ts): `ai-pdf-chatbot/app/api/chat/route.ts`

### Business apps

- [CRM pipeline](https://github.com/insforge/insforge-templates/blob/main/crm/components/leads/lead-pipeline.tsx): `crm/components/leads/lead-pipeline.tsx`
- [E-commerce store](https://github.com/insforge/insforge-templates/blob/main/e-commerce/lib/store.ts): `e-commerce/lib/store.ts`
- [Booking marketplace](https://github.com/insforge/insforge-templates/blob/main/booking/lib/booking-actions.ts): `booking/lib/booking-actions.ts`
- [Admin dashboard](https://github.com/insforge/insforge-templates/blob/main/admin-dashboard/src/features/tasks/tasks-page.tsx): `admin-dashboard/src/features/tasks/tasks-page.tsx`
- [Landing and waitlist](https://github.com/insforge/insforge-templates/blob/main/landing/app/actions/waitlist.ts): `landing/app/actions/waitlist.ts`

### Workspace apps

- [Collaborative workspace](https://github.com/insforge/insforge-templates/blob/main/workspace/components/editor/PageEditor.tsx): `workspace/components/editor/PageEditor.tsx`

### Auth overlay

- [Better Auth overlay](https://github.com/insforge/insforge-templates/blob/main/auth-providers/better-auth/src/lib/auth.ts): `auth-providers/better-auth/src/lib/auth.ts`

### Other components

- **Template developer**
- **InsForge services**

## Connections

- Template developer → React starter app: adapts template (evidence: `README.md`)
- React starter app → Sign-in and signup: renders forms (evidence: `react/src/App.tsx`)
- Sign-in and signup → Auth operations: calls auth (evidence: `react/src/components/sign-in-form.tsx`)
- Sign-in and signup → Auth context: refreshes viewer (evidence: `react/src/components/sign-in-form.tsx`)
- Auth context → Auth operations: gets viewer (evidence: `react/src/lib/auth-context.tsx`)
- Auth operations → InsForge client: uses client (evidence: `react/src/lib/auth.ts`)
- React starter app → Todo list: renders list (evidence: `react/src/App.tsx`)
- Todo list → InsForge client: reads todos (evidence: `react/src/components/todos-display.tsx`)
- Todo list → Todo controls: renders controls (evidence: `react/src/components/todos-display.tsx`)
- InsForge client → InsForge services: connects to (evidence: `react/src/lib/insforge.ts`)
- Template developer → Next.js starter: adapts template (evidence: `README.md`)
- Template developer → AI chatbot: adapts template (evidence: `README.md`)
- Template developer → PDF study assistant: adapts template
- Template developer → CRM pipeline: adapts template (evidence: `README.md`)
- Template developer → E-commerce store: adapts template (evidence: `README.md`)
- Template developer → Booking marketplace: adapts template
- Template developer → Admin dashboard: adapts template
- Template developer → Landing and waitlist: adapts template
- Template developer → Collaborative workspace: adapts template
- Template developer → Better Auth overlay: overlays provider (evidence: `README.md`)
