# mr-moked/trackr-demo architecture

> Architecture diagram of the GitHub repository mr-moked/trackr-demo, 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/mr-moked/trackr-demo
- Repository: https://github.com/mr-moked/trackr-demo
- Video tour (about a minute): https://gitdiagram.com/mr-moked/trackr-demo/video

## Overview

Trackr is a small React parcel-tracking demo: a user enters a tracking number, the app filters an in-memory set of sample parcels, then displays matching parcel cards and status badges. Its model includes carrier, delivery estimate, status, and tracking history, although the current cards show only some of those fields. There is no backend or carrier integration in the sampled runtime. The graph reflects the shown imports and calls; it does not assume behavior for unsampled files.

Main entry points: [`src/App.tsx`](https://github.com/mr-moked/trackr-demo/blob/main/src/App.tsx) (Search orchestration), [`src/types.ts`](https://github.com/mr-moked/trackr-demo/blob/main/src/types.ts) (Parcel model), [`src/components/CarteColis.tsx`](https://github.com/mr-moked/trackr-demo/blob/main/src/components/CarteColis.tsx) (Parcel card), [`src/components/ListeColis.tsx`](https://github.com/mr-moked/trackr-demo/blob/main/src/components/ListeColis.tsx) (Parcel list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_mount["React entry<br/>[main.tsx]"]
  node_app["Search orchestration<br/>[App.tsx]"]
end

subgraph group_tracking["Tracking data"]
  node_filter["Tracking filter<br/>[recherche.ts]"]
  node_sampledata[("Sample parcels<br/>[colis.ts]")]
  node_model["Parcel model<br/>[types.ts]"]
end

subgraph group_display["Parcel display"]
  node_searchbar["Search form<br/>[BarreRecherche.tsx]"]
  node_list["Parcel list<br/>[ListeColis.tsx]"]
  node_card["Parcel card<br/>[CarteColis.tsx]"]
  node_status["Status badge<br/>[BadgeStatut.tsx]"]
  node_dates["Date formatter<br/>[dates.ts]"]
end

node_user(("Parcel user"))

node_mount -->|"renders"| node_app
node_user -->|"enters query"| node_searchbar
node_app -->|"renders"| node_searchbar
node_searchbar -->|"submits query"| node_app
node_app -->|"reads samples"| node_sampledata
node_app -->|"filters parcels"| node_filter
node_app -->|"renders results"| node_list
node_list -->|"renders cards"| node_card
node_card -->|"renders status"| node_status
node_card -->|"formats estimate"| node_dates
node_sampledata -->|"uses parcel type"| node_model
node_filter -->|"uses parcel type"| node_model
node_list -->|"uses parcel type"| node_model
node_card -->|"uses parcel type"| node_model
node_status -->|"uses status type"| node_model

click node_mount "https://github.com/mr-moked/trackr-demo/blob/main/src/main.tsx"
click node_app "https://github.com/mr-moked/trackr-demo/blob/main/src/App.tsx"
click node_searchbar "https://github.com/mr-moked/trackr-demo/blob/main/src/components/BarreRecherche.tsx"
click node_filter "https://github.com/mr-moked/trackr-demo/blob/main/src/utils/recherche.ts"
click node_sampledata "https://github.com/mr-moked/trackr-demo/blob/main/src/data/colis.ts"
click node_model "https://github.com/mr-moked/trackr-demo/blob/main/src/types.ts"
click node_list "https://github.com/mr-moked/trackr-demo/blob/main/src/components/ListeColis.tsx"
click node_card "https://github.com/mr-moked/trackr-demo/blob/main/src/components/CarteColis.tsx"
click node_status "https://github.com/mr-moked/trackr-demo/blob/main/src/components/BadgeStatut.tsx"
click node_dates "https://github.com/mr-moked/trackr-demo/blob/main/src/utils/dates.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_mount,node_app,node_user toneBlue
class node_filter,node_sampledata,node_model toneAmber
class node_searchbar,node_list,node_card,node_status,node_dates toneMint
```

## Components

### Application

- [React entry](https://github.com/mr-moked/trackr-demo/blob/main/src/main.tsx): `src/main.tsx`
- [Search orchestration](https://github.com/mr-moked/trackr-demo/blob/main/src/App.tsx): `src/App.tsx`

### Tracking data

- [Tracking filter](https://github.com/mr-moked/trackr-demo/blob/main/src/utils/recherche.ts): `src/utils/recherche.ts`
- [Sample parcels](https://github.com/mr-moked/trackr-demo/blob/main/src/data/colis.ts): `src/data/colis.ts`
- [Parcel model](https://github.com/mr-moked/trackr-demo/blob/main/src/types.ts): `src/types.ts`

### Parcel display

- [Search form](https://github.com/mr-moked/trackr-demo/blob/main/src/components/BarreRecherche.tsx): `src/components/BarreRecherche.tsx`
- [Parcel list](https://github.com/mr-moked/trackr-demo/blob/main/src/components/ListeColis.tsx): `src/components/ListeColis.tsx`
- [Parcel card](https://github.com/mr-moked/trackr-demo/blob/main/src/components/CarteColis.tsx): `src/components/CarteColis.tsx`
- [Status badge](https://github.com/mr-moked/trackr-demo/blob/main/src/components/BadgeStatut.tsx): `src/components/BadgeStatut.tsx`
- [Date formatter](https://github.com/mr-moked/trackr-demo/blob/main/src/utils/dates.ts): `src/utils/dates.ts`

### Other components

- **Parcel user**

## Connections

- React entry → Search orchestration: renders (evidence: `src/main.tsx`)
- Parcel user → Search form: enters query (evidence: `src/components/BarreRecherche.tsx`)
- Search orchestration → Search form: renders (evidence: `src/App.tsx`)
- Search form → Search orchestration: submits query (evidence: `src/components/BarreRecherche.tsx`)
- Search orchestration → Sample parcels: reads samples (evidence: `src/App.tsx`)
- Search orchestration → Tracking filter: filters parcels (evidence: `src/App.tsx`)
- Search orchestration → Parcel list: renders results (evidence: `src/App.tsx`)
- Parcel list → Parcel card: renders cards (evidence: `src/components/ListeColis.tsx`)
- Parcel card → Status badge: renders status (evidence: `src/components/CarteColis.tsx`)
- Parcel card → Date formatter: formats estimate (evidence: `src/components/CarteColis.tsx`)
- Sample parcels → Parcel model: uses parcel type (evidence: `src/data/colis.ts`)
- Tracking filter → Parcel model: uses parcel type (evidence: `src/utils/recherche.ts`)
- Parcel list → Parcel model: uses parcel type (evidence: `src/components/ListeColis.tsx`)
- Parcel card → Parcel model: uses parcel type (evidence: `src/components/CarteColis.tsx`)
- Status badge → Parcel model: uses status type (evidence: `src/components/BadgeStatut.tsx`)
