# mariomagliano/translationservices architecture

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

- Interactive diagram: https://gitdiagram.com/mariomagliano/translationservices
- Repository: https://github.com/mariomagliano/translationservices

## Overview

This is a Google Apps Script web portal for managing translation projects through Phrase TMS. The main user-facing workflow is to enter the portal, use its project forms and upload controls, then work with project and document views; the README establishes these capabilities but does not show the runtime calls linking every stage. The graph preserves documented project, admin, marketing, translation-string, and knowledge-base branches. Evidence is limited to the README excerpt, so unsampled implementation relationships are omitted rather than inferred.

Main entry points: [`src/MarketingUi.html`](https://github.com/mariomagliano/translationservices/blob/main/src/MarketingUi.html) (Marketing projects UI), [`src/Index.html`](https://github.com/mariomagliano/translationservices/blob/main/src/Index.html) (Portal entry), [`src/JsUpload.html`](https://github.com/mariomagliano/translationservices/blob/main/src/JsUpload.html) (File upload UI), [`src/JsDownload.html`](https://github.com/mariomagliano/translationservices/blob/main/src/JsDownload.html) (Download UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal experience"]
  node_webapp["Web app shell<br/>[WebApp.gs]"]
  node_index["Portal entry<br/>[Index.html]"]
  node_coreui["Core interaction<br/>[JsCore.html]"]
  node_forms["Project forms<br/>[JsForms.html]"]
  node_uploads["File upload UI<br/>[JsUpload.html]"]
  node_projectviews["Project views<br/>[JsProjects.html]"]
  node_downloadui["Download UI<br/>[JsDownload.html]"]
end

subgraph group_project["Project operations"]
  node_projectapi["Project APIs<br/>[ProjectsApi.gs]"]
  node_orchestration["Project orchestration<br/>[Orchestration.gs]"]
  node_marketingui["Marketing projects UI<br/>[MarketingUi.html]"]
  node_consulting["Consulting requests"]
  node_precalc["Pre-calculation"]
  node_maxtemplate["Maximal template<br/>[MaxTemplate.gs]"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin console<br/>[AdminConsole.html]"]
  node_adminscript["Admin interactions<br/>[AdminScript.html]"]
  node_managers["User manager<br/>[AdminManagers.gs]"]
  node_translateui["Translate UI<br/>[TranslateUi.html]"]
  node_strings["Phrase Strings sync"]
end

subgraph group_knowledge["Phrase knowledge"]
  node_knowledgeui["Knowledge base page<br/>[Knowledgebase.html]"]
  node_knowledgeapi["Knowledge API"]
  node_kbdata["Article packages<br/>[KbData1.html]"]
end

subgraph group_platform["Platform services"]
  node_prefs["User preferences<br/>[UserPrefs.gs]"]
  node_storage[("Portal storage<br/>[Storage.gs]")]
end

node_user(("Portal user"))
node_phrase{{"Phrase TMS"}}
node_drive[("Google Drive")]

node_user -->|"opens"| node_index
node_webapp -->|"serves"| node_index
node_index -->|"includes"| node_coreui
node_user -->|"creates projects"| node_forms
node_user -->|"selects files"| node_uploads
node_user -->|"views projects"| node_projectviews
node_user -->|"downloads files"| node_downloadui
node_user -->|"opens marketing"| node_marketingui
node_marketingui -->|"supports requests"| node_consulting
node_marketingui -->|"supports estimates"| node_precalc
node_marketingui -->|"offers template"| node_maxtemplate
node_user -->|"opens admin"| node_adminui
node_adminui -->|"pairs with"| node_adminscript
node_adminscript -->|"manages permissions"| node_managers
node_user -->|"opens translation tools"| node_translateui
node_translateui -->|"uses sync features"| node_strings
node_strings -->|"exchanges tokens"| node_phrase
node_user -->|"opens knowledge base"| node_knowledgeui
node_knowledgeui -->|"requests chunks"| node_knowledgeapi
node_knowledgeapi -->|"serves articles"| node_kbdata
node_user -->|"sets preferences"| node_prefs
node_user -.->|"uses project features"| node_projectapi
node_projectapi -.->|"coordinates projects"| node_orchestration
node_orchestration -.->|"works with projects"| node_phrase
node_uploads -->|"selects Drive files"| node_drive
node_downloadui -->|"saves to Drive"| node_drive
node_prefs -.->|"persists settings"| node_storage

click node_webapp "https://github.com/mariomagliano/translationservices/blob/main/src/WebApp.gs"
click node_index "https://github.com/mariomagliano/translationservices/blob/main/src/Index.html"
click node_coreui "https://github.com/mariomagliano/translationservices/blob/main/src/JsCore.html"
click node_forms "https://github.com/mariomagliano/translationservices/blob/main/src/JsForms.html"
click node_uploads "https://github.com/mariomagliano/translationservices/blob/main/src/JsUpload.html"
click node_projectviews "https://github.com/mariomagliano/translationservices/blob/main/src/JsProjects.html"
click node_downloadui "https://github.com/mariomagliano/translationservices/blob/main/src/JsDownload.html"
click node_projectapi "https://github.com/mariomagliano/translationservices/blob/main/src/ProjectsApi.gs"
click node_orchestration "https://github.com/mariomagliano/translationservices/blob/main/src/Orchestration.gs"
click node_marketingui "https://github.com/mariomagliano/translationservices/blob/main/src/MarketingUi.html"
click node_consulting "https://github.com/mariomagliano/translationservices/blob/main/src/MarketingConsulting.gs"
click node_precalc "https://github.com/mariomagliano/translationservices/blob/main/src/MarketingPrecalc.gs"
click node_maxtemplate "https://github.com/mariomagliano/translationservices/blob/main/src/MaxTemplate.gs"
click node_adminui "https://github.com/mariomagliano/translationservices/blob/main/src/AdminConsole.html"
click node_adminscript "https://github.com/mariomagliano/translationservices/blob/main/src/AdminScript.html"
click node_managers "https://github.com/mariomagliano/translationservices/blob/main/src/AdminManagers.gs"
click node_translateui "https://github.com/mariomagliano/translationservices/blob/main/src/TranslateUi.html"
click node_strings "https://github.com/mariomagliano/translationservices/blob/main/src/PhraseStringsSync.gs"
click node_knowledgeui "https://github.com/mariomagliano/translationservices/blob/main/src/Knowledgebase.html"
click node_knowledgeapi "https://github.com/mariomagliano/translationservices/blob/main/src/KnowledgebaseApi.gs"
click node_kbdata "https://github.com/mariomagliano/translationservices/blob/main/src/KbData1.html"
click node_prefs "https://github.com/mariomagliano/translationservices/blob/main/src/UserPrefs.gs"
click node_storage "https://github.com/mariomagliano/translationservices/blob/main/src/Storage.gs"

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_webapp,node_index,node_coreui,node_forms,node_uploads,node_projectviews,node_downloadui,node_user toneBlue
class node_projectapi,node_orchestration,node_marketingui,node_consulting,node_precalc,node_maxtemplate,node_drive toneAmber
class node_adminui,node_adminscript,node_managers,node_translateui,node_strings toneMint
class node_knowledgeui,node_knowledgeapi,node_kbdata toneRose
class node_prefs,node_storage,node_phrase toneIndigo
```

## Components

### Portal experience

- [Web app shell](https://github.com/mariomagliano/translationservices/blob/main/src/WebApp.gs): `src/WebApp.gs`
- [Portal entry](https://github.com/mariomagliano/translationservices/blob/main/src/Index.html): `src/Index.html`
- [Core interaction](https://github.com/mariomagliano/translationservices/blob/main/src/JsCore.html): `src/JsCore.html`
- [Project forms](https://github.com/mariomagliano/translationservices/blob/main/src/JsForms.html): `src/JsForms.html`
- [File upload UI](https://github.com/mariomagliano/translationservices/blob/main/src/JsUpload.html): `src/JsUpload.html`
- [Project views](https://github.com/mariomagliano/translationservices/blob/main/src/JsProjects.html): `src/JsProjects.html`
- [Download UI](https://github.com/mariomagliano/translationservices/blob/main/src/JsDownload.html): `src/JsDownload.html`

### Project operations

- [Project APIs](https://github.com/mariomagliano/translationservices/blob/main/src/ProjectsApi.gs): `src/ProjectsApi.gs`
- [Project orchestration](https://github.com/mariomagliano/translationservices/blob/main/src/Orchestration.gs): `src/Orchestration.gs`
- [Marketing projects UI](https://github.com/mariomagliano/translationservices/blob/main/src/MarketingUi.html): `src/MarketingUi.html`
- [Consulting requests](https://github.com/mariomagliano/translationservices/blob/main/src/MarketingConsulting.gs): `src/MarketingConsulting.gs`
- [Pre-calculation](https://github.com/mariomagliano/translationservices/blob/main/src/MarketingPrecalc.gs): `src/MarketingPrecalc.gs`
- [Maximal template](https://github.com/mariomagliano/translationservices/blob/main/src/MaxTemplate.gs): `src/MaxTemplate.gs`

### Administration

- [Admin console](https://github.com/mariomagliano/translationservices/blob/main/src/AdminConsole.html): `src/AdminConsole.html`
- [Admin interactions](https://github.com/mariomagliano/translationservices/blob/main/src/AdminScript.html): `src/AdminScript.html`
- [User manager](https://github.com/mariomagliano/translationservices/blob/main/src/AdminManagers.gs): `src/AdminManagers.gs`
- [Translate UI](https://github.com/mariomagliano/translationservices/blob/main/src/TranslateUi.html): `src/TranslateUi.html`
- [Phrase Strings sync](https://github.com/mariomagliano/translationservices/blob/main/src/PhraseStringsSync.gs): `src/PhraseStringsSync.gs`

### Phrase knowledge

- [Knowledge base page](https://github.com/mariomagliano/translationservices/blob/main/src/Knowledgebase.html): `src/Knowledgebase.html`
- [Knowledge API](https://github.com/mariomagliano/translationservices/blob/main/src/KnowledgebaseApi.gs): `src/KnowledgebaseApi.gs`
- [Article packages](https://github.com/mariomagliano/translationservices/blob/main/src/KbData1.html): `src/KbData1.html`

### Platform services

- [User preferences](https://github.com/mariomagliano/translationservices/blob/main/src/UserPrefs.gs): `src/UserPrefs.gs`
- [Portal storage](https://github.com/mariomagliano/translationservices/blob/main/src/Storage.gs): `src/Storage.gs`

### Other components

- **Portal user**
- **Phrase TMS**
- **Google Drive**

## Connections

- Portal user → Portal entry: opens (evidence: `README.md`)
- Web app shell → Portal entry: serves (evidence: `README.md`)
- Portal entry → Core interaction: includes (evidence: `README.md`)
- Portal user → Project forms: creates projects (evidence: `README.md`)
- Portal user → File upload UI: selects files (evidence: `README.md`)
- Portal user → Project views: views projects (evidence: `README.md`)
- Portal user → Download UI: downloads files (evidence: `README.md`)
- Portal user → Marketing projects UI: opens marketing (evidence: `README.md`)
- Marketing projects UI → Consulting requests: supports requests (evidence: `README.md`)
- Marketing projects UI → Pre-calculation: supports estimates (evidence: `README.md`)
- Marketing projects UI → Maximal template: offers template (evidence: `README.md`)
- Portal user → Admin console: opens admin (evidence: `README.md`)
- Admin console → Admin interactions: pairs with (evidence: `README.md`)
- Admin interactions → User manager: manages permissions (evidence: `README.md`)
- Portal user → Translate UI: opens translation tools (evidence: `README.md`)
- Translate UI → Phrase Strings sync: uses sync features (evidence: `README.md`)
- Phrase Strings sync → Phrase TMS: exchanges tokens (evidence: `README.md`)
- Portal user → Knowledge base page: opens knowledge base (evidence: `README.md`)
- Knowledge base page → Knowledge API: requests chunks (evidence: `README.md`)
- Knowledge API → Article packages: serves articles (evidence: `README.md`)
- Portal user → User preferences: sets preferences (evidence: `README.md`)
- Portal user → Project APIs: uses project features
- Project APIs → Project orchestration: coordinates projects
- Project orchestration → Phrase TMS: works with projects
- File upload UI → Google Drive: selects Drive files (evidence: `README.md`)
- Download UI → Google Drive: saves to Drive (evidence: `README.md`)
- User preferences → Portal storage: persists settings
