# snehalbhattacharjee038-cloud/roadmap-dynamo-ai architecture

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

- Interactive diagram: https://gitdiagram.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai
- Repository: https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai

## Overview

#### Purpose and Entry Points
This is a Vite-based React/TypeScript single-page application for generating and presenting career roadmaps, including field information, salary context, learning resources, phased plans, and chatbot assistance. Browser bootstrap occurs at `src/main.tsx`; top-level application composition is in `src/App.tsx`, with the main route/page in `src/pages/Index.tsx`.

#### UI Composition and Roadmap Workspace
`src/pages/Index.tsx` likely orchestrates the user journey: collect career goals, request a generated roadmap, and render its results. `src/components/InputForm.tsx` is the primary input boundary. Result-oriented panels are separated by concern:
- `src/components/RoadmapVisualization.tsx`
- `src/components/RoadmapPhases.tsx`
- `src/components/FieldInfo.tsx`
- `src/components/SalaryPanel.tsx`
- `src/components/ResourcesPanel.tsx`

This decomposition makes generated roadmap data the central client-side domain object consumed by several presentation components.

#### Domain Model and Client Data Boundary
Roadmap-shaped TypeScript contracts are defined in `src/types/roadmap.ts`. Frontend API access is centralized in `src/lib/api.ts`, creating a boundary between UI components and remote generation/chat services. PDF generation/export is isolated in `src/lib/pdfExport.ts`, allowing roadmap output to move from the rendered application into a downloadable document without coupling export behavior to individual panels.

#### AI/Backend Generation Pipeline
Supabase Edge Functions provide backend execution for two primary workflows:
- `supabase/functions/generate-roadmap/index.ts` receives career-input requests and returns structured roadmap content.
- `supabase/functions/chat/index.ts` supports conversational assistance for `src/components/Chatbot.tsx`.

The expected control flow is: `InputForm` → `src/lib/api.ts` → Supabase function → typed roadmap response → page state → roadmap, resource, salary, and field-information panels. Chat follows a parallel UI-to-function request/response path.

#### Supabase Integration
The browser client is configured under `src/integrations/supabase/client.ts`, with generated or maintained service typings in `src/integrations/supabase/types.ts`. Edge-function and local Supabase configuration live under `supabase/functions/` and `supabase/config.toml`. Supabase is therefore the material external platform boundary for server-side logic; credentials/runtime configuration are expected to come from `.env` rather than client components.

#### Navigation, Styling, and Shared UI Foundation
Application-level styling begins in `src/index.css` and `src/App.css`. Reusable UI primitives are supplied under `src/components/ui/`, while application-specific navigation is represented by `src/components/NavLink.tsx`. Tailwind/PostCSS configuration (`tailwind.config.ts`, `postcss.config.js`) indicates utility-first styling alongside component-local composition.

#### Runtime and Delivery Shape
The frontend runs as a Vite client application (`vite.config.ts`, `src/main.tsx`) and is deployable independently from Supabase Edge Functions. Static public assets are served from `public/`, including `public/robots.txt`. The backend functions run in the Supabase Edge Runtime rather than in the browser, keeping generation and chat provider interactions outside the client trust boundary.

