# barathon-2i-tech/barathon_mobile architecture

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

- Interactive diagram: https://gitdiagram.com/barathon-2i-tech/barathon_mobile
- Repository: https://github.com/barathon-2i-tech/barathon_mobile

## Overview

This is an Expo/React Native mobile client for discovering local bars and events and booking event places. Users enter through login or registration, then browse a city feed or map, open event or establishment details, and manage bookings or tickets. The API and local user storage are shared internal layers. The README identifies a separate Barathon API backend; several screens are indexed but not excerpted, so their internal behavior and some connections are not inferred.

Main entry points: [`App.js`](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/App.js) (Navigation shell), [`src/pages/Home.js`](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Home.js) (City home feed), [`src/pages/Search.js`](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Search.js) (Map search), [`src/constants/axios.js`](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/constants/axios.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Navigation shell<br/>[App.js]"]
end

subgraph group_account["Account access"]
  node_auth["Authentication screen<br/>[Authenticator.js]"]
  node_login["Login form<br/>[Login.js]"]
  node_register["Registration form<br/>[Register.js]"]
  node_dashboard["User dashboard<br/>[Dashboard.js]"]
end

subgraph group_discovery["Event discovery"]
  node_home["City home feed<br/>[Home.js]"]
  node_header["Home header<br/>[Header.js]"]
  node_carousel["Event carousel<br/>[Carousel.js]"]
  node_tags["Category carousel<br/>[CarouselTags.js]"]
  node_agenda["Booking agenda<br/>[Agenda.js]"]
  node_search["Map search<br/>[Search.js]"]
  node_establishment["Establishment details<br/>[Establishment.js]"]
  node_category["Category events"]
end

subgraph group_booking["Bookings and tickets"]
  node_event["Event details<br/>[Event.js]"]
  node_ticket["Ticket view<br/>[Ticket.js]"]
  node_qr["QR code view<br/>[QrCode.js]"]
end

subgraph group_shared["Shared services"]
  node_api["HTTP API client<br/>[axios.js]"]
  node_storage["Local user storage<br/>[localStorage.js]"]
end

node_user(("Mobile user"))
node_backend["Barathon API"]
node_asyncstorage[("AsyncStorage")]
node_location["Device location"]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_event
node_app -->|"routes to"| node_establishment
node_app -->|"routes to"| node_category
node_app -->|"routes to"| node_ticket
node_app -->|"routes to"| node_qr
node_app -->|"routes to"| node_dashboard
node_auth -->|"renders"| node_login
node_auth -->|"renders"| node_register
node_login -->|"submits credentials"| node_api
node_login -->|"stores user"| node_storage
node_register -->|"submits registration"| node_api
node_register -->|"stores user"| node_storage
node_home -->|"reads user"| node_storage
node_home -->|"loads feed"| node_api
node_home -->|"renders"| node_header
node_home -->|"renders"| node_carousel
node_home -->|"renders"| node_tags
node_home -->|"renders"| node_agenda
node_carousel -->|"opens event"| node_event
node_search -->|"reads user"| node_storage
node_search -->|"loads map results"| node_api
node_search -->|"requests position"| node_location
node_search -->|"opens establishment"| node_establishment
node_search -->|"opens event"| node_event
node_event -->|"loads and books"| node_api
node_api -.->|"sends requests"| node_backend
node_storage -->|"reads and writes"| node_asyncstorage

click node_app "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/App.js"
click node_auth "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Authenticator.js"
click node_login "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Auth/Login.js"
click node_register "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Auth/Register.js"
click node_home "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Home.js"
click node_header "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Header.js"
click node_carousel "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Carousel.js"
click node_tags "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/CarouselTags.js"
click node_agenda "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Agenda.js"
click node_search "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Search.js"
click node_establishment "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Establishment.js"
click node_category "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/EventsByCategory.js"
click node_event "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Event.js"
click node_ticket "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Ticket.js"
click node_qr "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/QrCode.js"
click node_dashboard "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Dashboard.js"
click node_api "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/constants/axios.js"
click node_storage "https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/constants/localStorage.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_user toneBlue
class node_auth,node_login,node_register,node_dashboard,node_asyncstorage toneAmber
class node_home,node_header,node_carousel,node_tags,node_agenda,node_search,node_establishment,node_category,node_backend toneMint
class node_event,node_ticket,node_qr toneRose
class node_api,node_storage,node_location toneIndigo
```

## Components

### App navigation

- [Navigation shell](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/App.js): `App.js`

### Account access

- [Authentication screen](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Authenticator.js): `src/pages/Authenticator.js`
- [Login form](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Auth/Login.js): `src/components/Auth/Login.js`
- [Registration form](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Auth/Register.js): `src/components/Auth/Register.js`
- [User dashboard](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Dashboard.js): `src/pages/Dashboard.js`

### Event discovery

- [City home feed](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Home.js): `src/pages/Home.js`
- [Home header](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Header.js): `src/components/Home/Header.js`
- [Event carousel](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Carousel.js): `src/components/Home/Carousel.js`
- [Category carousel](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/CarouselTags.js): `src/components/Home/CarouselTags.js`
- [Booking agenda](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/components/Home/Agenda.js): `src/components/Home/Agenda.js`
- [Map search](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Search.js): `src/pages/Search.js`
- [Establishment details](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Establishment.js): `src/pages/Establishment.js`
- [Category events](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/EventsByCategory.js): `src/pages/EventsByCategory.js`

### Bookings and tickets

- [Event details](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Event.js): `src/pages/Event.js`
- [Ticket view](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/Ticket.js): `src/pages/Ticket.js`
- [QR code view](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/pages/QrCode.js): `src/pages/QrCode.js`

### Shared services

- [HTTP API client](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/constants/axios.js): `src/constants/axios.js`
- [Local user storage](https://github.com/barathon-2i-tech/barathon_mobile/blob/develop/src/constants/localStorage.js): `src/constants/localStorage.js`

### Other components

- **Mobile user**
- **Barathon API**
- **AsyncStorage**
- **Device location**

## Connections

- Mobile user → Navigation shell: opens (evidence: `App.js`)
- Navigation shell → Authentication screen: routes to (evidence: `App.js`)
- Navigation shell → City home feed: routes to (evidence: `App.js`)
- Navigation shell → Map search: routes to (evidence: `App.js`)
- Navigation shell → Event details: routes to (evidence: `App.js`)
- Navigation shell → Establishment details: routes to (evidence: `App.js`)
- Navigation shell → Category events: routes to (evidence: `App.js`)
- Navigation shell → Ticket view: routes to (evidence: `App.js`)
- Navigation shell → QR code view: routes to (evidence: `App.js`)
- Navigation shell → User dashboard: routes to (evidence: `App.js`)
- Authentication screen → Login form: renders (evidence: `src/pages/Authenticator.js`)
- Authentication screen → Registration form: renders (evidence: `src/pages/Authenticator.js`)
- Login form → HTTP API client: submits credentials (evidence: `src/components/Auth/Login.js`)
- Login form → Local user storage: stores user (evidence: `src/components/Auth/Login.js`)
- Registration form → HTTP API client: submits registration (evidence: `src/components/Auth/Register.js`)
- Registration form → Local user storage: stores user (evidence: `src/components/Auth/Register.js`)
- City home feed → Local user storage: reads user (evidence: `src/pages/Home.js`)
- City home feed → HTTP API client: loads feed (evidence: `src/pages/Home.js`)
- City home feed → Home header: renders (evidence: `src/pages/Home.js`)
- City home feed → Event carousel: renders (evidence: `src/pages/Home.js`)
- City home feed → Category carousel: renders (evidence: `src/pages/Home.js`)
- City home feed → Booking agenda: renders (evidence: `src/pages/Home.js`)
- Event carousel → Event details: opens event (evidence: `src/components/Home/Carousel.js`)
- Map search → Local user storage: reads user (evidence: `src/pages/Search.js`)
- Map search → HTTP API client: loads map results (evidence: `src/pages/Search.js`)
- Map search → Device location: requests position (evidence: `src/pages/Search.js`)
- Map search → Establishment details: opens establishment (evidence: `src/pages/Search.js`)
- Map search → Event details: opens event (evidence: `src/pages/Search.js`)
- Event details → HTTP API client: loads and books (evidence: `src/pages/Event.js`)
- HTTP API client → Barathon API: sends requests (evidence: `README.md`)
- Local user storage → AsyncStorage: reads and writes (evidence: `src/constants/localStorage.js`)
