# sharathchandramg/react-native-formo architecture

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

- Interactive diagram: https://gitdiagram.com/sharathchandramg/react-native-formo
- Repository: https://github.com/sharathchandramg/react-native-formo

## Overview

react-native-form0 is a React Native, schema-driven form library. A caller supplies field definitions and optional initial values; the Form0 component builds and renders fields, manages values and validation, and exposes methods such as getValues, setValues, and resetForm. The field catalog includes nested forms, selection and lookup flows, and media or device-oriented inputs. The graph reflects README capabilities and source-index references; unsampled field implementations are represented by their feature directories, so their internal calls are not inferred.

Main entry points: [`src/index.js`](https://github.com/sharathchandramg/react-native-formo/blob/master/src/index.js) (Form0 renderer), [`src/fields/lookup/index.js`](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/lookup/index.js) (Lookup field), [`src/fields/image/index.js`](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/image/index.js) (Image input), [`src/utils/validators.js`](https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/validators.js) (Validation primitives)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_form["Form runtime"]
  node_form0["Form0 renderer<br/>[index.js]"]
  node_fieldstate["Field state and values<br/>[index.js]"]
end

subgraph group_fields["Field inputs"]
  node_textfields["Text and numeric inputs<br/>[index.js]"]
  node_basicfields["Basic field types"]
  node_datefield["Date input"]
  node_nestedforms["Nested forms<br/>[index.js]"]
  node_grid["Grid fields<br/>[index.js]"]
  node_specialfields["Specialized fields"]
  node_gridui["Grid components"]
end

subgraph group_selection["Selection UI"]
  node_selectfield["Select input<br/>[index.js]"]
  node_lookupfield["Lookup field<br/>[index.js]"]
  node_lookupui["Lookup results UI<br/>[index.js]"]
  node_filterui["Lookup filters<br/>[index.js]"]
  node_collaboration["People selection<br/>[index.js]"]
end

subgraph group_media["Media and device fields"]
  node_image["Image input<br/>[index.js]"]
  node_signature["Signature input<br/>[index.js]"]
  node_document["Document input<br/>[index.js]"]
  node_barcode["Barcode input"]
  node_location["Location input<br/>[index.js]"]
  node_zoom["Image preview<br/>[index.js]"]
  node_scanner["Barcode scanner<br/>[index.js]"]
end

subgraph group_shared["Shared logic"]
  node_validation["Validation<br/>[helper.js]"]
  node_validators["Validation primitives<br/>[validators.js]"]
  node_calculations["Calculated fields<br/>[helper.js]"]
  node_star["Required marker<br/>[index.js]"]
end

node_caller(("Form consumer"))

node_caller -->|"provides schema"| node_form0
node_form0 -->|"initializes fields"| node_fieldstate
node_form0 -->|"renders field"| node_textfields
node_form0 -->|"renders field"| node_basicfields
node_form0 -->|"renders field"| node_datefield
node_form0 -->|"renders field"| node_selectfield
node_form0 -->|"renders field"| node_lookupfield
node_form0 -->|"renders field"| node_collaboration
node_form0 -->|"renders field"| node_nestedforms
node_form0 -->|"renders field"| node_grid
node_form0 -->|"renders field"| node_image
node_form0 -->|"renders field"| node_signature
node_form0 -->|"renders field"| node_document
node_form0 -->|"renders field"| node_barcode
node_form0 -->|"renders field"| node_location
node_form0 -.->|"renders field"| node_specialfields
node_form0 -->|"validates values"| node_validation
node_form0 -->|"calculates fields"| node_calculations
node_validation -->|"uses primitives"| node_validators
node_textfields -->|"checks values"| node_validators
node_selectfield -->|"checks values"| node_validators
node_lookupfield -->|"renders results"| node_lookupui
node_lookupfield -->|"renders filters"| node_filterui
node_lookupfield -->|"opens scanner"| node_scanner
node_image -->|"previews images"| node_zoom
node_signature -->|"previews images"| node_zoom
node_grid -->|"renders grid"| node_gridui
node_image -->|"renders required marker"| node_star
node_collaboration -->|"renders required marker"| node_star

click node_form0 "https://github.com/sharathchandramg/react-native-formo/blob/master/src/index.js"
click node_fieldstate "https://github.com/sharathchandramg/react-native-formo/blob/master/src/index.js"
click node_validation "https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/helper.js"
click node_validators "https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/validators.js"
click node_calculations "https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/helper.js"
click node_textfields "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/textInput/index.js"
click node_basicfields "https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/switch"
click node_datefield "https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/date"
click node_selectfield "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/select/index.js"
click node_lookupfield "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/lookup/index.js"
click node_lookupui "https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/lookup/index.js"
click node_filterui "https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/filter/index.js"
click node_collaboration "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/collaborator/index.js"
click node_nestedforms "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/subForm/index.js"
click node_grid "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/simplegrid/index.js"
click node_image "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/image/index.js"
click node_signature "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/signature/index.js"
click node_document "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/document/index.js"
click node_barcode "https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/barcode"
click node_location "https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/location/index.js"
click node_specialfields "https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields"
click node_zoom "https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/zoomImage/index.js"
click node_scanner "https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/barcodeScanner/index.js"
click node_star "https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/starIcon/index.js"
click node_gridui "https://github.com/sharathchandramg/react-native-formo/tree/master/src/components/grid"

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_form0,node_fieldstate toneBlue
class node_textfields,node_basicfields,node_datefield,node_nestedforms,node_grid,node_specialfields,node_gridui toneAmber
class node_selectfield,node_lookupfield,node_lookupui,node_filterui,node_collaboration toneMint
class node_image,node_signature,node_document,node_barcode,node_location,node_zoom,node_scanner toneRose
class node_validation,node_validators,node_calculations,node_star,node_caller toneIndigo
```

## Components

### Form runtime

- [Form0 renderer](https://github.com/sharathchandramg/react-native-formo/blob/master/src/index.js): `src/index.js`
- [Field state and values](https://github.com/sharathchandramg/react-native-formo/blob/master/src/index.js): `src/index.js`

### Field inputs

- [Text and numeric inputs](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/textInput/index.js): `src/fields/textInput/index.js`
- [Basic field types](https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/switch): `src/fields/switch`
- [Date input](https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/date): `src/fields/date`
- [Nested forms](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/subForm/index.js): `src/fields/subForm/index.js`
- [Grid fields](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/simplegrid/index.js): `src/fields/simplegrid/index.js`
- [Specialized fields](https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields): `src/fields`
- [Grid components](https://github.com/sharathchandramg/react-native-formo/tree/master/src/components/grid): `src/components/grid`

### Selection UI

- [Select input](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/select/index.js): `src/fields/select/index.js`
- [Lookup field](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/lookup/index.js): `src/fields/lookup/index.js`
- [Lookup results UI](https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/lookup/index.js): `src/components/lookup/index.js`
- [Lookup filters](https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/filter/index.js): `src/components/filter/index.js`
- [People selection](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/collaborator/index.js): `src/fields/collaborator/index.js`

### Media and device fields

- [Image input](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/image/index.js): `src/fields/image/index.js`
- [Signature input](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/signature/index.js): `src/fields/signature/index.js`
- [Document input](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/document/index.js): `src/fields/document/index.js`
- [Barcode input](https://github.com/sharathchandramg/react-native-formo/tree/master/src/fields/barcode): `src/fields/barcode`
- [Location input](https://github.com/sharathchandramg/react-native-formo/blob/master/src/fields/location/index.js): `src/fields/location/index.js`
- [Image preview](https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/zoomImage/index.js): `src/components/zoomImage/index.js`
- [Barcode scanner](https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/barcodeScanner/index.js): `src/components/barcodeScanner/index.js`

### Shared logic

- [Validation](https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/helper.js): `src/utils/helper.js`
- [Validation primitives](https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/validators.js): `src/utils/validators.js`
- [Calculated fields](https://github.com/sharathchandramg/react-native-formo/blob/master/src/utils/helper.js): `src/utils/helper.js`
- [Required marker](https://github.com/sharathchandramg/react-native-formo/blob/master/src/components/starIcon/index.js): `src/components/starIcon/index.js`

### Other components

- **Form consumer**

## Connections

- Form consumer → Form0 renderer: provides schema (evidence: `README.md`)
- Form0 renderer → Field state and values: initializes fields (evidence: `src/index.js`)
- Form0 renderer → Text and numeric inputs: renders field (evidence: `src/index.js`)
- Form0 renderer → Basic field types: renders field (evidence: `src/index.js`)
- Form0 renderer → Date input: renders field (evidence: `src/index.js`)
- Form0 renderer → Select input: renders field (evidence: `src/index.js`)
- Form0 renderer → Lookup field: renders field (evidence: `src/index.js`)
- Form0 renderer → People selection: renders field (evidence: `src/index.js`)
- Form0 renderer → Nested forms: renders field (evidence: `src/index.js`)
- Form0 renderer → Grid fields: renders field (evidence: `src/index.js`)
- Form0 renderer → Image input: renders field (evidence: `src/index.js`)
- Form0 renderer → Signature input: renders field (evidence: `src/index.js`)
- Form0 renderer → Document input: renders field (evidence: `src/index.js`)
- Form0 renderer → Barcode input: renders field (evidence: `src/index.js`)
- Form0 renderer → Location input: renders field (evidence: `src/index.js`)
- Form0 renderer → Specialized fields: renders field (evidence: `src/index.js`)
- Form0 renderer → Validation: validates values (evidence: `src/index.js`)
- Form0 renderer → Calculated fields: calculates fields (evidence: `src/index.js`)
- Validation → Validation primitives: uses primitives (evidence: `src/utils/helper.js`)
- Text and numeric inputs → Validation primitives: checks values (evidence: `src/fields/textInput/index.js`)
- Select input → Validation primitives: checks values (evidence: `src/fields/select/index.js`)
- Lookup field → Lookup results UI: renders results (evidence: `src/fields/lookup/index.js`)
- Lookup field → Lookup filters: renders filters (evidence: `src/fields/lookup/index.js`)
- Lookup field → Barcode scanner: opens scanner (evidence: `src/fields/lookup/index.js`)
- Image input → Image preview: previews images (evidence: `src/fields/image/index.js`)
- Signature input → Image preview: previews images (evidence: `src/fields/signature/index.js`)
- Grid fields → Grid components: renders grid (evidence: `src/fields/simplegrid/index.js`)
- Image input → Required marker: renders required marker (evidence: `src/fields/image/index.js`)
- People selection → Required marker: renders required marker (evidence: `src/fields/collaborator/index.js`)
