# higorpalmeira/catalogo-produtos architecture

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

- Interactive diagram: https://gitdiagram.com/higorpalmeira/catalogo-produtos
- Repository: https://github.com/higorpalmeira/catalogo-produtos

## Overview

This is a small React Native product-listing app. Users view saved products on Home, open Register, enter and validate product details, and save a new product locally; the Home screen loads and displays saved products through cards. The graph covers the documented-by-source workflow and its storage, navigation, UI components, and product/category types. The README is empty, and unsampled modules are included only where the source index establishes their role or use.

Main entry points: [`src/pages/Home/index.tsx`](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Home/index.tsx) (Product list), [`src/pages/Register/index.tsx`](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Register/index.tsx) (Product registration), [`src/storage/productsStorage.ts`](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/storage/productsStorage.ts) (Product storage), [`src/routes/app.routes.tsx`](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/routes/app.routes.tsx) (Screen routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App entry<br/>[App.tsx]"]
  node_routes["Screen routes<br/>[app.routes.tsx]"]
  node_navtypes["Navigation types<br/>[navigationTypes.ts]"]
end

subgraph group_catalog["Product catalog"]
  node_home["Product list<br/>[index.tsx]"]
  node_register["Product registration<br/>[index.tsx]"]
  node_storage["Product storage<br/>[productsStorage.ts]"]
  node_localstore[("Async key-value store")]
end

subgraph group_ui["Reusable UI"]
  node_card["Product card<br/>[index.tsx]"]
  node_input["Text input<br/>[index.tsx]"]
  node_select["Category selector<br/>[index.tsx]"]
end

subgraph group_domain["Catalog types"]
  node_product["Product model<br/>[produtoTypes.ts]"]
  node_category["Category values<br/>[categoriaTypes.ts]"]
end

node_user(("User"))

node_user -->|"opens app"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_register
node_routes -->|"types routes"| node_navtypes
node_home -->|"uses navigation types"| node_navtypes
node_register -->|"uses navigation types"| node_navtypes
node_home -->|"loads products"| node_storage
node_register -->|"adds product"| node_storage
node_storage -->|"reads and writes"| node_localstore
node_home -->|"renders products"| node_card
node_register -->|"renders fields"| node_input
node_register -->|"renders category picker"| node_select
node_storage -->|"stores records"| node_product
node_storage -->|"filters by category"| node_category
node_home -->|"uses product type"| node_product
node_home -->|"uses category type"| node_category
node_register -->|"uses category values"| node_category
node_card -->|"renders product"| node_product
node_select -->|"selects category"| node_category

click node_app "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/App.tsx"
click node_routes "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/routes/app.routes.tsx"
click node_navtypes "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/routes/navigationTypes.ts"
click node_home "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Home/index.tsx"
click node_register "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Register/index.tsx"
click node_storage "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/storage/productsStorage.ts"
click node_card "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/ProdutoCard/index.tsx"
click node_input "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/Input/index.tsx"
click node_select "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/Select/index.tsx"
click node_product "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/types/Produto/produtoTypes.ts"
click node_category "https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/types/Categoria/categoriaTypes.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_app,node_routes,node_navtypes,node_user toneBlue
class node_home,node_register,node_storage,node_localstore toneAmber
class node_card,node_input,node_select toneMint
class node_product,node_category toneRose
```

## Components

### App and navigation

- [App entry](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/App.tsx): `src/App.tsx`
- [Screen routes](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/routes/app.routes.tsx): `src/routes/app.routes.tsx`
- [Navigation types](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/routes/navigationTypes.ts): `src/routes/navigationTypes.ts`

### Product catalog

- [Product list](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Home/index.tsx): `src/pages/Home/index.tsx`
- [Product registration](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/pages/Register/index.tsx): `src/pages/Register/index.tsx`
- [Product storage](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/storage/productsStorage.ts): `src/storage/productsStorage.ts`
- **Async key-value store**

### Reusable UI

- [Product card](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/ProdutoCard/index.tsx): `src/components/ProdutoCard/index.tsx`
- [Text input](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/Input/index.tsx): `src/components/Input/index.tsx`
- [Category selector](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/components/Select/index.tsx): `src/components/Select/index.tsx`

### Catalog types

- [Product model](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/types/Produto/produtoTypes.ts): `src/types/Produto/produtoTypes.ts`
- [Category values](https://github.com/higorpalmeira/catalogo-produtos/blob/main/src/types/Categoria/categoriaTypes.ts): `src/types/Categoria/categoriaTypes.ts`

### Other components

- **User**

## Connections

- User → App entry: opens app (evidence: `src/App.tsx`)
- App entry → Screen routes: renders (evidence: `src/App.tsx`)
- Screen routes → Product list: routes to (evidence: `src/routes/app.routes.tsx`)
- Screen routes → Product registration: routes to (evidence: `src/routes/app.routes.tsx`)
- Screen routes → Navigation types: types routes (evidence: `src/routes/app.routes.tsx`)
- Product list → Navigation types: uses navigation types (evidence: `src/pages/Home/index.tsx`)
- Product registration → Navigation types: uses navigation types (evidence: `src/pages/Register/index.tsx`)
- Product list → Product storage: loads products (evidence: `src/pages/Home/index.tsx`)
- Product registration → Product storage: adds product (evidence: `src/pages/Register/index.tsx`)
- Product storage → Async key-value store: reads and writes (evidence: `src/storage/productsStorage.ts`)
- Product list → Product card: renders products (evidence: `src/pages/Home/index.tsx`)
- Product registration → Text input: renders fields (evidence: `src/pages/Register/index.tsx`)
- Product registration → Category selector: renders category picker (evidence: `src/pages/Register/index.tsx`)
- Product storage → Product model: stores records (evidence: `src/storage/productsStorage.ts`)
- Product storage → Category values: filters by category (evidence: `src/storage/productsStorage.ts`)
- Product list → Product model: uses product type (evidence: `src/pages/Home/index.tsx`)
- Product list → Category values: uses category type (evidence: `src/pages/Home/index.tsx`)
- Product registration → Category values: uses category values (evidence: `src/pages/Register/index.tsx`)
- Product card → Product model: renders product (evidence: `src/components/ProdutoCard/index.tsx`)
- Category selector → Category values: selects category (evidence: `src/components/Select/index.tsx`)
