# smoufid/declaration_fiscale architecture

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

- Interactive diagram: https://gitdiagram.com/smoufid/declaration_fiscale
- Repository: https://github.com/smoufid/declaration_fiscale

## Overview

DeclaraFiscale is an Electron desktop application for transforming CSV tax and accounting declarations into XML files. The demonstrated workflow is launching the app, opening its main page, then using a declaration-specific renderer to parse CSV records and construct XML; the excerpts show file selection and conversion logic, but not the complete screen-routing or output-writing paths. The renderer modules implement separate declaration forms rather than a shared conversion pipeline. The README is empty, so the graph relies on the file tree and sampled source; unsampled renderer capabilities are represented without inferred connections.

Main entry points: [`index.js`](https://github.com/smoufid/declaration_fiscale/blob/main/index.js) (Electron app), [`page-main.html`](https://github.com/smoufid/declaration_fiscale/blob/main/page-main.html) (Main page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Desktop shell"]
  node_app["Electron app<br/>[index.js]"]
  node_home["Main page<br/>[page-main.html]"]
end

subgraph group_tax["Tax declarations"]
  node_css["CSS declaration"]
  node_income["Income declaration"]
  node_vatclient["VAT client debtor"]
  node_vatvendor["VAT supplier 75%"]
  node_vatdeduction["VAT deduction"]
  node_lateinvoices["Late invoices"]
  node_tpi["TPI declaration<br/>[renderer-tpi.js]"]
end

subgraph group_payments["Withholding and payments"]
  node_thirdparties["Third-party payees"]
  node_nonresident["Nonresident payees"]
  node_withholding["VAT withholding"]
  node_foreignwithholding["Foreign VAT withholding"]
  node_assetswithholding["Asset withholding"]
end

subgraph group_accounts["Accounting declarations"]
  node_liasse["Tax statement bundle<br/>[renderer-liasse.js]"]
end

node_user(("Desktop user"))

node_user -->|"launches"| node_app
node_app -->|"loads"| node_home

click node_app "https://github.com/smoufid/declaration_fiscale/blob/main/index.js"
click node_home "https://github.com/smoufid/declaration_fiscale/blob/main/page-main.html"
click node_css "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationcss.js"
click node_income "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationir.js"
click node_vatclient "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationtvaclient.js"
click node_vatvendor "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationtvafournisseur.js"
click node_vatdeduction "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-deductiontva.js"
click node_lateinvoices "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-factures-retards.js"
click node_tpi "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-tpi.js"
click node_thirdparties "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-renumverstiers.js"
click node_nonresident "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-renumverstiersnonresident.js"
click node_withholding "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueTva.js"
click node_foreignwithholding "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueTvaetrangere.js"
click node_assetswithholding "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueimmobilisation.js"
click node_liasse "https://github.com/smoufid/declaration_fiscale/blob/main/renderer-liasse.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_home,node_user toneBlue
class node_css,node_income,node_vatclient,node_vatvendor,node_vatdeduction,node_lateinvoices,node_tpi toneAmber
class node_thirdparties,node_nonresident,node_withholding,node_foreignwithholding,node_assetswithholding toneMint
class node_liasse toneRose
```

## Components

### Desktop shell

- [Electron app](https://github.com/smoufid/declaration_fiscale/blob/main/index.js): `index.js`
- [Main page](https://github.com/smoufid/declaration_fiscale/blob/main/page-main.html): `page-main.html`

### Tax declarations

- [CSS declaration](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationcss.js): `renderer-declarationcss.js`
- [Income declaration](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationir.js): `renderer-declarationir.js`
- [VAT client debtor](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationtvaclient.js): `renderer-declarationtvaclient.js`
- [VAT supplier 75%](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-declarationtvafournisseur.js): `renderer-declarationtvafournisseur.js`
- [VAT deduction](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-deductiontva.js): `renderer-deductiontva.js`
- [Late invoices](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-factures-retards.js): `renderer-factures-retards.js`
- [TPI declaration](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-tpi.js): `renderer-tpi.js`

### Withholding and payments

- [Third-party payees](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-renumverstiers.js): `renderer-renumverstiers.js`
- [Nonresident payees](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-renumverstiersnonresident.js): `renderer-renumverstiersnonresident.js`
- [VAT withholding](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueTva.js): `renderer-retenueTva.js`
- [Foreign VAT withholding](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueTvaetrangere.js): `renderer-retenueTvaetrangere.js`
- [Asset withholding](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-retenueimmobilisation.js): `renderer-retenueimmobilisation.js`

### Accounting declarations

- [Tax statement bundle](https://github.com/smoufid/declaration_fiscale/blob/main/renderer-liasse.js): `renderer-liasse.js`

### Other components

- **Desktop user**

## Connections

- Desktop user → Electron app: launches (evidence: `index.js`)
- Electron app → Main page: loads (evidence: `index.js`)
