# anup4944/resume-builder architecture

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

- Interactive diagram: https://gitdiagram.com/anup4944/resume-builder
- Repository: https://github.com/anup4944/resume-builder

## Overview

This is a resume-building web application: users create and edit resume content, preview its formatted output, and have changes saved; resume limits, premium customization, and subscriptions add monetization controls. The tree and source index also show AI-assisted writing and Stripe billing/webhook handling. Several route and form implementations were not sampled, so uncertain runtime links are omitted rather than inferred; indexed imports support the cited connections below.

Main entry points: [`src/app/(main)/resumes/page.tsx`](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/page.tsx) (Resume library), [`src/app/(main)/editor/actions.ts`](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/actions.ts) (Resume persistence), [`src/lib/subscription.ts`](https://github.com/anup4944/resume-builder/blob/master/src/lib/subscription.ts) (Subscription lookup), [`src/lib/prisma.ts`](https://github.com/anup4944/resume-builder/blob/master/src/lib/prisma.ts) (Application database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Resume authoring"]
  node_resume_list["Resume library<br/>[page.tsx]"]
  node_resume_item["Resume item actions<br/>[ResumeItem.tsx]"]
  node_resume_create["Create resume"]
  node_editor["Resume editor<br/>[page.tsx]"]
  node_editor_forms["Resume forms"]
  node_editor_actions["Resume persistence<br/>[actions.ts]"]
  node_autosave["Autosave"]
  node_preview_section["Preview controls"]
  node_resume_preview["Resume preview<br/>[ResumePreview.tsx]"]
  node_ai_writing["AI writing tools"]
end

subgraph group_accounts["Accounts and access"]
  node_auth["Sign-in and sign-up"]
end

subgraph group_monetization["Subscriptions and billing"]
  node_subscription_level["Subscription level"]
  node_permissions["Plan permissions<br/>[permission.ts]"]
  node_subscription_data["Subscription lookup<br/>[subscription.ts]"]
  node_billing["Billing page<br/>[page.tsx]"]
  node_billing_actions["Billing actions<br/>[actions.ts]"]
  node_premium_modal["Upgrade prompt<br/>[PremiumModal.tsx]"]
  node_stripe_checkout["Checkout actions<br/>[actions.ts]"]
  node_stripe_webhook["Stripe webhook<br/>[route.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_db[("Application database<br/>[prisma.ts]")]
  node_validation["Resume validation<br/>[validation.ts]"]
  node_resume_mapping["Resume data mapping<br/>[utils.ts]"]
end

node_user(("User"))
node_stripe["Stripe"]
node_openai["OpenAI service"]

node_user -.->|"opens library"| node_resume_list
node_resume_list -->|"renders items"| node_resume_item
node_resume_list -->|"offers creation"| node_resume_create
node_resume_list -->|"loads resumes"| node_db
node_resume_list -->|"checks plan"| node_subscription_data
node_resume_list -->|"checks limits"| node_permissions
node_resume_item -->|"renders preview"| node_resume_preview
node_resume_item -->|"uses helpers"| node_resume_mapping
node_resume_item -.->|"offers editing"| node_user
node_user -.->|"edits resume"| node_editor
node_editor -.->|"presents forms"| node_editor_forms
node_editor -.->|"autosaves changes"| node_autosave
node_autosave -->|"calls save"| node_editor_actions
node_editor_actions -->|"persists resume"| node_db
node_editor_actions -->|"validates data"| node_validation
node_editor_actions -->|"checks subscription"| node_subscription_data
node_editor_actions -->|"checks access"| node_permissions
node_editor -.->|"shows preview"| node_preview_section
node_preview_section -->|"renders resume"| node_resume_preview
node_preview_section -->|"uses resume schema"| node_validation
node_resume_preview -->|"uses resume values"| node_validation
node_editor_forms -.->|"includes tools"| node_ai_writing
node_ai_writing -.->|"generates content"| node_openai
node_user -.->|"authenticates"| node_auth
node_billing -->|"reads subscription"| node_db
node_billing -->|"uses billing API"| node_stripe
node_billing -.->|"offers management"| node_billing_actions
node_billing_actions -.->|"manages billing"| node_stripe
node_premium_modal -->|"starts upgrade"| node_stripe_checkout
node_stripe_checkout -->|"creates checkout"| node_stripe
node_stripe -.->|"sends events"| node_stripe_webhook
node_stripe_webhook -->|"updates subscription"| node_db
node_subscription_level -.->|"provides plan"| node_subscription_data
node_subscription_data -->|"reads plan record"| node_db
node_permissions -->|"uses plan type"| node_subscription_data

click node_resume_list "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/page.tsx"
click node_resume_item "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/ResumeItem.tsx"
click node_resume_create "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/CreateResumeBtn.tsx"
click node_editor "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/page.tsx"
click node_editor_forms "https://github.com/anup4944/resume-builder/tree/master/src/app/(main)/editor/forms"
click node_editor_actions "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/actions.ts"
click node_autosave "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/useAutoSaveResume.tsx"
click node_preview_section "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/ResumePreviewSection.tsx"
click node_resume_preview "https://github.com/anup4944/resume-builder/blob/master/src/components/ResumePreview.tsx"
click node_ai_writing "https://github.com/anup4944/resume-builder/tree/master/src/app/(main)/editor/forms"
click node_auth "https://github.com/anup4944/resume-builder/tree/master/src/app/(auth)"
click node_subscription_level "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/SubscriptionLevelProvider.tsx"
click node_permissions "https://github.com/anup4944/resume-builder/blob/master/src/lib/permission.ts"
click node_subscription_data "https://github.com/anup4944/resume-builder/blob/master/src/lib/subscription.ts"
click node_billing "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/billing/page.tsx"
click node_billing_actions "https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/billing/actions.ts"
click node_premium_modal "https://github.com/anup4944/resume-builder/blob/master/src/components/premium/PremiumModal.tsx"
click node_stripe_checkout "https://github.com/anup4944/resume-builder/blob/master/src/components/premium/actions.ts"
click node_stripe_webhook "https://github.com/anup4944/resume-builder/blob/master/src/app/api/stripe-webhook/route.ts"
click node_db "https://github.com/anup4944/resume-builder/blob/master/src/lib/prisma.ts"
click node_validation "https://github.com/anup4944/resume-builder/blob/master/src/lib/validation.ts"
click node_resume_mapping "https://github.com/anup4944/resume-builder/blob/master/src/lib/utils.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_resume_list,node_resume_item,node_resume_create,node_editor,node_editor_forms,node_editor_actions,node_autosave,node_preview_section,node_resume_preview,node_ai_writing,node_user toneBlue
class node_auth toneAmber
class node_subscription_level,node_permissions,node_subscription_data,node_billing,node_billing_actions,node_premium_modal,node_stripe_checkout,node_stripe_webhook toneMint
class node_db,node_validation,node_resume_mapping toneRose
class node_stripe,node_openai toneIndigo
```

## Components

### Resume authoring

- [Resume library](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/page.tsx): `src/app/(main)/resumes/page.tsx`
- [Resume item actions](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/ResumeItem.tsx): `src/app/(main)/resumes/ResumeItem.tsx`
- [Create resume](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/resumes/CreateResumeBtn.tsx): `src/app/(main)/resumes/CreateResumeBtn.tsx`
- [Resume editor](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/page.tsx): `src/app/(main)/editor/page.tsx`
- [Resume forms](https://github.com/anup4944/resume-builder/tree/master/src/app/(main)/editor/forms): `src/app/(main)/editor/forms`
- [Resume persistence](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/actions.ts): `src/app/(main)/editor/actions.ts`
- [Autosave](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/useAutoSaveResume.tsx): `src/app/(main)/editor/useAutoSaveResume.tsx`
- [Preview controls](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/editor/ResumePreviewSection.tsx): `src/app/(main)/editor/ResumePreviewSection.tsx`
- [Resume preview](https://github.com/anup4944/resume-builder/blob/master/src/components/ResumePreview.tsx): `src/components/ResumePreview.tsx`
- [AI writing tools](https://github.com/anup4944/resume-builder/tree/master/src/app/(main)/editor/forms): `src/app/(main)/editor/forms`

### Accounts and access

- [Sign-in and sign-up](https://github.com/anup4944/resume-builder/tree/master/src/app/(auth)): `src/app/(auth)`

### Subscriptions and billing

- [Subscription level](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/SubscriptionLevelProvider.tsx): `src/app/(main)/SubscriptionLevelProvider.tsx`
- [Plan permissions](https://github.com/anup4944/resume-builder/blob/master/src/lib/permission.ts): `src/lib/permission.ts`
- [Subscription lookup](https://github.com/anup4944/resume-builder/blob/master/src/lib/subscription.ts): `src/lib/subscription.ts`
- [Billing page](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/billing/page.tsx): `src/app/(main)/billing/page.tsx`
- [Billing actions](https://github.com/anup4944/resume-builder/blob/master/src/app/(main)/billing/actions.ts): `src/app/(main)/billing/actions.ts`
- [Upgrade prompt](https://github.com/anup4944/resume-builder/blob/master/src/components/premium/PremiumModal.tsx): `src/components/premium/PremiumModal.tsx`
- [Checkout actions](https://github.com/anup4944/resume-builder/blob/master/src/components/premium/actions.ts): `src/components/premium/actions.ts`
- [Stripe webhook](https://github.com/anup4944/resume-builder/blob/master/src/app/api/stripe-webhook/route.ts): `src/app/api/stripe-webhook/route.ts`

### Shared runtime

- [Application database](https://github.com/anup4944/resume-builder/blob/master/src/lib/prisma.ts): `src/lib/prisma.ts`
- [Resume validation](https://github.com/anup4944/resume-builder/blob/master/src/lib/validation.ts): `src/lib/validation.ts`
- [Resume data mapping](https://github.com/anup4944/resume-builder/blob/master/src/lib/utils.ts): `src/lib/utils.ts`

### Other components

- **User**
- **Stripe**
- **OpenAI service**

## Connections

- User → Resume library: opens library
- Resume library → Resume item actions: renders items (evidence: `src/app/(main)/resumes/page.tsx`)
- Resume library → Create resume: offers creation (evidence: `src/app/(main)/resumes/page.tsx`)
- Resume library → Application database: loads resumes (evidence: `src/app/(main)/resumes/page.tsx`)
- Resume library → Subscription lookup: checks plan (evidence: `src/app/(main)/resumes/page.tsx`)
- Resume library → Plan permissions: checks limits (evidence: `src/app/(main)/resumes/page.tsx`)
- Resume item actions → Resume preview: renders preview (evidence: `src/app/(main)/resumes/ResumeItem.tsx`)
- Resume item actions → Resume data mapping: uses helpers (evidence: `src/app/(main)/resumes/ResumeItem.tsx`)
- Resume item actions → User: offers editing
- User → Resume editor: edits resume
- Resume editor → Resume forms: presents forms
- Resume editor → Autosave: autosaves changes
- Autosave → Resume persistence: calls save (evidence: `src/app/(main)/editor/useAutoSaveResume.tsx`)
- Resume persistence → Application database: persists resume (evidence: `src/app/(main)/editor/actions.ts`)
- Resume persistence → Resume validation: validates data (evidence: `src/app/(main)/editor/actions.ts`)
- Resume persistence → Subscription lookup: checks subscription (evidence: `src/app/(main)/editor/actions.ts`)
- Resume persistence → Plan permissions: checks access (evidence: `src/app/(main)/editor/actions.ts`)
- Resume editor → Preview controls: shows preview
- Preview controls → Resume preview: renders resume (evidence: `src/app/(main)/editor/ResumePreviewSection.tsx`)
- Preview controls → Resume validation: uses resume schema (evidence: `src/app/(main)/editor/ResumePreviewSection.tsx`)
- Resume preview → Resume validation: uses resume values (evidence: `src/components/ResumePreview.tsx`)
- Resume forms → AI writing tools: includes tools
- AI writing tools → OpenAI service: generates content
- User → Sign-in and sign-up: authenticates
- Billing page → Application database: reads subscription (evidence: `src/app/(main)/billing/page.tsx`)
- Billing page → Stripe: uses billing API (evidence: `src/app/(main)/billing/page.tsx`)
- Billing page → Billing actions: offers management
- Billing actions → Stripe: manages billing
- Upgrade prompt → Checkout actions: starts upgrade (evidence: `src/components/premium/PremiumModal.tsx`)
- Checkout actions → Stripe: creates checkout (evidence: `src/components/premium/actions.ts`)
- Stripe → Stripe webhook: sends events
- Stripe webhook → Application database: updates subscription (evidence: `src/app/api/stripe-webhook/route.ts`)
- Subscription level → Subscription lookup: provides plan
- Subscription lookup → Application database: reads plan record (evidence: `src/lib/subscription.ts`)
- Plan permissions → Subscription lookup: uses plan type (evidence: `src/lib/permission.ts`)
