# rayaneyajjou/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/rayaneyajjou/portfolio
- Repository: https://github.com/rayaneyajjou/portfolio

## Overview

Rayane Yajjou’s bilingual portfolio also provides a job-specific CV and cover-letter tool. Visitors browse profile content; job seekers tailor a CV from a pasted offer, review matching and gaps, and export or copy it. Owners edit profile data, configure AI providers, and publish updates. The graph preserves the documented AI, encrypted-vault, and letter capabilities; several unsampled modules are represented by their exact paths, with links omitted where runtime calls were not shown.

Main entry points: [`app/cv/page.tsx`](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/page.tsx) (CV tool), [`lib/providers.ts`](https://github.com/rayaneyajjou/portfolio/blob/main/lib/providers.ts) (AI providers), [`app/cv/letter/page.tsx`](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/letter/page.tsx) (Cover-letter tool), [`app/cv/AdviceView.tsx`](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/AdviceView.tsx) (Advice rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio"]
  node_portfolio_page["Portfolio page<br/>[page.tsx]"]
  node_profile_data["Profile content<br/>[profile.json]"]
  node_profile_types["Profile model<br/>[content.ts]"]
end

subgraph group_cv["CV tailoring"]
  node_cv_page["CV tool<br/>[page.tsx]"]
  node_tailoring["Offer matching<br/>[tailor.ts]"]
  node_taxonomy["Skill taxonomy<br/>[taxonomy.ts]"]
  node_cv_text["Plain-text CV<br/>[cvText.ts]"]
  node_docx["CV DOCX export<br/>[docxExport.ts]"]
  node_advice["Advice rendering<br/>[AdviceView.tsx]"]
end

subgraph group_writing["AI writing"]
  node_letter_page["Cover-letter tool<br/>[page.tsx]"]
  node_letter_logic["Letter generation<br/>[letter.ts]"]
  node_letter_docx["Letter DOCX export<br/>[letterDocx.ts]"]
  node_ai["AI orchestration<br/>[ai.ts]"]
  node_providers["AI providers<br/>[providers.ts]"]
  node_ai_services{{"AI services"}}
  node_guard["Rewrite guard<br/>[guard.ts]"]
  node_slop["Cliché detection<br/>[slop.ts]"]
end

subgraph group_owner["Owner tools"]
  node_admin["Profile editor<br/>[page.tsx]"]
  node_github["GitHub publishing<br/>[github.ts]"]
  node_vault["Encrypted vault<br/>[vault.ts]"]
  node_owner_state["Owner settings<br/>[owner.ts]"]
end

subgraph group_shared["Shared services"]
  node_local_store[("Browser storage<br/>[store.ts]")]
  node_unlock_bar["Vault unlock UI<br/>[UnlockBar.tsx]"]
  node_copy_bar["Copy control<br/>[CopyBar.tsx]"]
  node_clipboard["Clipboard actions<br/>[clipboard.ts]"]
  node_markdown["Markdown renderer<br/>[markdown.tsx]"]
end

node_visitor(("Visitor"))
node_jobseeker(("Job seeker"))
node_owner_user(("Owner"))

node_visitor -->|"browses"| node_portfolio_page
node_portfolio_page -->|"loads content"| node_profile_types
node_profile_types -->|"imports profile"| node_profile_data
node_jobseeker -->|"enters offer"| node_cv_page
node_cv_page -->|"tailors CV"| node_tailoring
node_tailoring -->|"matches skills"| node_taxonomy
node_tailoring -->|"reads profile"| node_profile_types
node_cv_page -->|"formats text"| node_cv_text
node_cv_page -->|"exports DOCX"| node_docx
node_cv_page -->|"renders advice"| node_advice
node_cv_page -->|"requests advice"| node_ai
node_cv_page -->|"checks rewrite"| node_guard
node_cv_page -->|"selects provider"| node_providers
node_jobseeker -->|"creates letter"| node_letter_page
node_letter_page -->|"builds letter"| node_letter_logic
node_letter_page -->|"exports DOCX"| node_letter_docx
node_letter_page -->|"uses providers"| node_providers
node_letter_page -->|"checks clichés"| node_slop
node_ai -->|"calls providers"| node_providers
node_providers -->|"sends requests"| node_ai_services
node_owner_user -->|"edits profile"| node_admin
node_admin -->|"publishes commit"| node_github
node_admin -->|"stores secrets"| node_vault
node_admin -->|"configures AI"| node_providers
node_owner_state -->|"reads secrets"| node_vault
node_owner_state -->|"reads settings"| node_local_store
node_vault -->|"stores ciphertext"| node_local_store
node_unlock_bar -->|"unlocks vault"| node_vault
node_advice -->|"copies response"| node_clipboard
node_advice -->|"uses control"| node_copy_bar
node_advice -->|"renders Markdown"| node_markdown
node_providers -->|"saves status"| node_local_store

click node_portfolio_page "https://github.com/rayaneyajjou/portfolio/blob/main/app/page.tsx"
click node_profile_data "https://github.com/rayaneyajjou/portfolio/blob/main/data/profile.json"
click node_profile_types "https://github.com/rayaneyajjou/portfolio/blob/main/app/content.ts"
click node_admin "https://github.com/rayaneyajjou/portfolio/blob/main/app/admin/page.tsx"
click node_github "https://github.com/rayaneyajjou/portfolio/blob/main/lib/github.ts"
click node_cv_page "https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/page.tsx"
click node_tailoring "https://github.com/rayaneyajjou/portfolio/blob/main/lib/tailor.ts"
click node_taxonomy "https://github.com/rayaneyajjou/portfolio/blob/main/lib/taxonomy.ts"
click node_cv_text "https://github.com/rayaneyajjou/portfolio/blob/main/lib/cvText.ts"
click node_docx "https://github.com/rayaneyajjou/portfolio/blob/main/lib/docxExport.ts"
click node_advice "https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/AdviceView.tsx"
click node_letter_page "https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/letter/page.tsx"
click node_letter_logic "https://github.com/rayaneyajjou/portfolio/blob/main/lib/letter.ts"
click node_letter_docx "https://github.com/rayaneyajjou/portfolio/blob/main/lib/letterDocx.ts"
click node_ai "https://github.com/rayaneyajjou/portfolio/blob/main/lib/ai.ts"
click node_providers "https://github.com/rayaneyajjou/portfolio/blob/main/lib/providers.ts"
click node_guard "https://github.com/rayaneyajjou/portfolio/blob/main/lib/guard.ts"
click node_slop "https://github.com/rayaneyajjou/portfolio/blob/main/lib/slop.ts"
click node_vault "https://github.com/rayaneyajjou/portfolio/blob/main/lib/vault.ts"
click node_owner_state "https://github.com/rayaneyajjou/portfolio/blob/main/lib/owner.ts"
click node_local_store "https://github.com/rayaneyajjou/portfolio/blob/main/lib/store.ts"
click node_unlock_bar "https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/UnlockBar.tsx"
click node_copy_bar "https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/CopyBar.tsx"
click node_clipboard "https://github.com/rayaneyajjou/portfolio/blob/main/lib/clipboard.ts"
click node_markdown "https://github.com/rayaneyajjou/portfolio/blob/main/lib/markdown.tsx"

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_portfolio_page,node_profile_data,node_profile_types toneBlue
class node_cv_page,node_tailoring,node_taxonomy,node_cv_text,node_docx,node_advice toneAmber
class node_letter_page,node_letter_logic,node_letter_docx,node_ai,node_providers,node_ai_services,node_guard,node_slop toneMint
class node_admin,node_github,node_vault,node_owner_state toneRose
class node_local_store,node_unlock_bar,node_copy_bar,node_clipboard,node_markdown,node_visitor,node_jobseeker,node_owner_user toneIndigo
```

## Components

### Portfolio

- [Portfolio page](https://github.com/rayaneyajjou/portfolio/blob/main/app/page.tsx): `app/page.tsx`
- [Profile content](https://github.com/rayaneyajjou/portfolio/blob/main/data/profile.json): `data/profile.json`
- [Profile model](https://github.com/rayaneyajjou/portfolio/blob/main/app/content.ts): `app/content.ts`

### CV tailoring

- [CV tool](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/page.tsx): `app/cv/page.tsx`
- [Offer matching](https://github.com/rayaneyajjou/portfolio/blob/main/lib/tailor.ts): `lib/tailor.ts`
- [Skill taxonomy](https://github.com/rayaneyajjou/portfolio/blob/main/lib/taxonomy.ts): `lib/taxonomy.ts`
- [Plain-text CV](https://github.com/rayaneyajjou/portfolio/blob/main/lib/cvText.ts): `lib/cvText.ts`
- [CV DOCX export](https://github.com/rayaneyajjou/portfolio/blob/main/lib/docxExport.ts): `lib/docxExport.ts`
- [Advice rendering](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/AdviceView.tsx): `app/cv/AdviceView.tsx`

### AI writing

- [Cover-letter tool](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/letter/page.tsx): `app/cv/letter/page.tsx`
- [Letter generation](https://github.com/rayaneyajjou/portfolio/blob/main/lib/letter.ts): `lib/letter.ts`
- [Letter DOCX export](https://github.com/rayaneyajjou/portfolio/blob/main/lib/letterDocx.ts): `lib/letterDocx.ts`
- [AI orchestration](https://github.com/rayaneyajjou/portfolio/blob/main/lib/ai.ts): `lib/ai.ts`
- [AI providers](https://github.com/rayaneyajjou/portfolio/blob/main/lib/providers.ts): `lib/providers.ts`
- **AI services**
- [Rewrite guard](https://github.com/rayaneyajjou/portfolio/blob/main/lib/guard.ts): `lib/guard.ts`
- [Cliché detection](https://github.com/rayaneyajjou/portfolio/blob/main/lib/slop.ts): `lib/slop.ts`

### Owner tools

- [Profile editor](https://github.com/rayaneyajjou/portfolio/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [GitHub publishing](https://github.com/rayaneyajjou/portfolio/blob/main/lib/github.ts): `lib/github.ts`
- [Encrypted vault](https://github.com/rayaneyajjou/portfolio/blob/main/lib/vault.ts): `lib/vault.ts`
- [Owner settings](https://github.com/rayaneyajjou/portfolio/blob/main/lib/owner.ts): `lib/owner.ts`

### Shared services

- [Browser storage](https://github.com/rayaneyajjou/portfolio/blob/main/lib/store.ts): `lib/store.ts`
- [Vault unlock UI](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/UnlockBar.tsx): `app/cv/UnlockBar.tsx`
- [Copy control](https://github.com/rayaneyajjou/portfolio/blob/main/app/cv/CopyBar.tsx): `app/cv/CopyBar.tsx`
- [Clipboard actions](https://github.com/rayaneyajjou/portfolio/blob/main/lib/clipboard.ts): `lib/clipboard.ts`
- [Markdown renderer](https://github.com/rayaneyajjou/portfolio/blob/main/lib/markdown.tsx): `lib/markdown.tsx`

### Other components

- **Visitor**
- **Job seeker**
- **Owner**

## Connections

- Visitor → Portfolio page: browses (evidence: `README.md`)
- Portfolio page → Profile model: loads content (evidence: `app/page.tsx`)
- Profile model → Profile content: imports profile (evidence: `app/content.ts`)
- Job seeker → CV tool: enters offer (evidence: `README.md`)
- CV tool → Offer matching: tailors CV (evidence: `app/cv/page.tsx`)
- Offer matching → Skill taxonomy: matches skills (evidence: `lib/tailor.ts`)
- Offer matching → Profile model: reads profile (evidence: `lib/tailor.ts`)
- CV tool → Plain-text CV: formats text (evidence: `app/cv/page.tsx`)
- CV tool → CV DOCX export: exports DOCX (evidence: `README.md`)
- CV tool → Advice rendering: renders advice (evidence: `app/cv/page.tsx`)
- CV tool → AI orchestration: requests advice (evidence: `app/cv/page.tsx`)
- CV tool → Rewrite guard: checks rewrite (evidence: `app/cv/page.tsx`)
- CV tool → AI providers: selects provider (evidence: `app/cv/page.tsx`)
- Job seeker → Cover-letter tool: creates letter (evidence: `README.md`)
- Cover-letter tool → Letter generation: builds letter (evidence: `app/cv/letter/page.tsx`)
- Cover-letter tool → Letter DOCX export: exports DOCX (evidence: `README.md`)
- Cover-letter tool → AI providers: uses providers (evidence: `app/cv/letter/page.tsx`)
- Cover-letter tool → Cliché detection: checks clichés (evidence: `README.md`)
- AI orchestration → AI providers: calls providers (evidence: `lib/ai.ts`)
- AI providers → AI services: sends requests (evidence: `lib/providers.ts`)
- Owner → Profile editor: edits profile (evidence: `README.md`)
- Profile editor → GitHub publishing: publishes commit (evidence: `app/admin/page.tsx`)
- Profile editor → Encrypted vault: stores secrets (evidence: `app/admin/page.tsx`)
- Profile editor → AI providers: configures AI (evidence: `app/admin/page.tsx`)
- Owner settings → Encrypted vault: reads secrets (evidence: `lib/owner.ts`)
- Owner settings → Browser storage: reads settings (evidence: `lib/owner.ts`)
- Encrypted vault → Browser storage: stores ciphertext (evidence: `lib/vault.ts`)
- Vault unlock UI → Encrypted vault: unlocks vault (evidence: `app/cv/UnlockBar.tsx`)
- Advice rendering → Clipboard actions: copies response (evidence: `app/cv/AdviceView.tsx`)
- Advice rendering → Copy control: uses control (evidence: `app/cv/AdviceView.tsx`)
- Advice rendering → Markdown renderer: renders Markdown (evidence: `app/cv/AdviceView.tsx`)
- AI providers → Browser storage: saves status (evidence: `lib/providers.ts`)
