# bernatzx/fymchat-web architecture

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

- Interactive diagram: https://gitdiagram.com/bernatzx/fymchat-web
- Repository: https://github.com/bernatzx/fymchat-web

## Overview

This is a React text-assistance web app with grammar checking, translation, and paraphrasing. Users navigate to a tool, enter text, and receive a displayed result or error; each tool delegates its request to a service module that posts to an external API. The app shell supplies shared navigation and layout. The README is only a Vite template, so product capabilities and relationships here are based on the sampled source; backend behavior is not shown.

Main entry points: [`src/App.jsx`](https://github.com/bernatzx/fymchat-web/blob/main/src/App.jsx) (Route app), [`src/partials/Header.jsx`](https://github.com/bernatzx/fymchat-web/blob/main/src/partials/Header.jsx) (Navigation), [`src/pages/GrammarChecker.jsx`](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/GrammarChecker.jsx) (Grammar checker), [`src/pages/Translator.jsx`](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Translator.jsx) (Translator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["Route app<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[layout.jsx]"]
  node_header["Navigation<br/>[Header.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
end

subgraph group_tools["Text tools"]
  node_home["Home page<br/>[Home.jsx]"]
  node_grammar["Grammar checker<br/>[GrammarChecker.jsx]"]
  node_translator["Translator<br/>[Translator.jsx]"]
  node_paraphrase["Paraphrase<br/>[Paraphrase.jsx]"]
end

subgraph group_services["API services"]
  node_grammar_service["Grammar service<br/>[grammar.js]"]
  node_translator_service["Translation service<br/>[translator.js]"]
  node_paraphrase_service["Paraphrase service<br/>[paraphrase.js]"]
  node_config["API config<br/>[config.js]"]
end

node_user(("User"))
node_api["Backend API"]

node_user -->|"chooses tool"| node_header
node_user -->|"enters text"| node_grammar
node_user -->|"enters text"| node_translator
node_user -->|"enters text"| node_paraphrase
node_app -->|"renders route"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_grammar
node_app -->|"routes to"| node_translator
node_app -->|"routes to"| node_paraphrase
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_header -->|"links to"| node_grammar
node_header -->|"links to"| node_translator
node_header -->|"links to"| node_paraphrase
node_grammar -->|"requests check"| node_grammar_service
node_translator -->|"requests translation"| node_translator_service
node_paraphrase -->|"requests rewrite"| node_paraphrase_service
node_grammar_service -->|"reads URL"| node_config
node_translator_service -->|"reads URL"| node_config
node_paraphrase_service -->|"reads URL"| node_config
node_grammar_service -->|"posts check"| node_api
node_translator_service -->|"posts translation"| node_api
node_paraphrase_service -->|"posts rewrite"| node_api

click node_app "https://github.com/bernatzx/fymchat-web/blob/main/src/App.jsx"
click node_layout "https://github.com/bernatzx/fymchat-web/blob/main/src/layout.jsx"
click node_header "https://github.com/bernatzx/fymchat-web/blob/main/src/partials/Header.jsx"
click node_footer "https://github.com/bernatzx/fymchat-web/blob/main/src/partials/Footer.jsx"
click node_home "https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Home.jsx"
click node_grammar "https://github.com/bernatzx/fymchat-web/blob/main/src/pages/GrammarChecker.jsx"
click node_translator "https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Translator.jsx"
click node_paraphrase "https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Paraphrase.jsx"
click node_grammar_service "https://github.com/bernatzx/fymchat-web/blob/main/src/services/grammar.js"
click node_translator_service "https://github.com/bernatzx/fymchat-web/blob/main/src/services/translator.js"
click node_paraphrase_service "https://github.com/bernatzx/fymchat-web/blob/main/src/services/paraphrase.js"
click node_config "https://github.com/bernatzx/fymchat-web/blob/main/src/services/config.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_layout,node_header,node_footer,node_user toneBlue
class node_home,node_grammar,node_translator,node_paraphrase toneAmber
class node_grammar_service,node_translator_service,node_paraphrase_service,node_config,node_api toneMint
```

## Components

### App shell

- [Route app](https://github.com/bernatzx/fymchat-web/blob/main/src/App.jsx): `src/App.jsx`
- [Shared layout](https://github.com/bernatzx/fymchat-web/blob/main/src/layout.jsx): `src/layout.jsx`
- [Navigation](https://github.com/bernatzx/fymchat-web/blob/main/src/partials/Header.jsx): `src/partials/Header.jsx`
- [Footer](https://github.com/bernatzx/fymchat-web/blob/main/src/partials/Footer.jsx): `src/partials/Footer.jsx`

### Text tools

- [Home page](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Grammar checker](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/GrammarChecker.jsx): `src/pages/GrammarChecker.jsx`
- [Translator](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Translator.jsx): `src/pages/Translator.jsx`
- [Paraphrase](https://github.com/bernatzx/fymchat-web/blob/main/src/pages/Paraphrase.jsx): `src/pages/Paraphrase.jsx`

### API services

- [Grammar service](https://github.com/bernatzx/fymchat-web/blob/main/src/services/grammar.js): `src/services/grammar.js`
- [Translation service](https://github.com/bernatzx/fymchat-web/blob/main/src/services/translator.js): `src/services/translator.js`
- [Paraphrase service](https://github.com/bernatzx/fymchat-web/blob/main/src/services/paraphrase.js): `src/services/paraphrase.js`
- [API config](https://github.com/bernatzx/fymchat-web/blob/main/src/services/config.js): `src/services/config.js`

### Other components

- **User**
- **Backend API**

## Connections

- User → Navigation: chooses tool (evidence: `src/partials/Header.jsx`)
- User → Grammar checker: enters text (evidence: `src/pages/GrammarChecker.jsx`)
- User → Translator: enters text (evidence: `src/pages/Translator.jsx`)
- User → Paraphrase: enters text (evidence: `src/pages/Paraphrase.jsx`)
- Route app → Shared layout: renders route (evidence: `src/App.jsx`)
- Route app → Home page: routes to (evidence: `src/App.jsx`)
- Route app → Grammar checker: routes to (evidence: `src/App.jsx`)
- Route app → Translator: routes to (evidence: `src/App.jsx`)
- Route app → Paraphrase: routes to (evidence: `src/App.jsx`)
- Shared layout → Navigation: renders (evidence: `src/layout.jsx`)
- Shared layout → Footer: renders (evidence: `src/layout.jsx`)
- Navigation → Grammar checker: links to (evidence: `src/partials/Header.jsx`)
- Navigation → Translator: links to (evidence: `src/partials/Header.jsx`)
- Navigation → Paraphrase: links to (evidence: `src/partials/Header.jsx`)
- Grammar checker → Grammar service: requests check (evidence: `src/pages/GrammarChecker.jsx`)
- Translator → Translation service: requests translation (evidence: `src/pages/Translator.jsx`)
- Paraphrase → Paraphrase service: requests rewrite (evidence: `src/pages/Paraphrase.jsx`)
- Grammar service → API config: reads URL (evidence: `src/services/grammar.js`)
- Translation service → API config: reads URL (evidence: `src/services/translator.js`)
- Paraphrase service → API config: reads URL (evidence: `src/services/paraphrase.js`)
- Grammar service → Backend API: posts check (evidence: `src/services/grammar.js`)
- Translation service → Backend API: posts translation (evidence: `src/services/translator.js`)
- Paraphrase service → Backend API: posts rewrite (evidence: `src/services/paraphrase.js`)
