# ezhilnew555-beep/lights_app architecture

> Architecture diagram of the GitHub repository ezhilnew555-beep/lights_app, 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/ezhilnew555-beep/lights_app
- Repository: https://github.com/ezhilnew555-beep/lights_app

## Overview

LigthsON is a React Native personal-finance and investment app. Its main workflow runs from app launch and authentication through finance screens to service-layer data access, using Firebase for user data and external market APIs for investment information. The map also includes documented reporting, voice, rewards, notifications, and admin capabilities. Relationships are based on the README and SOURCE INDEX excerpts; unsampled feature implementations are represented only at supported directory paths.

Main entry points: [`App.js`](https://github.com/ezhilnew555-beep/lights_app/blob/main/App.js) (Feature navigation), [`src/services/firestoreService.js`](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/firestoreService.js) (Firestore service), [`src/screens/investments`](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/investments) (Investment suite), [`src/components/pulse`](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/components/pulse) (Pulse UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile application"]
  node_app["App shell<br/>[App.js]"]
  node_auth["Authentication"]
  node_nav["Feature navigation<br/>[App.js]"]
  node_pulse["Pulse UI"]
  node_theme["Themes"]
  node_ux["UX feedback"]
end

subgraph group_finance["Finance features"]
  node_transactions["Transactions"]
  node_calendar["Calendar dashboard"]
  node_investments["Investment suite"]
  node_wealth["Wealth dashboard"]
  node_reports["Reports and analytics"]
  node_rewards["Rewards and profile"]
  node_notes["AI notes<br/>[noteaiscreen.js]"]
  node_voice["Voice assistant"]
end

subgraph group_platform["Data and platform"]
  node_services["Data services"]
  node_firestore_service["Firestore service"]
  node_offline[("Offline cache<br/>[offlineStore.js]")]
  node_firebase["Firebase setup<br/>[FirebaseConfig.js]"]
  node_stock_data[("Stock universe")]
  node_notifications["Notifications"]
end

subgraph group_trusted["Trusted services"]
  node_cloud_functions["Cloud Functions<br/>[index.js]"]
  node_admin["Rewards admin<br/>[App.jsx]"]
end

node_user(("App user"))
node_market["Market data APIs"]
node_voice_api["Voice agent API"]

node_user -->|"opens"| node_app
node_app -->|"checks session"| node_auth
node_app -->|"builds navigation"| node_nav
node_nav -->|"routes to"| node_transactions
node_nav -->|"routes to"| node_calendar
node_nav -->|"routes to"| node_investments
node_nav -->|"routes to"| node_wealth
node_nav -->|"routes to"| node_reports
node_nav -->|"routes to"| node_rewards
node_nav -->|"routes to"| node_notes
node_app -->|"mounts"| node_pulse
node_app -->|"loads"| node_theme
node_app -->|"mounts"| node_voice
node_transactions -->|"reads and writes"| node_firestore_service
node_calendar -->|"uses"| node_firestore_service
node_investments -->|"filters stocks"| node_stock_data
node_investments -->|"fetches quotes"| node_market
node_services -->|"uses configuration"| node_firebase
node_firestore_service -->|"uses cache"| node_offline
node_firestore_service -->|"accesses Firestore"| node_firebase
node_voice -->|"calls"| node_voice_api
node_reports -->|"uses data services"| node_services
node_rewards -.->|"redeems rewards"| node_cloud_functions
node_admin -.->|"reviews claims"| node_cloud_functions
node_notifications -->|"sends reminders"| node_user
node_pulse -->|"renders feedback"| node_ux

click node_app "https://github.com/ezhilnew555-beep/lights_app/blob/main/App.js"
click node_auth "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/auth"
click node_nav "https://github.com/ezhilnew555-beep/lights_app/blob/main/App.js"
click node_pulse "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/components/pulse"
click node_theme "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/theme"
click node_transactions "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/transactions"
click node_calendar "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/calendar"
click node_investments "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/investments"
click node_wealth "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/wealth"
click node_reports "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/reports"
click node_rewards "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/profile"
click node_notes "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/screens/ai/noteaiscreen.js"
click node_voice "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/components/VoiceAgentAddonWidget.js"
click node_services "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/services"
click node_firestore_service "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/firestoreService.js"
click node_offline "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/offlineStore.js"
click node_firebase "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/config/FirebaseConfig.js"
click node_stock_data "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/data/indianStocksData.js"
click node_notifications "https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/notificationService.js"
click node_cloud_functions "https://github.com/ezhilnew555-beep/lights_app/blob/main/functions/index.js"
click node_admin "https://github.com/ezhilnew555-beep/lights_app/blob/main/web/ligthsweb/src/App.jsx"
click node_ux "https://github.com/ezhilnew555-beep/lights_app/tree/main/src/ux"

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_auth,node_nav,node_pulse,node_theme,node_ux,node_user toneBlue
class node_transactions,node_calendar,node_investments,node_wealth,node_reports,node_rewards,node_notes,node_voice toneAmber
class node_services,node_firestore_service,node_offline,node_firebase,node_stock_data,node_notifications,node_market,node_voice_api toneMint
class node_cloud_functions,node_admin toneRose
```

## Components

### Mobile application

- [App shell](https://github.com/ezhilnew555-beep/lights_app/blob/main/App.js): `App.js`
- [Authentication](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/auth): `src/screens/auth`
- [Feature navigation](https://github.com/ezhilnew555-beep/lights_app/blob/main/App.js): `App.js`
- [Pulse UI](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/components/pulse): `src/components/pulse`
- [Themes](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/theme): `src/theme`
- [UX feedback](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/ux): `src/ux`

### Finance features

- [Transactions](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/transactions): `src/screens/transactions`
- [Calendar dashboard](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/calendar): `src/screens/calendar`
- [Investment suite](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/investments): `src/screens/investments`
- [Wealth dashboard](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/wealth): `src/screens/wealth`
- [Reports and analytics](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/reports): `src/screens/reports`
- [Rewards and profile](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/screens/profile): `src/screens/profile`
- [AI notes](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/screens/ai/noteaiscreen.js): `src/screens/ai/noteaiscreen.js`
- [Voice assistant](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/components/VoiceAgentAddonWidget.js): `src/components/VoiceAgentAddonWidget.js`

### Data and platform

- [Data services](https://github.com/ezhilnew555-beep/lights_app/tree/main/src/services): `src/services`
- [Firestore service](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/firestoreService.js): `src/services/firestoreService.js`
- [Offline cache](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/offlineStore.js): `src/services/offlineStore.js`
- [Firebase setup](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/config/FirebaseConfig.js): `src/config/FirebaseConfig.js`
- [Stock universe](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/data/indianStocksData.js): `src/data/indianStocksData.js`
- [Notifications](https://github.com/ezhilnew555-beep/lights_app/blob/main/src/services/notificationService.js): `src/services/notificationService.js`

### Trusted services

- [Cloud Functions](https://github.com/ezhilnew555-beep/lights_app/blob/main/functions/index.js): `functions/index.js`
- [Rewards admin](https://github.com/ezhilnew555-beep/lights_app/blob/main/web/ligthsweb/src/App.jsx): `web/ligthsweb/src/App.jsx`

### Other components

- **App user**
- **Market data APIs**
- **Voice agent API**

## Connections

- App user → App shell: opens
- App shell → Authentication: checks session (evidence: `App.js`)
- App shell → Feature navigation: builds navigation (evidence: `App.js`)
- Feature navigation → Transactions: routes to (evidence: `App.js`)
- Feature navigation → Calendar dashboard: routes to (evidence: `App.js`)
- Feature navigation → Investment suite: routes to (evidence: `App.js`)
- Feature navigation → Wealth dashboard: routes to
- Feature navigation → Reports and analytics: routes to
- Feature navigation → Rewards and profile: routes to
- Feature navigation → AI notes: routes to
- App shell → Pulse UI: mounts (evidence: `App.js`)
- App shell → Themes: loads (evidence: `App.js`)
- App shell → Voice assistant: mounts (evidence: `App.js`)
- Transactions → Firestore service: reads and writes (evidence: `src/screens/transactions/Expenses.js`)
- Calendar dashboard → Firestore service: uses (evidence: `src/screens/calendar/calendarmain.js`)
- Investment suite → Stock universe: filters stocks (evidence: `src/screens/investments/StockSearchScreen.js`)
- Investment suite → Market data APIs: fetches quotes (evidence: `src/screens/investments/StockSearchScreen.js`)
- Data services → Firebase setup: uses configuration (evidence: `src/services/firestoreService.js`)
- Firestore service → Offline cache: uses cache (evidence: `src/services/firestoreService.js`)
- Firestore service → Firebase setup: accesses Firestore (evidence: `src/services/firestoreService.js`)
- Voice assistant → Voice agent API: calls
- Reports and analytics → Data services: uses data services
- Rewards and profile → Cloud Functions: redeems rewards
- Rewards admin → Cloud Functions: reviews claims
- Notifications → App user: sends reminders
- Pulse UI → UX feedback: renders feedback (evidence: `src/components/pulse/ToastHost.js`)
