# lucascallamullo/react-native-compiler-apk architecture

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

- Interactive diagram: https://gitdiagram.com/lucascallamullo/react-native-compiler-apk
- Repository: https://github.com/lucascallamullo/react-native-compiler-apk

## Overview

ExpoHDP is a mobile app with authentication, home, audit history, emergency, records, profile, and calculator areas; its Spring backend provides authentication, user management, and contact APIs. A typical user flow is to register or log in, then use the app’s feature screens; the auth service can call the backend and receive token data. The calculator hook delegates math operations. Several screen-to-service and persistence connections are not shown in the excerpts, so those links are omitted or marked unverified.

Main entry points: [`expohdp/src/features/auth/services/authService.ts`](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/services/authService.ts) (Auth service), [`backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java`](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java) (Auth workflow), [`backend/ms-core/src/main/java/com/vg/auth/service/impl/UserServiceImpl.java`](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/UserServiceImpl.java) (User service), [`expohdp/app/_layout.tsx`](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/_layout.tsx) (Expo app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["Expo app<br/>[_layout.tsx]"]
  node_authscreens["Login and register<br/>[login.tsx]"]
  node_apiclient["API client<br/>[client.ts]"]
  node_featuretabs["Home, profile, records<br/>[index.tsx]"]
  node_auditemergency["Audit and emergency<br/>[index.tsx]"]
  node_calculator["Calculator screen<br/>[calculator.tsx]"]
  node_calculatorhook["Calculator logic<br/>[useCalculator.ts]"]
  node_math["Math operations<br/>[mathOperations.ts]"]
end

subgraph group_auth["Authentication"]
  node_authcontext["Auth state<br/>[AuthContext.tsx]"]
  node_authclient["Auth service<br/>[authService.ts]"]
  node_authcontract["Auth types<br/>[authTypes.ts]"]
end

subgraph group_backend["Backend API"]
  node_backendauth["Auth endpoints"]
  node_authlogic["Auth workflow"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_users["User management"]
  node_userlogic["User service"]
  node_userrepo["User repository"]
  node_userstore[("User data<br/>[User.java]")]
end

subgraph group_contacts["Contacts"]
  node_contactapi["Contact endpoints"]
  node_contactlogic["Contact service"]
  node_contactstore[("Contact data<br/>[Contact.java]")]
end

node_person(("App user"))
node_postgres[("PostgreSQL")]

node_person -->|"uses"| node_app
node_app -.->|"opens"| node_authscreens
node_authcontext -->|"calls"| node_authclient
node_authclient -->|"uses types"| node_authcontract
node_authclient -->|"sends requests"| node_apiclient
node_authclient -->|"calls auth routes"| node_backendauth
node_backendauth -->|"delegates"| node_authlogic
node_authlogic -->|"generates tokens"| node_jwt
node_authlogic -->|"uses users"| node_userlogic
node_users -->|"delegates"| node_userlogic
node_userlogic -.->|"persists"| node_userrepo
node_userrepo -.->|"stores"| node_userstore
node_contactapi -.->|"delegates"| node_contactlogic
node_contactlogic -.->|"persists"| node_contactstore
node_calculatorhook -->|"uses"| node_math
node_postgres -.->|"stores"| node_userstore
node_postgres -.->|"stores"| node_contactstore

click node_app "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/_layout.tsx"
click node_authscreens "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/login.tsx"
click node_authcontext "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/context/AuthContext.tsx"
click node_authclient "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/services/authService.ts"
click node_authcontract "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/types/authTypes.ts"
click node_apiclient "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/shared/api/client.ts"
click node_featuretabs "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/(tabs)/home/index.tsx"
click node_auditemergency "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/(tabs)/audit/index.tsx"
click node_calculator "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/calculator.tsx"
click node_calculatorhook "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/calculator/hooks/useCalculator.ts"
click node_math "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/calculator/utils/mathOperations.ts"
click node_backendauth "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/controller/AuthController.java"
click node_authlogic "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java"
click node_jwt "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/JwtService.java"
click node_users "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/controller/UserController.java"
click node_userlogic "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/UserServiceImpl.java"
click node_userrepo "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/repository/UserRepository.java"
click node_userstore "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/model/User.java"
click node_contactapi "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/controller/ContactController.java"
click node_contactlogic "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/service/impl/ContactServiceImpl.java"
click node_contactstore "https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/model/Contact.java"

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_authscreens,node_apiclient,node_featuretabs,node_auditemergency,node_calculator,node_calculatorhook,node_math,node_person toneBlue
class node_authcontext,node_authclient,node_authcontract,node_postgres toneAmber
class node_backendauth,node_authlogic,node_jwt,node_users,node_userlogic,node_userrepo,node_userstore toneMint
class node_contactapi,node_contactlogic,node_contactstore toneRose
```

## Components

### Mobile app

- [Expo app](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/_layout.tsx): `expohdp/app/_layout.tsx`
- [Login and register](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/login.tsx): `expohdp/app/login.tsx`
- [API client](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/shared/api/client.ts): `expohdp/src/shared/api/client.ts`
- [Home, profile, records](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/(tabs)/home/index.tsx): `expohdp/app/(tabs)/home/index.tsx`
- [Audit and emergency](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/(tabs)/audit/index.tsx): `expohdp/app/(tabs)/audit/index.tsx`
- [Calculator screen](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/app/calculator.tsx): `expohdp/app/calculator.tsx`
- [Calculator logic](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/calculator/hooks/useCalculator.ts): `expohdp/src/features/calculator/hooks/useCalculator.ts`
- [Math operations](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/calculator/utils/mathOperations.ts): `expohdp/src/features/calculator/utils/mathOperations.ts`

### Authentication

- [Auth state](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/context/AuthContext.tsx): `expohdp/src/features/auth/context/AuthContext.tsx`
- [Auth service](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/services/authService.ts): `expohdp/src/features/auth/services/authService.ts`
- [Auth types](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/expohdp/src/features/auth/types/authTypes.ts): `expohdp/src/features/auth/types/authTypes.ts`

### Backend API

- [Auth endpoints](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/controller/AuthController.java): `backend/ms-core/src/main/java/com/vg/auth/controller/AuthController.java`
- [Auth workflow](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java): `backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java`
- [JWT service](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/JwtService.java): `backend/ms-core/src/main/java/com/vg/auth/service/JwtService.java`
- [User management](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/controller/UserController.java): `backend/ms-core/src/main/java/com/vg/auth/controller/UserController.java`
- [User service](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/service/impl/UserServiceImpl.java): `backend/ms-core/src/main/java/com/vg/auth/service/impl/UserServiceImpl.java`
- [User repository](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/repository/UserRepository.java): `backend/ms-core/src/main/java/com/vg/auth/repository/UserRepository.java`
- [User data](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/auth/model/User.java): `backend/ms-core/src/main/java/com/vg/auth/model/User.java`

### Contacts

- [Contact endpoints](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/controller/ContactController.java): `backend/ms-core/src/main/java/com/vg/contact/controller/ContactController.java`
- [Contact service](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/service/impl/ContactServiceImpl.java): `backend/ms-core/src/main/java/com/vg/contact/service/impl/ContactServiceImpl.java`
- [Contact data](https://github.com/lucascallamullo/react-native-compiler-apk/blob/main/backend/ms-core/src/main/java/com/vg/contact/model/Contact.java): `backend/ms-core/src/main/java/com/vg/contact/model/Contact.java`

### Other components

- **App user**
- **PostgreSQL**

## Connections

- App user → Expo app: uses
- Expo app → Login and register: opens
- Auth state → Auth service: calls (evidence: `expohdp/src/features/auth/context/AuthContext.tsx`)
- Auth service → Auth types: uses types (evidence: `expohdp/src/features/auth/services/authService.ts`)
- Auth service → API client: sends requests (evidence: `expohdp/src/features/auth/services/authService.ts`)
- Auth service → Auth endpoints: calls auth routes (evidence: `expohdp/src/features/auth/services/authService.ts`)
- Auth endpoints → Auth workflow: delegates (evidence: `backend/ms-core/src/main/java/com/vg/auth/controller/AuthController.java`)
- Auth workflow → JWT service: generates tokens (evidence: `backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java`)
- Auth workflow → User service: uses users (evidence: `backend/ms-core/src/main/java/com/vg/auth/service/impl/AuthServiceImpl.java`)
- User management → User service: delegates (evidence: `backend/ms-core/src/main/java/com/vg/auth/controller/UserController.java`)
- User service → User repository: persists
- User repository → User data: stores (evidence: `backend/ms-core/src/main/java/com/vg/auth/repository/UserRepository.java`)
- Contact endpoints → Contact service: delegates
- Contact service → Contact data: persists
- Calculator logic → Math operations: uses (evidence: `expohdp/src/features/calculator/hooks/useCalculator.ts`)
- PostgreSQL → User data: stores
- PostgreSQL → Contact data: stores
