# gjelbrim/shqipee architecture

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

- Interactive diagram: https://gitdiagram.com/gjelbrim/shqipee
- Repository: https://github.com/gjelbrim/shqipee
- Video tour (about a minute): https://gitdiagram.com/gjelbrim/shqipee/video

## Overview

shqipee is a browser app for transliterating text between Latin and the Elbasan, Vithkuqi, and Todhri scripts in either direction. Users choose a script route, enter text, and use the live transliterator; they can also browse an on-screen alphabet, swap direction, share text, and revisit per-script history. The graph separates routing and page composition, transliteration logic, and interactive state/persistence from script-specific presentation. Relationships are based on the README and the supplied source excerpts or SOURCE INDEX; unsampled behavior is not inferred.

Main entry points: [`src/App.svelte`](https://github.com/gjelbrim/shqipee/blob/main/src/App.svelte) (Application shell), [`src/components/Transliterator.svelte`](https://github.com/gjelbrim/shqipee/blob/main/src/components/Transliterator.svelte) (Text editor), [`src/routes/ScriptRoute.svelte`](https://github.com/gjelbrim/shqipee/blob/main/src/routes/ScriptRoute.svelte) (Script page), [`src/utils/transliterate.js`](https://github.com/gjelbrim/shqipee/blob/main/src/utils/transliterate.js) (Transliteration engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and pages"]
  node_app["Application shell<br/>[App.svelte]"]
  node_router["Path router<br/>[router.svelte.js]"]
  node_script_route["Script page<br/>[ScriptRoute.svelte]"]
  node_not_found["Not-found page<br/>[notfound.svelte]"]
end

subgraph group_conversion["Script conversion"]
  node_script_types["Script identifiers<br/>[scriptTypes.js]"]
  node_transliteration["Transliteration engine<br/>[transliterate.js]"]
  node_mappings["Script mappings<br/>[mappings.js]"]
  node_alphabet_logic["Alphabet builder<br/>[alphabet.js]"]
end

subgraph group_interaction["Text interaction"]
  node_transliterator_ui["Text editor"]
  node_alphabet_grid["On-screen alphabet"]
  node_history_list["History panel<br/>[HistoryList.svelte]"]
  node_history_logic["History management<br/>[history.js]"]
  node_share_links["Share links<br/>[shareLink.js]"]
  node_panel_state["Panel state<br/>[panel.svelte.js]"]
end

subgraph group_presentation["Page presentation"]
  node_top_section["Page header<br/>[TopSection.svelte]"]
  node_navbar["Navigation bar<br/>[Navbar.svelte]"]
  node_bottom_content["Script information"]
  node_theme_toggle["Theme control<br/>[ThemeToggle.svelte]"]
  node_theme_state["Theme state<br/>[theme.svelte.js]"]
end

node_user(("User"))
node_browser_storage[("Browser local storage")]

node_user -->|"uses"| node_app
node_app -->|"reads route"| node_router
node_app -->|"selects script"| node_script_types
node_app -->|"renders route"| node_script_route
node_app -->|"renders fallback"| node_not_found
node_app -->|"renders control"| node_theme_toggle
node_app -->|"reads panel state"| node_panel_state
node_not_found -->|"navigates home"| node_router
node_script_route -->|"renders header"| node_top_section
node_script_route -->|"renders editor"| node_transliterator_ui
node_script_route -->|"renders information"| node_bottom_content
node_script_route -->|"uses script type"| node_script_types
node_top_section -->|"renders navigation"| node_navbar
node_navbar -->|"navigates routes"| node_router
node_transliterator_ui -->|"converts text"| node_transliteration
node_transliteration -->|"uses mappings"| node_mappings
node_transliteration -->|"selects mapping"| node_script_types
node_transliterator_ui -->|"renders panel"| node_alphabet_grid
node_alphabet_grid -->|"gets alphabet"| node_alphabet_logic
node_alphabet_logic -->|"builds letter groups"| node_mappings
node_alphabet_logic -->|"selects script"| node_script_types
node_transliterator_ui -->|"renders panel"| node_history_list
node_history_list -->|"uses history entries"| node_history_logic
node_history_list -->|"converts entries"| node_transliteration
node_transliterator_ui -->|"loads and saves"| node_history_logic
node_history_logic -->|"reads and writes"| node_browser_storage
node_transliterator_ui -->|"parses share links"| node_share_links
node_transliterator_ui -->|"controls panels"| node_panel_state
node_theme_toggle -->|"uses theme state"| node_theme_state

click node_app "https://github.com/gjelbrim/shqipee/blob/main/src/App.svelte"
click node_router "https://github.com/gjelbrim/shqipee/blob/main/src/router.svelte.js"
click node_script_route "https://github.com/gjelbrim/shqipee/blob/main/src/routes/ScriptRoute.svelte"
click node_not_found "https://github.com/gjelbrim/shqipee/blob/main/src/routes/notfound.svelte"
click node_script_types "https://github.com/gjelbrim/shqipee/blob/main/src/utils/scriptTypes.js"
click node_transliterator_ui "https://github.com/gjelbrim/shqipee/blob/main/src/components/Transliterator.svelte"
click node_transliteration "https://github.com/gjelbrim/shqipee/blob/main/src/utils/transliterate.js"
click node_mappings "https://github.com/gjelbrim/shqipee/blob/main/src/data/mappings.js"
click node_alphabet_logic "https://github.com/gjelbrim/shqipee/blob/main/src/utils/alphabet.js"
click node_alphabet_grid "https://github.com/gjelbrim/shqipee/blob/main/src/components/AlphabetGrid.svelte"
click node_history_list "https://github.com/gjelbrim/shqipee/blob/main/src/components/HistoryList.svelte"
click node_history_logic "https://github.com/gjelbrim/shqipee/blob/main/src/utils/history.js"
click node_share_links "https://github.com/gjelbrim/shqipee/blob/main/src/utils/shareLink.js"
click node_panel_state "https://github.com/gjelbrim/shqipee/blob/main/src/panel.svelte.js"
click node_top_section "https://github.com/gjelbrim/shqipee/blob/main/src/components/TopSection.svelte"
click node_navbar "https://github.com/gjelbrim/shqipee/blob/main/src/components/Navbar.svelte"
click node_bottom_content "https://github.com/gjelbrim/shqipee/blob/main/src/components/BottomContent.svelte"
click node_theme_toggle "https://github.com/gjelbrim/shqipee/blob/main/src/components/ThemeToggle.svelte"
click node_theme_state "https://github.com/gjelbrim/shqipee/blob/main/src/theme.svelte.js"

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_app,node_router,node_script_route,node_not_found,node_user toneBlue
class node_script_types,node_transliteration,node_mappings,node_alphabet_logic,node_browser_storage toneAmber
class node_transliterator_ui,node_alphabet_grid,node_history_list,node_history_logic,node_share_links,node_panel_state toneMint
class node_top_section,node_navbar,node_bottom_content,node_theme_toggle,node_theme_state toneRose
```

## Components

### Routing and pages

- [Application shell](https://github.com/gjelbrim/shqipee/blob/main/src/App.svelte): `src/App.svelte`
- [Path router](https://github.com/gjelbrim/shqipee/blob/main/src/router.svelte.js): `src/router.svelte.js`
- [Script page](https://github.com/gjelbrim/shqipee/blob/main/src/routes/ScriptRoute.svelte): `src/routes/ScriptRoute.svelte`
- [Not-found page](https://github.com/gjelbrim/shqipee/blob/main/src/routes/notfound.svelte): `src/routes/notfound.svelte`

### Script conversion

- [Script identifiers](https://github.com/gjelbrim/shqipee/blob/main/src/utils/scriptTypes.js): `src/utils/scriptTypes.js`
- [Transliteration engine](https://github.com/gjelbrim/shqipee/blob/main/src/utils/transliterate.js): `src/utils/transliterate.js`
- [Script mappings](https://github.com/gjelbrim/shqipee/blob/main/src/data/mappings.js): `src/data/mappings.js`
- [Alphabet builder](https://github.com/gjelbrim/shqipee/blob/main/src/utils/alphabet.js): `src/utils/alphabet.js`

### Text interaction

- [Text editor](https://github.com/gjelbrim/shqipee/blob/main/src/components/Transliterator.svelte): `src/components/Transliterator.svelte`
- [On-screen alphabet](https://github.com/gjelbrim/shqipee/blob/main/src/components/AlphabetGrid.svelte): `src/components/AlphabetGrid.svelte`
- [History panel](https://github.com/gjelbrim/shqipee/blob/main/src/components/HistoryList.svelte): `src/components/HistoryList.svelte`
- [History management](https://github.com/gjelbrim/shqipee/blob/main/src/utils/history.js): `src/utils/history.js`
- [Share links](https://github.com/gjelbrim/shqipee/blob/main/src/utils/shareLink.js): `src/utils/shareLink.js`
- [Panel state](https://github.com/gjelbrim/shqipee/blob/main/src/panel.svelte.js): `src/panel.svelte.js`

### Page presentation

- [Page header](https://github.com/gjelbrim/shqipee/blob/main/src/components/TopSection.svelte): `src/components/TopSection.svelte`
- [Navigation bar](https://github.com/gjelbrim/shqipee/blob/main/src/components/Navbar.svelte): `src/components/Navbar.svelte`
- [Script information](https://github.com/gjelbrim/shqipee/blob/main/src/components/BottomContent.svelte): `src/components/BottomContent.svelte`
- [Theme control](https://github.com/gjelbrim/shqipee/blob/main/src/components/ThemeToggle.svelte): `src/components/ThemeToggle.svelte`
- [Theme state](https://github.com/gjelbrim/shqipee/blob/main/src/theme.svelte.js): `src/theme.svelte.js`

### Other components

- **User**
- **Browser local storage**

## Connections

- User → Application shell: uses (evidence: `README.md`)
- Application shell → Path router: reads route (evidence: `src/App.svelte`)
- Application shell → Script identifiers: selects script (evidence: `src/App.svelte`)
- Application shell → Script page: renders route (evidence: `src/App.svelte`)
- Application shell → Not-found page: renders fallback (evidence: `src/App.svelte`)
- Application shell → Theme control: renders control (evidence: `src/App.svelte`)
- Application shell → Panel state: reads panel state (evidence: `src/App.svelte`)
- Not-found page → Path router: navigates home (evidence: `src/routes/notfound.svelte`)
- Script page → Page header: renders header (evidence: `src/routes/ScriptRoute.svelte`)
- Script page → Text editor: renders editor (evidence: `src/routes/ScriptRoute.svelte`)
- Script page → Script information: renders information (evidence: `src/routes/ScriptRoute.svelte`)
- Script page → Script identifiers: uses script type (evidence: `src/routes/ScriptRoute.svelte`)
- Page header → Navigation bar: renders navigation (evidence: `src/components/TopSection.svelte`)
- Navigation bar → Path router: navigates routes (evidence: `src/components/Navbar.svelte`)
- Text editor → Transliteration engine: converts text (evidence: `src/components/Transliterator.svelte`)
- Transliteration engine → Script mappings: uses mappings (evidence: `src/utils/transliterate.js`)
- Transliteration engine → Script identifiers: selects mapping (evidence: `src/utils/transliterate.js`)
- Text editor → On-screen alphabet: renders panel (evidence: `src/components/Transliterator.svelte`)
- On-screen alphabet → Alphabet builder: gets alphabet (evidence: `src/components/AlphabetGrid.svelte`)
- Alphabet builder → Script mappings: builds letter groups (evidence: `src/utils/alphabet.js`)
- Alphabet builder → Script identifiers: selects script (evidence: `src/utils/alphabet.js`)
- Text editor → History panel: renders panel (evidence: `src/components/Transliterator.svelte`)
- History panel → History management: uses history entries (evidence: `src/components/HistoryList.svelte`)
- History panel → Transliteration engine: converts entries (evidence: `src/components/HistoryList.svelte`)
- Text editor → History management: loads and saves (evidence: `src/components/Transliterator.svelte`)
- History management → Browser local storage: reads and writes (evidence: `src/utils/history.js`)
- Text editor → Share links: parses share links (evidence: `src/components/Transliterator.svelte`)
- Text editor → Panel state: controls panels (evidence: `src/components/Transliterator.svelte`)
- Theme control → Theme state: uses theme state (evidence: `src/components/ThemeToggle.svelte`)
