# cedricb40/test_unitaire architecture

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

- Interactive diagram: https://gitdiagram.com/cedricb40/test_unitaire
- Repository: https://github.com/cedricb40/test_unitaire

## Overview

This is an Angular unit-testing training project, not a connected commerce or account-management system. Its visible runtime entry point bootstraps a small product-card app; separate calculator, exercise, and service examples are independent behaviors. The README documents Angular development and testing commands, not additional product capabilities. Some component templates and several implementation files were not sampled, so their internal wiring is not inferred.

Main entry points: [`src/main.ts`](https://github.com/cedricb40/test_unitaire/blob/main/src/main.ts) (App bootstrap), [`src/app/app.ts`](https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.ts) (Root component), [`src/app/app.config.ts`](https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.config.ts) (App config), [`src/app/product/components/product-card/product-card.ts`](https://github.com/cedricb40/test_unitaire/blob/main/src/app/product/components/product-card/product-card.ts) (Product card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Angular app"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_config["App config<br/>[app.config.ts]"]
  node_root["Root component<br/>[app.ts]"]
  node_routes["Routes<br/>[app.routes.ts]"]
  node_product["Product model<br/>[product.ts]"]
  node_card["Product card<br/>[product-card.ts]"]
end

subgraph group_examples["Standalone examples"]
  node_add["Add function<br/>[add.ts]"]
  node_multiply["Multiply function<br/>[mul.ts]"]
  node_discount["Discount tiers<br/>[discount.ts]"]
  node_grade["Grade mapping<br/>[getGrade.ts]"]
  node_password["Password example<br/>[password.ts]"]
end

subgraph group_services["Service examples"]
  node_calculator["Calculator service"]
  node_order["Order totals<br/>[OrderService.ts]"]
  node_tax["Tax calculation<br/>[TaxService.ts]"]
  node_user["User permissions<br/>[UserService.ts]"]
  node_permission["Permission check"]
end

node_browser(("Browser"))

node_browser -->|"starts"| node_bootstrap
node_bootstrap -->|"uses config"| node_config
node_bootstrap -->|"bootstraps"| node_root
node_config -->|"provides routes"| node_routes
node_root -->|"imports"| node_card
node_root -->|"holds product"| node_product
node_card -->|"accepts input"| node_product
node_order -->|"calculates tax"| node_tax
node_user -->|"checks permission"| node_permission

click node_bootstrap "https://github.com/cedricb40/test_unitaire/blob/main/src/main.ts"
click node_config "https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.config.ts"
click node_root "https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.ts"
click node_routes "https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.routes.ts"
click node_product "https://github.com/cedricb40/test_unitaire/blob/main/src/app/product/models/product.ts"
click node_card "https://github.com/cedricb40/test_unitaire/blob/main/src/app/product/components/product-card/product-card.ts"
click node_add "https://github.com/cedricb40/test_unitaire/blob/main/src/app/calculator/add.ts"
click node_multiply "https://github.com/cedricb40/test_unitaire/blob/main/src/app/calculator/mul.ts"
click node_discount "https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/discount.ts"
click node_grade "https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/getGrade.ts"
click node_password "https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/password.ts"
click node_calculator "https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/CalculatorService.ts"
click node_order "https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/OrderService.ts"
click node_tax "https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/TaxService.ts"
click node_user "https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/UserService.ts"
click node_permission "https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/PermissionService.ts"

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_bootstrap,node_config,node_root,node_routes,node_product,node_card,node_browser toneBlue
class node_add,node_multiply,node_discount,node_grade,node_password toneAmber
class node_calculator,node_order,node_tax,node_user,node_permission toneMint
```

## Components

### Angular app

- [App bootstrap](https://github.com/cedricb40/test_unitaire/blob/main/src/main.ts): `src/main.ts`
- [App config](https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.config.ts): `src/app/app.config.ts`
- [Root component](https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.ts): `src/app/app.ts`
- [Routes](https://github.com/cedricb40/test_unitaire/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Product model](https://github.com/cedricb40/test_unitaire/blob/main/src/app/product/models/product.ts): `src/app/product/models/product.ts`
- [Product card](https://github.com/cedricb40/test_unitaire/blob/main/src/app/product/components/product-card/product-card.ts): `src/app/product/components/product-card/product-card.ts`

### Standalone examples

- [Add function](https://github.com/cedricb40/test_unitaire/blob/main/src/app/calculator/add.ts): `src/app/calculator/add.ts`
- [Multiply function](https://github.com/cedricb40/test_unitaire/blob/main/src/app/calculator/mul.ts): `src/app/calculator/mul.ts`
- [Discount tiers](https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/discount.ts): `src/app/exo/discount.ts`
- [Grade mapping](https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/getGrade.ts): `src/app/exo/getGrade.ts`
- [Password example](https://github.com/cedricb40/test_unitaire/blob/main/src/app/exo/password.ts): `src/app/exo/password.ts`

### Service examples

- [Calculator service](https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/CalculatorService.ts): `src/app/services/CalculatorService.ts`
- [Order totals](https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/OrderService.ts): `src/app/services/OrderService.ts`
- [Tax calculation](https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/TaxService.ts): `src/app/services/TaxService.ts`
- [User permissions](https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/UserService.ts): `src/app/services/UserService.ts`
- [Permission check](https://github.com/cedricb40/test_unitaire/blob/main/src/app/services/PermissionService.ts): `src/app/services/PermissionService.ts`

### Other components

- **Browser**

## Connections

- Browser → App bootstrap: starts
- App bootstrap → App config: uses config
- App bootstrap → Root component: bootstraps
- App config → Routes: provides routes
- Root component → Product card: imports
- Root component → Product model: holds product
- Product card → Product model: accepts input
- Order totals → Tax calculation: calculates tax
- User permissions → Permission check: checks permission
