# barathon-2i-tech/barathon_pro architecture

> Architecture diagram of the GitHub repository barathon-2i-tech/barathon_pro, 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_pro
- Repository: https://github.com/barathon-2i-tech/barathon_pro

## Overview

Barathon Professional is a web portal for hospitality businesses to register, manage establishments and events, and maintain professional profiles; the public landing page also describes the broader Barathonien discovery experience. The principal workflow routes users into public registration or a protected professional workspace, where establishment and event pages use authenticated API calls to retrieve or update data. Shared form models and validation support these management stages. The graph follows shown routes and indexed imports; several feature pages and integrations are represented from routing or module references rather than inspected implementation.

Main entry points: [`src/Components/Auth/ProtectedLayout.jsx`](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Auth/ProtectedLayout.jsx) (Protected layout), [`src/utils/axiosUrl.jsx`](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/axiosUrl.jsx) (API client), [`src/App.jsx`](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/App.jsx) (Route application), [`src/Page/Professional/EstablishmentUpdate.jsx`](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/EstablishmentUpdate.jsx) (Establishment editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Public entry and access"]
  node_app["Route application<br/>[App.jsx]"]
  node_welcome["Welcome page<br/>[Welcome.jsx]"]
  node_registration["Registration flow<br/>[RegisterHome.jsx]"]
  node_login["Login page<br/>[LoginPage.jsx]"]
  node_auth["Session and auth<br/>[useAuth.jsx]"]
  node_protected["Protected layout"]
end

subgraph group_workspace["Professional workspace"]
  node_dashboard["Professional dashboard<br/>[Dashboard.jsx]"]
  node_profile["Profile management<br/>[Profile.jsx]"]
end

subgraph group_management["Business management"]
  node_establishments["Establishment listing<br/>[Establishment.jsx]"]
  node_establishment_edit["Establishment editor"]
  node_events["Establishment events"]
  node_event_edit["Event editor"]
  node_categories["Event categories<br/>[useCategory.jsx]"]
end

subgraph group_shared["Shared runtime services"]
  node_form_components["Form components"]
  node_validation["Form validation"]
  node_initial_values["Form defaults"]
  node_form_transport["Authenticated form transport<br/>[AxiosModel.jsx]"]
  node_api_client["API client<br/>[axiosUrl.jsx]"]
end

node_visitor(("Visitor / professional"))
node_backend(("Barathon API"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_welcome
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_login
node_app -->|"routes through"| node_protected
node_protected -->|"routes to"| node_dashboard
node_protected -->|"routes to"| node_profile
node_protected -->|"routes to"| node_establishments
node_protected -->|"routes to"| node_establishment_edit
node_protected -->|"routes to"| node_events
node_protected -->|"routes to"| node_event_edit
node_login -->|"uses"| node_auth
node_auth -->|"calls"| node_api_client
node_establishments -->|"fetches data"| node_api_client
node_establishment_edit -->|"fetches data"| node_api_client
node_establishment_edit -->|"renders"| node_form_components
node_establishment_edit -->|"validates with"| node_validation
node_establishment_edit -->|"uses defaults"| node_initial_values
node_events -->|"fetches events"| node_api_client
node_event_edit -->|"uses"| node_categories
node_event_edit -->|"renders"| node_form_components
node_event_edit -->|"validates with"| node_validation
node_event_edit -->|"uses defaults"| node_initial_values
node_profile -->|"submits changes"| node_form_transport
node_form_transport -->|"sends requests"| node_api_client
node_api_client -.->|"HTTP requests"| node_backend

click node_app "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/App.jsx"
click node_welcome "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Welcome.jsx"
click node_registration "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Auth/RegisterHome.jsx"
click node_login "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Auth/LoginPage.jsx"
click node_auth "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Hooks/useAuth.jsx"
click node_protected "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Auth/ProtectedLayout.jsx"
click node_dashboard "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Dashboard.jsx"
click node_profile "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Profile/Profile.jsx"
click node_establishments "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Establishment.jsx"
click node_establishment_edit "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/EstablishmentUpdate.jsx"
click node_events "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Event/EventOfEstablishment.jsx"
click node_event_edit "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Event/EventOfEstablishmentUpdate.jsx"
click node_categories "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Hooks/useCategory.jsx"
click node_form_components "https://github.com/barathon-2i-tech/barathon_pro/tree/develop/src/Components/CommonComponents/FormsComponent"
click node_validation "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/FormSchemaValidation.js"
click node_initial_values "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/FormInitialValue.js"
click node_form_transport "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/AxiosModel.jsx"
click node_api_client "https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/axiosUrl.jsx"

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_welcome,node_registration,node_login,node_auth,node_protected toneBlue
class node_dashboard,node_profile toneAmber
class node_establishments,node_establishment_edit,node_events,node_event_edit,node_categories,node_backend toneMint
class node_form_components,node_validation,node_initial_values,node_form_transport,node_api_client toneRose
class node_visitor toneIndigo
```

## Components

### Public entry and access

- [Route application](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/App.jsx): `src/App.jsx`
- [Welcome page](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Welcome.jsx): `src/Page/Welcome.jsx`
- [Registration flow](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Auth/RegisterHome.jsx): `src/Page/Auth/RegisterHome.jsx`
- [Login page](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Auth/LoginPage.jsx): `src/Page/Auth/LoginPage.jsx`
- [Session and auth](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Hooks/useAuth.jsx): `src/Components/Hooks/useAuth.jsx`
- [Protected layout](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Auth/ProtectedLayout.jsx): `src/Components/Auth/ProtectedLayout.jsx`

### Professional workspace

- [Professional dashboard](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Dashboard.jsx): `src/Page/Professional/Dashboard.jsx`
- [Profile management](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Profile/Profile.jsx): `src/Page/Professional/Profile/Profile.jsx`

### Business management

- [Establishment listing](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Establishment.jsx): `src/Page/Professional/Establishment.jsx`
- [Establishment editor](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/EstablishmentUpdate.jsx): `src/Page/Professional/EstablishmentUpdate.jsx`
- [Establishment events](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Event/EventOfEstablishment.jsx): `src/Page/Professional/Event/EventOfEstablishment.jsx`
- [Event editor](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Page/Professional/Event/EventOfEstablishmentUpdate.jsx): `src/Page/Professional/Event/EventOfEstablishmentUpdate.jsx`
- [Event categories](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/Components/Hooks/useCategory.jsx): `src/Components/Hooks/useCategory.jsx`

### Shared runtime services

- [Form components](https://github.com/barathon-2i-tech/barathon_pro/tree/develop/src/Components/CommonComponents/FormsComponent): `src/Components/CommonComponents/FormsComponent`
- [Form validation](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/FormSchemaValidation.js): `src/utils/FormSchemaValidation.js`
- [Form defaults](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/FormInitialValue.js): `src/utils/FormInitialValue.js`
- [Authenticated form transport](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/AxiosModel.jsx): `src/utils/AxiosModel.jsx`
- [API client](https://github.com/barathon-2i-tech/barathon_pro/blob/develop/src/utils/axiosUrl.jsx): `src/utils/axiosUrl.jsx`

### Other components

- **Visitor / professional**
- **Barathon API**

## Connections

- Visitor / professional → Route application: opens
- Route application → Welcome page: routes to (evidence: `src/App.jsx`)
- Route application → Registration flow: routes to (evidence: `src/App.jsx`)
- Route application → Login page: routes to (evidence: `src/App.jsx`)
- Route application → Protected layout: routes through (evidence: `src/App.jsx`)
- Protected layout → Professional dashboard: routes to (evidence: `src/App.jsx`)
- Protected layout → Profile management: routes to (evidence: `src/App.jsx`)
- Protected layout → Establishment listing: routes to (evidence: `src/App.jsx`)
- Protected layout → Establishment editor: routes to (evidence: `src/App.jsx`)
- Protected layout → Establishment events: routes to (evidence: `src/App.jsx`)
- Protected layout → Event editor: routes to (evidence: `src/App.jsx`)
- Login page → Session and auth: uses (evidence: `src/Page/Auth/LoginPage.jsx`)
- Session and auth → API client: calls (evidence: `src/Components/Hooks/useAuth.jsx`)
- Establishment listing → API client: fetches data (evidence: `src/Page/Professional/Establishment.jsx`)
- Establishment editor → API client: fetches data (evidence: `src/Page/Professional/EstablishmentUpdate.jsx`)
- Establishment editor → Form components: renders (evidence: `src/Page/Professional/EstablishmentUpdate.jsx`)
- Establishment editor → Form validation: validates with (evidence: `src/Page/Professional/EstablishmentUpdate.jsx`)
- Establishment editor → Form defaults: uses defaults (evidence: `src/Page/Professional/EstablishmentUpdate.jsx`)
- Establishment events → API client: fetches events (evidence: `src/Page/Professional/Event/EventOfEstablishment.jsx`)
- Event editor → Event categories: uses (evidence: `src/Page/Professional/Event/EventOfEstablishmentUpdate.jsx`)
- Event editor → Form components: renders (evidence: `src/Page/Professional/Event/EventOfEstablishmentUpdate.jsx`)
- Event editor → Form validation: validates with
- Event editor → Form defaults: uses defaults
- Profile management → Authenticated form transport: submits changes (evidence: `src/Page/Professional/Profile/Profile.jsx`)
- Authenticated form transport → API client: sends requests (evidence: `src/utils/AxiosModel.jsx`)
- API client → Barathon API: HTTP requests