Main entry points: [`src/pages/Index.tsx`](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/pages/Index.tsx) (Roadmap workspace), [`src/integrations/supabase/client.ts`](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/integrations/supabase/client.ts) (Supabase browser client), [`src/lib/api.ts`](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/lib/api.ts) (API boundary), [`src/App.tsx`](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/App.tsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser SPA"]
  node_vite{{"Vite bootstrap<br/>client entry<br/>[main.tsx]"}}
  node_app["App shell<br/>React composition<br/>[App.tsx]"]
  node_index["Roadmap workspace<br/>page<br/>[Index.tsx]"]
  node_input["Career input form<br/>input UI<br/>[InputForm.tsx]"]
  node_roadmap_type["Roadmap contracts<br/>TypeScript model<br/>[roadmap.ts]"]
  node_api["API boundary<br/>client service<br/>[api.ts]"]
  node_roadmap_view["Roadmap visualization<br/>result panel"]
  node_phases["Roadmap phases<br/>result panel<br/>[RoadmapPhases.tsx]"]
  node_field_info["Field information<br/>result panel<br/>[FieldInfo.tsx]"]
  node_salary["Salary panel<br/>result panel<br/>[SalaryPanel.tsx]"]
  node_resources["Resources panel<br/>result panel<br/>[ResourcesPanel.tsx]"]
  node_pdf["PDF export<br/>export service<br/>[pdfExport.ts]"]
  node_chatbot["Chatbot<br/>assistant UI<br/>[Chatbot.tsx]"]
  node_supabase_client["Supabase browser client<br/>platform client<br/>[client.ts]"]
end

subgraph group_edge["Supabase Edge Runtime"]
  node_generate_fn{{"Generate roadmap<br/>edge function<br/>[index.ts]"}}
  node_chat_fn{{"Chat service<br/>edge function<br/>[index.ts]"}}
end

node_vite -->|"mounts"| node_app
node_app -->|"renders"| node_index
node_index -->|"collects goals"| node_input
node_input -->|"generation request"| node_api
node_api -->|"uses"| node_supabase_client
node_supabase_client -->|"invokes"| node_generate_fn
node_generate_fn -.->|"returns typed roadmap"| node_roadmap_type
node_roadmap_type -->|"page state"| node_index
node_index -->|"renders roadmap"| node_roadmap_view
node_index -->|"renders phases"| node_phases
node_index -->|"renders field context"| node_field_info
node_index -->|"renders salary context"| node_salary
node_index -->|"renders resources"| node_resources
node_index -->|"exports roadmap"| node_pdf
node_index -->|"hosts assistant"| node_chatbot
node_chatbot -->|"chat request"| node_api
node_supabase_client -->|"invokes"| node_chat_fn

click node_vite "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/main.tsx"
click node_app "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/App.tsx"
click node_index "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/pages/Index.tsx"
click node_input "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/InputForm.tsx"
click node_roadmap_type "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/types/roadmap.ts"
click node_api "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/lib/api.ts"
click node_roadmap_view "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/RoadmapVisualization.tsx"
click node_phases "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/RoadmapPhases.tsx"
click node_field_info "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/FieldInfo.tsx"
click node_salary "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/SalaryPanel.tsx"
click node_resources "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/ResourcesPanel.tsx"
click node_pdf "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/lib/pdfExport.ts"
click node_chatbot "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/Chatbot.tsx"
click node_supabase_client "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/integrations/supabase/client.ts"
click node_generate_fn "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/supabase/functions/generate-roadmap/index.ts"
click node_chat_fn "https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/supabase/functions/chat/index.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_vite,node_app,node_index,node_input,node_roadmap_type,node_api,node_roadmap_view,node_phases,node_field_info,node_salary,node_resources,node_pdf,node_chatbot,node_supabase_client toneBlue
class node_generate_fn,node_chat_fn toneAmber
```

## Components

### Browser SPA

Vite-served React application.

- [Vite bootstrap](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/main.tsx): client entry · `src/main.tsx`
- [App shell](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/App.tsx): React composition · `src/App.tsx`
- [Roadmap workspace](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/pages/Index.tsx): page · Owns the career-input and generated-roadmap journey. · `src/pages/Index.tsx`
- [Career input form](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/InputForm.tsx): input UI · `src/components/InputForm.tsx`
- [Roadmap contracts](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/types/roadmap.ts): TypeScript model · Shared shape for generated roadmap data. · `src/types/roadmap.ts`
- [API boundary](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/lib/api.ts): client service · Centralizes calls to remote roadmap and chat services. · `src/lib/api.ts`
- [Roadmap visualization](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/RoadmapVisualization.tsx): result panel · `src/components/RoadmapVisualization.tsx`
- [Roadmap phases](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/RoadmapPhases.tsx): result panel · `src/components/RoadmapPhases.tsx`
- [Field information](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/FieldInfo.tsx): result panel · `src/components/FieldInfo.tsx`
- [Salary panel](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/SalaryPanel.tsx): result panel · `src/components/SalaryPanel.tsx`
- [Resources panel](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/ResourcesPanel.tsx): result panel · `src/components/ResourcesPanel.tsx`
- [PDF export](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/lib/pdfExport.ts): export service · Converts roadmap output into a downloadable document. · `src/lib/pdfExport.ts`
- [Chatbot](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/components/Chatbot.tsx): assistant UI · `src/components/Chatbot.tsx`
- [Supabase browser client](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/src/integrations/supabase/client.ts): platform client · `src/integrations/supabase/client.ts`

### Supabase Edge Runtime

Server-side generation and chat boundary.

- [Generate roadmap](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/supabase/functions/generate-roadmap/index.ts): edge function · Builds structured roadmap content from career input. · `supabase/functions/generate-roadmap/index.ts`
- [Chat service](https://github.com/snehalbhattacharjee038-cloud/roadmap-dynamo-ai/blob/main/supabase/functions/chat/index.ts): edge function · Handles conversational assistance requests. · `supabase/functions/chat/index.ts`

## Connections

- Vite bootstrap → App shell: mounts
- App shell → Roadmap workspace: renders
- Roadmap workspace → Career input form: collects goals
- Career input form → API boundary: generation request
- API boundary → Supabase browser client: uses
- Supabase browser client → Generate roadmap: invokes
- Generate roadmap → Roadmap contracts: returns typed roadmap
- Roadmap contracts → Roadmap workspace: page state
- Roadmap workspace → Roadmap visualization: renders roadmap
- Roadmap workspace → Roadmap phases: renders phases
- Roadmap workspace → Field information: renders field context
- Roadmap workspace → Salary panel: renders salary context
- Roadmap workspace → Resources panel: renders resources
- Roadmap workspace → PDF export: exports roadmap
- Roadmap workspace → Chatbot: hosts assistant
- Chatbot → API boundary: chat request
- Supabase browser client → Chat service: invokes
