# ricardumr/sialp-main architecture

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

- Interactive diagram: https://gitdiagram.com/ricardumr/sialp-main
- Repository: https://github.com/ricardumr/sialp-main

## Overview

This is a Portuguese-language inventory and asset-conference mobile app built with React Native and Firebase. Users authenticate, enter the app menu, register or import inventory, organize it by rooms, and run room- or item-level conferences whose results can be reviewed in conference lists and detail views. User records provide the app’s tenant and permission context. The source index documents the menu’s navigation and Firebase usage; some feature screens and the Cloud Functions implementation were not excerpted, so uncertain links are omitted or marked optional.

Main entry points: [`firebase.js`](https://github.com/ricardumr/sialp-main/blob/main/firebase.js) (Firebase client), [`screens/Menu.tsx`](https://github.com/ricardumr/sialp-main/blob/main/screens/Menu.tsx) (Feature menu), [`screens/Conferencia_inventario.tsx`](https://github.com/ricardumr/sialp-main/blob/main/screens/Conferencia_inventario.tsx) (Item conference), [`App.tsx`](https://github.com/ricardumr/sialp-main/blob/main/App.tsx) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App entry<br/>[App.tsx]"]
  node_login["Sign in<br/>[Login.tsx]"]
  node_menu["Feature menu<br/>[Menu.tsx]"]
  node_account["Account setup"]
  node_userlist["User management"]
end

subgraph group_inventory["Inventory management"]
  node_itemform["Item registration<br/>[Cadastro_item.tsx]"]
  node_itemlist["Item browsing<br/>[Listar_itens.tsx]"]
  node_import["Inventory import"]
  node_roomform["Room registration<br/>[Cadastro_sala.tsx]"]
  node_roomlist["Room browsing<br/>[Listar_salas.tsx]"]
  node_locations["Location view<br/>[Listar_local.tsx]"]
  node_itemmodel["Item records<br/>[Item.tsx]"]
  node_roommodel["Room records<br/>[Sala.tsx]"]
end

subgraph group_conference["Asset conferences"]
  node_itemconference["Item conference"]
  node_roomconference["Room conference"]
  node_conferencelist["Conference list"]
  node_conferencedetail["Conference detail"]
  node_conferenceprogress["Conference progress"]
end

subgraph group_platform["Identity and data"]
  node_usercontext["Tenant context<br/>[userContext.ts]"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_firebasestore[("Firebase services")]
  node_otp["OTP service<br/>[otpService.ts]"]
  node_cloudfunctions["Cloud Functions<br/>[index.js]"]
end

node_user(("App user"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_menu
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_account
node_user -->|"signs in"| node_login
node_login -->|"authenticates with"| node_firebase
node_menu -->|"opens"| node_itemform
node_menu -->|"opens"| node_itemlist
node_menu -->|"opens"| node_import
node_menu -->|"opens"| node_roomform
node_menu -->|"opens"| node_roomlist
node_menu -->|"opens"| node_locations
node_menu -->|"opens"| node_itemconference
node_menu -->|"opens"| node_roomconference
node_menu -->|"opens"| node_conferencelist
node_menu -->|"opens"| node_conferencedetail
node_menu -->|"opens"| node_userlist
node_itemform -->|"reads and writes"| node_firebase
node_itemlist -->|"reads and writes"| node_firebase
node_import -->|"imports into"| node_firebase
node_roomform -->|"reads and writes"| node_firebase
node_roomlist -->|"reads and writes"| node_firebase
node_locations -->|"reads from"| node_firebase
node_itemconference -->|"reads and updates"| node_firebase
node_roomconference -->|"reads and updates"| node_firebase
node_conferencelist -->|"reads from"| node_firebase
node_conferencedetail -->|"reads from"| node_firebase
node_account -->|"registers with"| node_firebase
node_userlist -->|"reads and writes"| node_firebase
node_usercontext -->|"loads tenant context"| node_firebase
node_itemconference -->|"checks permissions"| node_usercontext
node_itemconference -->|"uses records"| node_itemmodel
node_itemconference -->|"uses rooms"| node_roommodel
node_itemform -->|"uses records"| node_itemmodel
node_itemform -->|"uses rooms"| node_roommodel
node_roomform -->|"uses records"| node_roommodel
node_roomconference -->|"uses rooms"| node_roommodel
node_itemconference -->|"uses progress"| node_conferenceprogress
node_roomconference -->|"uses progress"| node_conferenceprogress
node_firebase -->|"connects to"| node_firebasestore
node_firebase -.->|"calls functions"| node_cloudfunctions
node_otp -->|"calls callable API"| node_firebase
node_otp -.->|"requests OTP operations"| node_cloudfunctions

click node_app "https://github.com/ricardumr/sialp-main/blob/main/App.tsx"
click node_login "https://github.com/ricardumr/sialp-main/blob/main/screens/Login.tsx"
click node_menu "https://github.com/ricardumr/sialp-main/blob/main/screens/Menu.tsx"
click node_account "https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_usuario.tsx"
click node_userlist "https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_usuarios.tsx"
click node_itemform "https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_item.tsx"
click node_itemlist "https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_itens.tsx"
click node_import "https://github.com/ricardumr/sialp-main/blob/main/screens/Importar_inventario.tsx"
click node_roomform "https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_sala.tsx"
click node_roomlist "https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_salas.tsx"
click node_locations "https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_local.tsx"
click node_itemconference "https://github.com/ricardumr/sialp-main/blob/main/screens/Conferencia_inventario.tsx"
click node_roomconference "https://github.com/ricardumr/sialp-main/blob/main/screens/Conferencia_salas.tsx"
click node_conferencelist "https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_conferencias.tsx"
click node_conferencedetail "https://github.com/ricardumr/sialp-main/blob/main/screens/Detalhe_conferencia.tsx"
click node_itemmodel "https://github.com/ricardumr/sialp-main/blob/main/model/Item.tsx"
click node_roommodel "https://github.com/ricardumr/sialp-main/blob/main/model/Sala.tsx"
click node_conferenceprogress "https://github.com/ricardumr/sialp-main/blob/main/model/conferenciaProgress.ts"
click node_usercontext "https://github.com/ricardumr/sialp-main/blob/main/model/userContext.ts"
click node_firebase "https://github.com/ricardumr/sialp-main/blob/main/firebase.js"
click node_otp "https://github.com/ricardumr/sialp-main/blob/main/services/otpService.ts"
click node_cloudfunctions "https://github.com/ricardumr/sialp-main/blob/main/functions/index.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_login,node_menu,node_account,node_userlist,node_user toneBlue
class node_itemform,node_itemlist,node_import,node_roomform,node_roomlist,node_locations,node_itemmodel,node_roommodel toneAmber
class node_itemconference,node_roomconference,node_conferencelist,node_conferencedetail,node_conferenceprogress toneMint
class node_usercontext,node_firebase,node_firebasestore,node_otp,node_cloudfunctions toneRose
```

## Components

### Access and navigation

- [App entry](https://github.com/ricardumr/sialp-main/blob/main/App.tsx): `App.tsx`
- [Sign in](https://github.com/ricardumr/sialp-main/blob/main/screens/Login.tsx): `screens/Login.tsx`
- [Feature menu](https://github.com/ricardumr/sialp-main/blob/main/screens/Menu.tsx): `screens/Menu.tsx`
- [Account setup](https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_usuario.tsx): `screens/Cadastro_usuario.tsx`
- [User management](https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_usuarios.tsx): `screens/Listar_usuarios.tsx`

### Inventory management

- [Item registration](https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_item.tsx): `screens/Cadastro_item.tsx`
- [Item browsing](https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_itens.tsx): `screens/Listar_itens.tsx`
- [Inventory import](https://github.com/ricardumr/sialp-main/blob/main/screens/Importar_inventario.tsx): `screens/Importar_inventario.tsx`
- [Room registration](https://github.com/ricardumr/sialp-main/blob/main/screens/Cadastro_sala.tsx): `screens/Cadastro_sala.tsx`
- [Room browsing](https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_salas.tsx): `screens/Listar_salas.tsx`
- [Location view](https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_local.tsx): `screens/Listar_local.tsx`
- [Item records](https://github.com/ricardumr/sialp-main/blob/main/model/Item.tsx): `model/Item.tsx`
- [Room records](https://github.com/ricardumr/sialp-main/blob/main/model/Sala.tsx): `model/Sala.tsx`

### Asset conferences

- [Item conference](https://github.com/ricardumr/sialp-main/blob/main/screens/Conferencia_inventario.tsx): `screens/Conferencia_inventario.tsx`
- [Room conference](https://github.com/ricardumr/sialp-main/blob/main/screens/Conferencia_salas.tsx): `screens/Conferencia_salas.tsx`
- [Conference list](https://github.com/ricardumr/sialp-main/blob/main/screens/Listar_conferencias.tsx): `screens/Listar_conferencias.tsx`
- [Conference detail](https://github.com/ricardumr/sialp-main/blob/main/screens/Detalhe_conferencia.tsx): `screens/Detalhe_conferencia.tsx`
- [Conference progress](https://github.com/ricardumr/sialp-main/blob/main/model/conferenciaProgress.ts): `model/conferenciaProgress.ts`

### Identity and data

- [Tenant context](https://github.com/ricardumr/sialp-main/blob/main/model/userContext.ts): `model/userContext.ts`
- [Firebase client](https://github.com/ricardumr/sialp-main/blob/main/firebase.js): `firebase.js`
- **Firebase services**
- [OTP service](https://github.com/ricardumr/sialp-main/blob/main/services/otpService.ts): `services/otpService.ts`
- [Cloud Functions](https://github.com/ricardumr/sialp-main/blob/main/functions/index.js): `functions/index.js`

### Other components

- **App user**

## Connections

- App user → App entry: opens
- App entry → Feature menu: routes to (evidence: `App.tsx`)
- App entry → Sign in: routes to (evidence: `App.tsx`)
- App entry → Account setup: routes to (evidence: `App.tsx`)
- App user → Sign in: signs in
- Sign in → Firebase client: authenticates with (evidence: `screens/Login.tsx`)
- Feature menu → Item registration: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Item browsing: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Inventory import: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Room registration: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Room browsing: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Location view: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Item conference: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Room conference: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Conference list: opens (evidence: `screens/Menu.tsx`)
- Feature menu → Conference detail: opens (evidence: `screens/Menu.tsx`)
- Feature menu → User management: opens (evidence: `screens/Menu.tsx`)
- Item registration → Firebase client: reads and writes (evidence: `screens/Cadastro_item.tsx`)
- Item browsing → Firebase client: reads and writes (evidence: `screens/Listar_itens.tsx`)
- Inventory import → Firebase client: imports into (evidence: `screens/Importar_inventario.tsx`)
- Room registration → Firebase client: reads and writes (evidence: `screens/Cadastro_sala.tsx`)
- Room browsing → Firebase client: reads and writes (evidence: `screens/Listar_salas.tsx`)
- Location view → Firebase client: reads from (evidence: `screens/Listar_local.tsx`)
- Item conference → Firebase client: reads and updates (evidence: `screens/Conferencia_inventario.tsx`)
- Room conference → Firebase client: reads and updates (evidence: `screens/Conferencia_salas.tsx`)
- Conference list → Firebase client: reads from (evidence: `screens/Listar_conferencias.tsx`)
- Conference detail → Firebase client: reads from (evidence: `screens/Detalhe_conferencia.tsx`)
- Account setup → Firebase client: registers with (evidence: `screens/Cadastro_usuario.tsx`)
- User management → Firebase client: reads and writes (evidence: `screens/Listar_usuarios.tsx`)
- Tenant context → Firebase client: loads tenant context (evidence: `model/userContext.ts`)
- Item conference → Tenant context: checks permissions (evidence: `screens/Conferencia_inventario.tsx`)
- Item conference → Item records: uses records (evidence: `screens/Conferencia_inventario.tsx`)
- Item conference → Room records: uses rooms (evidence: `screens/Conferencia_inventario.tsx`)
- Item registration → Item records: uses records (evidence: `screens/Cadastro_item.tsx`)
- Item registration → Room records: uses rooms (evidence: `screens/Cadastro_item.tsx`)
- Room registration → Room records: uses records (evidence: `screens/Cadastro_sala.tsx`)
- Room conference → Room records: uses rooms (evidence: `screens/Conferencia_salas.tsx`)
- Item conference → Conference progress: uses progress (evidence: `screens/Conferencia_inventario.tsx`)
- Room conference → Conference progress: uses progress (evidence: `screens/Conferencia_salas.tsx`)
- Firebase client → Firebase services: connects to (evidence: `firebase.js`)
- Firebase client → Cloud Functions: calls functions
- OTP service → Firebase client: calls callable API (evidence: `services/otpService.ts`)
- OTP service → Cloud Functions: requests OTP operations
