# sarah-kazi/portfolio-sarah architecture

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

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

## Overview

This is a browser-based personal portfolio presented as an interactive, space-themed site. On startup, the entry point chooses either a touch-oriented mobile experience or a desktop parallax scene, then initializes portfolio sections and applies hash-based navigation. Visitors can explore projects, skills, a gallery, playlists, blog posts, and a timeline; the terminal and optional sound effects add interactive features. The graph reflects explicit calls and documented module references; most section internals and their route wiring were not sampled, so those links are omitted.

Main entry points: [`src/main.ts`](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/main.ts) (App bootstrap), [`src/mobile/mobile.ts`](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/mobile.ts) (Mobile experience), [`src/effects/sound.ts`](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/sound.ts) (Sound effects), [`src/router.ts`](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/router.ts) (Hash router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and navigation"]
  node_main["App bootstrap<br/>[main.ts]"]
  node_router["Hash router<br/>[router.ts]"]
end

subgraph group_desktop["Desktop scene"]
  node_parallax["Parallax engine<br/>[parallax.ts]"]
  node_temporary["Layer parallax"]
  node_galaxy["Galaxy scene<br/>[galaxy.ts]"]
  node_stars["Star field<br/>[stars.ts]"]
  node_shooting["Shooting stars<br/>[shootingStars.ts]"]
end

subgraph group_sections["Portfolio sections"]
  node_projects["Projects<br/>[projects.ts]"]
  node_skills["Skills<br/>[skills.ts]"]
  node_gallery["Image gallery<br/>[gallery.ts]"]
  node_playlists["Playlists<br/>[playlists.ts]"]
  node_blogs["Blog reader<br/>[blogs.ts]"]
  node_blogparse["Post parser<br/>[parse.ts]"]
  node_timeline["Timeline<br/>[timeline.ts]"]
  node_terminal["Interactive terminal<br/>[terminal.ts]"]
end

subgraph group_mobile["Mobile experience"]
  node_mobile["Mobile experience<br/>[mobile.ts]"]
  node_motion["Motion preferences<br/>[motion.ts]"]
  node_scene["Mobile intro<br/>[scene.ts]"]
  node_pinch["Pinch zoom<br/>[pinchZoom.ts]"]
  node_viz["Mobile skills view<br/>[viz.ts]"]
end

subgraph group_shared["Shared interactions"]
  node_animated["Animated text<br/>[animatedText.ts]"]
  node_sound["Sound effects<br/>[sound.ts]"]
  node_soundfiles["Sound assets"]
  node_a11y["Accessibility helpers<br/>[a11y.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_main
node_main -->|"starts routing"| node_router
node_main -->|"initializes mobile"| node_mobile
node_main -->|"creates layers"| node_temporary
node_temporary -.->|"extends engine"| node_parallax
node_main -->|"initializes galaxy"| node_galaxy
node_main -->|"adds stars"| node_stars
node_main -->|"initializes stars"| node_shooting
node_main -->|"initializes projects"| node_projects
node_main -->|"initializes skills"| node_skills
node_main -->|"initializes gallery"| node_gallery
node_main -->|"initializes playlists"| node_playlists
node_main -->|"initializes blogs"| node_blogs
node_main -->|"initializes timeline"| node_timeline
node_main -->|"initializes terminal"| node_terminal
node_main -->|"imports effects"| node_animated
node_main -->|"prompts for sound"| node_sound
node_main -->|"applies deep links"| node_router
node_blogs -->|"parses posts"| node_blogparse
node_terminal -->|"navigates sections"| node_router
node_terminal -->|"plays effects"| node_sound
node_sound -->|"fetches audio"| node_soundfiles
node_mobile -->|"registers route handler"| node_router
node_mobile -->|"builds project cards"| node_projects
node_mobile -->|"attaches zoom"| node_pinch
node_mobile -->|"plays intro"| node_scene
node_mobile -->|"animates text"| node_animated
node_mobile -->|"checks motion"| node_motion
node_mobile -.->|"renders skills"| node_viz
node_galaxy -->|"uses engine"| node_parallax
node_gallery -->|"uses controls"| node_a11y
node_gallery -->|"plays effects"| node_sound
node_parallax -->|"checks motion"| node_a11y

click node_main "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/main.ts"
click node_router "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/router.ts"
click node_parallax "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/parallax/parallax.ts"
click node_temporary "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/parallax/temporaryLayersParallax.ts"
click node_galaxy "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/galaxy.ts"
click node_stars "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/stars.ts"
click node_shooting "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/shootingStars.ts"
click node_projects "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/projects.ts"
click node_skills "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/skills.ts"
click node_gallery "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/gallery.ts"
click node_playlists "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/playlists.ts"
click node_blogs "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/blogs.ts"
click node_blogparse "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/blog/parse.ts"
click node_timeline "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/timeline.ts"
click node_terminal "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/terminal.ts"
click node_mobile "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/mobile.ts"
click node_motion "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/motion.ts"
click node_scene "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/scene.ts"
click node_pinch "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/pinchZoom.ts"
click node_viz "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/viz.ts"
click node_animated "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/animatedText.ts"
click node_sound "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/sound.ts"
click node_soundfiles "https://github.com/sarah-kazi/portfolio-sarah/tree/main/public/sfx"
click node_a11y "https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/a11y.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_main,node_router toneBlue
class node_parallax,node_temporary,node_galaxy,node_stars,node_shooting toneAmber
class node_projects,node_skills,node_gallery,node_playlists,node_blogs,node_blogparse,node_timeline,node_terminal toneMint
class node_mobile,node_motion,node_scene,node_pinch,node_viz toneRose
class node_animated,node_sound,node_soundfiles,node_a11y,node_visitor toneIndigo
```

## Components

### App entry and navigation

- [App bootstrap](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/main.ts): `src/main.ts`
- [Hash router](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/router.ts): `src/router.ts`

### Desktop scene

- [Parallax engine](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/parallax/parallax.ts): `src/parallax/parallax.ts`
- [Layer parallax](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/parallax/temporaryLayersParallax.ts): `src/parallax/temporaryLayersParallax.ts`
- [Galaxy scene](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/galaxy.ts): `src/effects/galaxy.ts`
- [Star field](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/stars.ts): `src/effects/stars.ts`
- [Shooting stars](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/shootingStars.ts): `src/effects/shootingStars.ts`

### Portfolio sections

- [Projects](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/projects.ts): `src/interactivity/projects.ts`
- [Skills](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/skills.ts): `src/interactivity/skills.ts`
- [Image gallery](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/gallery.ts): `src/interactivity/gallery.ts`
- [Playlists](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/playlists.ts): `src/interactivity/playlists.ts`
- [Blog reader](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/blogs.ts): `src/interactivity/blogs.ts`
- [Post parser](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/blog/parse.ts): `src/blog/parse.ts`
- [Timeline](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/interactivity/timeline.ts): `src/interactivity/timeline.ts`
- [Interactive terminal](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/terminal.ts): `src/effects/terminal.ts`

### Mobile experience

- [Mobile experience](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/mobile.ts): `src/mobile/mobile.ts`
- [Motion preferences](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/motion.ts): `src/mobile/motion.ts`
- [Mobile intro](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/scene.ts): `src/mobile/scene.ts`
- [Pinch zoom](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/pinchZoom.ts): `src/mobile/pinchZoom.ts`
- [Mobile skills view](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/mobile/viz.ts): `src/mobile/viz.ts`

### Shared interactions

- [Animated text](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/animatedText.ts): `src/effects/animatedText.ts`
- [Sound effects](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/effects/sound.ts): `src/effects/sound.ts`
- [Sound assets](https://github.com/sarah-kazi/portfolio-sarah/tree/main/public/sfx): `public/sfx`
- [Accessibility helpers](https://github.com/sarah-kazi/portfolio-sarah/blob/main/src/a11y.ts): `src/a11y.ts`

### Other components

- **Visitor**

## Connections

- Visitor → App bootstrap: opens site
- App bootstrap → Hash router: starts routing (evidence: `src/main.ts`)
- App bootstrap → Mobile experience: initializes mobile (evidence: `src/main.ts`)
- App bootstrap → Layer parallax: creates layers (evidence: `src/main.ts`)
- Layer parallax → Parallax engine: extends engine (evidence: `src/parallax/temporaryLayersParallax.ts`)
- App bootstrap → Galaxy scene: initializes galaxy (evidence: `src/main.ts`)
- App bootstrap → Star field: adds stars (evidence: `src/main.ts`)
- App bootstrap → Shooting stars: initializes stars (evidence: `src/main.ts`)
- App bootstrap → Projects: initializes projects (evidence: `src/main.ts`)
- App bootstrap → Skills: initializes skills (evidence: `src/main.ts`)
- App bootstrap → Image gallery: initializes gallery (evidence: `src/main.ts`)
- App bootstrap → Playlists: initializes playlists (evidence: `src/main.ts`)
- App bootstrap → Blog reader: initializes blogs (evidence: `src/main.ts`)
- App bootstrap → Timeline: initializes timeline (evidence: `src/main.ts`)
- App bootstrap → Interactive terminal: initializes terminal (evidence: `src/main.ts`)
- App bootstrap → Animated text: imports effects (evidence: `src/main.ts`)
- App bootstrap → Sound effects: prompts for sound (evidence: `src/main.ts`)
- App bootstrap → Hash router: applies deep links (evidence: `src/main.ts`)
- Blog reader → Post parser: parses posts (evidence: `src/interactivity/blogs.ts`)
- Interactive terminal → Hash router: navigates sections (evidence: `src/effects/terminal.ts`)
- Interactive terminal → Sound effects: plays effects (evidence: `src/effects/terminal.ts`)
- Sound effects → Sound assets: fetches audio (evidence: `src/effects/sound.ts`)
- Mobile experience → Hash router: registers route handler (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Projects: builds project cards (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Pinch zoom: attaches zoom (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Mobile intro: plays intro (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Animated text: animates text (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Motion preferences: checks motion (evidence: `src/mobile/mobile.ts`)
- Mobile experience → Mobile skills view: renders skills (evidence: `src/mobile/mobile.ts`)
- Galaxy scene → Parallax engine: uses engine (evidence: `src/effects/galaxy.ts`)
- Image gallery → Accessibility helpers: uses controls (evidence: `src/interactivity/gallery.ts`)
- Image gallery → Sound effects: plays effects (evidence: `src/interactivity/gallery.ts`)
- Parallax engine → Accessibility helpers: checks motion (evidence: `src/parallax/parallax.ts`)
