# ennva/einvoice-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/ennva/einvoice-frontend
- Repository: https://github.com/ennva/einvoice-frontend

## Overview

This is a browser-based e-invoicing management frontend. Users enter through public landing, documentation, login, or registration pages; authenticated users reach a dashboard and invoice, customer, reference-data, integration, billing, API-key, and settings areas. Invoice creation collects parties and line items, previews totals, and submits an invoice through the API client. The supplied excerpts establish routing, authentication, invoice submission, and integration configuration calls; other page-to-service details are not inferred from filenames alone.

Main entry points: [`src/App.js`](https://github.com/ennva/einvoice-frontend/blob/main/src/App.js) (Routes and providers), [`src/pages/InvoiceCreate.jsx`](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceCreate.jsx) (Invoice creation), [`src/context/AuthContext.jsx`](https://github.com/ennva/einvoice-frontend/blob/main/src/context/AuthContext.jsx) (Authentication state), [`src/lib/api.js`](https://github.com/ennva/einvoice-frontend/blob/main/src/lib/api.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and access"]
  node_app["Routes and providers<br/>[App.js]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_public["Landing and docs<br/>[Landing.jsx]"]
  node_login["Login and registration<br/>[Login.jsx]"]
  node_layout["Authenticated shell<br/>[AppLayout.jsx]"]
end

subgraph group_invoice["Invoice workflow"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_invoice_list["Invoice list<br/>[InvoiceList.jsx]"]
  node_invoice_create["Invoice creation<br/>[InvoiceCreate.jsx]"]
  node_invoice_detail["Invoice detail<br/>[InvoiceDetail.jsx]"]
end

subgraph group_admin["Workspace management"]
  node_customers["Customers<br/>[Customers.jsx]"]
  node_countries["Countries<br/>[Countries.jsx]"]
  node_currencies["Currencies<br/>[Currencies.jsx]"]
  node_integrations_page["Integrations page<br/>[Integrations.jsx]"]
  node_integration_manager["Integration configuration"]
  node_api_keys["API keys<br/>[ApiKeys.jsx]"]
  node_billing["Billing<br/>[Billing.jsx]"]
  node_settings["Settings<br/>[Settings.jsx]"]
end

subgraph group_shared["Shared client layers"]
  node_api["HTTP API client<br/>[api.js]"]
  node_components["Shared UI components"]
end

node_user(("User"))
node_backend{{"Backend API"}}

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_login
node_app -->|"wraps protected routes"| node_layout
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_invoice_list
node_app -->|"routes to"| node_invoice_create
node_app -->|"routes to"| node_invoice_detail
node_app -->|"routes to"| node_customers
node_app -->|"routes to"| node_countries
node_app -->|"routes to"| node_currencies
node_app -->|"routes to"| node_integrations_page
node_app -->|"routes to"| node_api_keys
node_app -->|"routes to"| node_billing
node_app -->|"routes to"| node_settings
node_login -->|"calls auth"| node_auth
node_auth -->|"sends auth requests"| node_api
node_invoice_create -->|"submits invoice"| node_api
node_integration_manager -->|"manages configurations"| node_backend
node_api -->|"sends HTTP requests"| node_backend
node_invoice_create -->|"renders with"| node_components
node_layout -->|"uses"| node_components

click node_app "https://github.com/ennva/einvoice-frontend/blob/main/src/App.js"
click node_auth "https://github.com/ennva/einvoice-frontend/blob/main/src/context/AuthContext.jsx"
click node_public "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Landing.jsx"
click node_login "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/auth/Login.jsx"
click node_layout "https://github.com/ennva/einvoice-frontend/blob/main/src/components/layout/AppLayout.jsx"
click node_dashboard "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Dashboard.jsx"
click node_invoice_list "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceList.jsx"
click node_invoice_create "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceCreate.jsx"
click node_invoice_detail "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceDetail.jsx"
click node_customers "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Customers.jsx"
click node_countries "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Countries.jsx"
click node_currencies "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Currencies.jsx"
click node_integrations_page "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Integrations.jsx"
click node_integration_manager "https://github.com/ennva/einvoice-frontend/blob/main/src/components/IntegrationManager.js"
click node_api_keys "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/ApiKeys.jsx"
click node_billing "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Billing.jsx"
click node_settings "https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Settings.jsx"
click node_api "https://github.com/ennva/einvoice-frontend/blob/main/src/lib/api.js"
click node_components "https://github.com/ennva/einvoice-frontend/tree/main/src/components/ui"

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_auth,node_public,node_login,node_layout,node_user toneBlue
class node_dashboard,node_invoice_list,node_invoice_create,node_invoice_detail toneAmber
class node_customers,node_countries,node_currencies,node_integrations_page,node_integration_manager,node_api_keys,node_billing,node_settings,node_backend toneMint
class node_api,node_components toneRose
```

## Components

### App and access

- [Routes and providers](https://github.com/ennva/einvoice-frontend/blob/main/src/App.js): `src/App.js`
- [Authentication state](https://github.com/ennva/einvoice-frontend/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Landing and docs](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Landing.jsx): `src/pages/Landing.jsx`
- [Login and registration](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/auth/Login.jsx): `src/pages/auth/Login.jsx`
- [Authenticated shell](https://github.com/ennva/einvoice-frontend/blob/main/src/components/layout/AppLayout.jsx): `src/components/layout/AppLayout.jsx`

### Invoice workflow

- [Dashboard](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Invoice list](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceList.jsx): `src/pages/InvoiceList.jsx`
- [Invoice creation](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceCreate.jsx): `src/pages/InvoiceCreate.jsx`
- [Invoice detail](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/InvoiceDetail.jsx): `src/pages/InvoiceDetail.jsx`

### Workspace management

- [Customers](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Customers.jsx): `src/pages/Customers.jsx`
- [Countries](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Countries.jsx): `src/pages/Countries.jsx`
- [Currencies](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Currencies.jsx): `src/pages/Currencies.jsx`
- [Integrations page](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Integrations.jsx): `src/pages/Integrations.jsx`
- [Integration configuration](https://github.com/ennva/einvoice-frontend/blob/main/src/components/IntegrationManager.js): `src/components/IntegrationManager.js`
- [API keys](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/ApiKeys.jsx): `src/pages/ApiKeys.jsx`
- [Billing](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Billing.jsx): `src/pages/Billing.jsx`
- [Settings](https://github.com/ennva/einvoice-frontend/blob/main/src/pages/Settings.jsx): `src/pages/Settings.jsx`

### Shared client layers

- [HTTP API client](https://github.com/ennva/einvoice-frontend/blob/main/src/lib/api.js): `src/lib/api.js`
- [Shared UI components](https://github.com/ennva/einvoice-frontend/tree/main/src/components/ui): `src/components/ui`

### Other components

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

## Connections

- User → Routes and providers: uses
- Routes and providers → Authentication state: provides auth (evidence: `src/App.js`)
- Routes and providers → Landing and docs: routes to (evidence: `src/App.js`)
- Routes and providers → Login and registration: routes to (evidence: `src/App.js`)
- Routes and providers → Authenticated shell: wraps protected routes (evidence: `src/App.js`)
- Routes and providers → Dashboard: routes to (evidence: `src/App.js`)
- Routes and providers → Invoice list: routes to (evidence: `src/App.js`)
- Routes and providers → Invoice creation: routes to (evidence: `src/App.js`)
- Routes and providers → Invoice detail: routes to (evidence: `src/App.js`)
- Routes and providers → Customers: routes to (evidence: `src/App.js`)
- Routes and providers → Countries: routes to (evidence: `src/App.js`)
- Routes and providers → Currencies: routes to (evidence: `src/App.js`)
- Routes and providers → Integrations page: routes to (evidence: `src/App.js`)
- Routes and providers → API keys: routes to (evidence: `src/App.js`)
- Routes and providers → Billing: routes to (evidence: `src/App.js`)
- Routes and providers → Settings: routes to (evidence: `src/App.js`)
- Login and registration → Authentication state: calls auth (evidence: `src/pages/auth/Login.jsx`)
- Authentication state → HTTP API client: sends auth requests (evidence: `src/context/AuthContext.jsx`)
- Invoice creation → HTTP API client: submits invoice (evidence: `src/pages/InvoiceCreate.jsx`)
- Integration configuration → Backend API: manages configurations (evidence: `src/components/IntegrationManager.js`)
- HTTP API client → Backend API: sends HTTP requests (evidence: `src/lib/api.js`)
- Invoice creation → Shared UI components: renders with (evidence: `src/pages/InvoiceCreate.jsx`)
- Authenticated shell → Shared UI components: uses (evidence: `src/components/layout/AppLayout.jsx`)
