# jjaanngg/renewal_isig architecture

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

- Interactive diagram: https://gitdiagram.com/jjaanngg/renewal_isig
- Repository: https://github.com/jjaanngg/renewal_isig

## Overview

ISIG turns a user's spoken or typed work knowledge into an AI-guided interview and then a checklist-style handoff document. The visible workflow starts with Google sign-in, continues through topic selection and follow-up questions, and ends with a rendered report and document-library or sharing views. The sampled interview page confirms requests to the interview API; the generate-document route confirms AI document generation. The README describes unique-link sharing, but the dynamic document pages and parts of interview persistence were not sampled, so those connections are left uncertain.

Main entry points: [`app/interview/page.tsx`](https://github.com/jjaanngg/renewal_isig/blob/main/app/interview/page.tsx) (Interview flow), [`lib/supabase.ts`](https://github.com/jjaanngg/renewal_isig/blob/main/lib/supabase.ts) (Supabase client), [`app/api/generate-doc/route.ts`](https://github.com/jjaanngg/renewal_isig/blob/main/app/api/generate-doc/route.ts) (Document generation API), [`app/login/page.tsx`](https://github.com/jjaanngg/renewal_isig/blob/main/app/login/page.tsx) (Google sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_login["Google sign-in<br/>[page.tsx]"]
  node_home["Workspace home<br/>[page.tsx]"]
  node_home_docs["Home document list<br/>[page.tsx]"]
end

subgraph group_workflow["Interview and generation"]
  node_interview_ui["Interview flow<br/>[page.tsx]"]
  node_interview_api["Interview API<br/>[route.ts]"]
  node_generate_api["Document generation API<br/>[route.ts]"]
end

subgraph group_documents["Document experience"]
  node_report["Report renderer<br/>[ReportView.tsx]"]
  node_shared_doc["Shared document view<br/>[page.tsx]"]
  node_edit_doc["Document editor<br/>[page.tsx]"]
  node_my_docs["Document library<br/>[page.tsx]"]
end

subgraph group_integrations["External services"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase_auth["Supabase Auth"]
  node_supabase_store[("Supabase data store")]
  node_gemini["Gemini API"]
end

node_person(("User"))

node_person -->|"opens"| node_landing
node_landing -->|"checks session"| node_supabase_client
node_landing -->|"starts"| node_login
node_person -->|"signs in"| node_login
node_login -->|"requests OAuth"| node_supabase_client
node_supabase_client -->|"authenticates"| node_supabase_auth
node_supabase_auth -->|"returns session"| node_login
node_login -->|"redirects"| node_home
node_home -->|"checks user"| node_supabase_client
node_home -->|"reads documents"| node_supabase_store
node_person -->|"starts interview"| node_interview_ui
node_interview_ui -->|"checks session"| node_supabase_client
node_interview_ui -->|"sends answers"| node_interview_api
node_interview_api -->|"validates token"| node_supabase_auth
node_interview_api -->|"generates questions"| node_gemini
node_interview_api -->|"returns question"| node_interview_ui
node_interview_ui -->|"requests document"| node_generate_api
node_generate_api -->|"validates token"| node_supabase_auth
node_generate_api -->|"checks session count"| node_supabase_store
node_generate_api -->|"generates checklist"| node_gemini
node_generate_api -->|"returns document"| node_interview_ui
node_interview_ui -->|"renders result"| node_report
node_person -->|"browses library"| node_my_docs
node_my_docs -->|"queries documents"| node_supabase_client
node_my_docs -->|"reads documents"| node_supabase_store
node_person -.->|"opens link"| node_shared_doc
node_person -->|"edits document"| node_edit_doc

click node_landing "https://github.com/jjaanngg/renewal_isig/blob/main/app/page.tsx"
click node_login "https://github.com/jjaanngg/renewal_isig/blob/main/app/login/page.tsx"
click node_home "https://github.com/jjaanngg/renewal_isig/blob/main/app/home/page.tsx"
click node_interview_ui "https://github.com/jjaanngg/renewal_isig/blob/main/app/interview/page.tsx"
click node_interview_api "https://github.com/jjaanngg/renewal_isig/blob/main/app/api/interview/route.ts"
click node_generate_api "https://github.com/jjaanngg/renewal_isig/blob/main/app/api/generate-doc/route.ts"
click node_report "https://github.com/jjaanngg/renewal_isig/blob/main/components/ReportView.tsx"
click node_shared_doc "https://github.com/jjaanngg/renewal_isig/blob/main/app/docs/%5Bslug%5D/page.tsx"
click node_edit_doc "https://github.com/jjaanngg/renewal_isig/blob/main/app/docs/%5Bslug%5D/edit/page.tsx"
click node_my_docs "https://github.com/jjaanngg/renewal_isig/blob/main/app/my/page.tsx"
click node_home_docs "https://github.com/jjaanngg/renewal_isig/blob/main/app/home/page.tsx"
click node_supabase_client "https://github.com/jjaanngg/renewal_isig/blob/main/lib/supabase.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_login,node_home,node_home_docs,node_person toneBlue
class node_interview_ui,node_interview_api,node_generate_api toneAmber
class node_report,node_shared_doc,node_edit_doc,node_my_docs toneMint
class node_supabase_client,node_supabase_auth,node_supabase_store,node_gemini toneRose
```

## Components

### Entry and identity

- [Landing page](https://github.com/jjaanngg/renewal_isig/blob/main/app/page.tsx): `app/page.tsx`
- [Google sign-in](https://github.com/jjaanngg/renewal_isig/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Workspace home](https://github.com/jjaanngg/renewal_isig/blob/main/app/home/page.tsx): `app/home/page.tsx`
- [Home document list](https://github.com/jjaanngg/renewal_isig/blob/main/app/home/page.tsx): `app/home/page.tsx`

### Interview and generation

- [Interview flow](https://github.com/jjaanngg/renewal_isig/blob/main/app/interview/page.tsx): `app/interview/page.tsx`
- [Interview API](https://github.com/jjaanngg/renewal_isig/blob/main/app/api/interview/route.ts): `app/api/interview/route.ts`
- [Document generation API](https://github.com/jjaanngg/renewal_isig/blob/main/app/api/generate-doc/route.ts): `app/api/generate-doc/route.ts`

### Document experience

- [Report renderer](https://github.com/jjaanngg/renewal_isig/blob/main/components/ReportView.tsx): `components/ReportView.tsx`
- [Shared document view](https://github.com/jjaanngg/renewal_isig/blob/main/app/docs/%5Bslug%5D/page.tsx): `app/docs/[slug]/page.tsx`
- [Document editor](https://github.com/jjaanngg/renewal_isig/blob/main/app/docs/%5Bslug%5D/edit/page.tsx): `app/docs/[slug]/edit/page.tsx`
- [Document library](https://github.com/jjaanngg/renewal_isig/blob/main/app/my/page.tsx): `app/my/page.tsx`

### External services

- [Supabase client](https://github.com/jjaanngg/renewal_isig/blob/main/lib/supabase.ts): `lib/supabase.ts`
- **Supabase Auth**
- **Supabase data store**
- **Gemini API**

### Other components

- **User**

## Connections

- User → Landing page: opens
- Landing page → Supabase client: checks session
- Landing page → Google sign-in: starts
- User → Google sign-in: signs in
- Google sign-in → Supabase client: requests OAuth
- Supabase client → Supabase Auth: authenticates
- Supabase Auth → Google sign-in: returns session
- Google sign-in → Workspace home: redirects
- Workspace home → Supabase client: checks user
- Workspace home → Supabase data store: reads documents
- User → Interview flow: starts interview
- Interview flow → Supabase client: checks session
- Interview flow → Interview API: sends answers
- Interview API → Supabase Auth: validates token
- Interview API → Gemini API: generates questions
- Interview API → Interview flow: returns question
- Interview flow → Document generation API: requests document
- Document generation API → Supabase Auth: validates token
- Document generation API → Supabase data store: checks session count
- Document generation API → Gemini API: generates checklist
- Document generation API → Interview flow: returns document
- Interview flow → Report renderer: renders result
- User → Document library: browses library
- Document library → Supabase client: queries documents
- Document library → Supabase data store: reads documents
- User → Shared document view: opens link
- User → Document editor: edits document
