# suhasrkms/lara-fire architecture

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

- Interactive diagram: https://gitdiagram.com/suhasrkms/lara-fire
- Repository: https://github.com/suhasrkms/lara-fire

## Overview

Lara Fire is a Laravel starter application whose main workflow is Firebase-backed sign-in followed by verified-user access to notes, profile, and admin features. Web and REST routes dispatch to controllers; those controllers use Firebase Auth, a Firestore repository, or push-notification services as appropriate. The graph includes the documented social-login, admin, API, and browser push capabilities. Some feature internals were not sampled, so README-supported links are cited to the README; uncertain implementation links are omitted.

Main entry points: [`routes/web.php`](https://github.com/suhasrkms/lara-fire/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/Auth/LoginController.php`](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Auth/LoginController.php) (Sign-in), [`app/Auth/FirebaseUserProvider.php`](https://github.com/suhasrkms/lara-fire/blob/master/app/Auth/FirebaseUserProvider.php) (User provider), [`routes/api.php`](https://github.com/suhasrkms/lara-fire/blob/master/routes/api.php) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Request routing"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_api_routes["API routes<br/>[api.php]"]
end

subgraph group_identity["Identity and access"]
  node_login["Sign-in"]
  node_register["Registration"]
  node_id_middleware["ID token auth"]
  node_user_provider["User provider"]
  node_firebase_user["Firebase user<br/>[FirebaseUser.php]"]
  node_firebase_auth(("Firebase Auth"))
end

subgraph group_features["Application features"]
  node_notes_web["Notes UI<br/>[NoteController.php]"]
  node_notes_api["Notes API<br/>[ApiController.php]"]
  node_notes_store["Firestore notes<br/>[NoteRepository.php]"]
  node_admin_users["Admin users<br/>[UserController.php]"]
  node_push_admin["Admin notifications"]
  node_push_service["Push service"]
  node_firestore[("Cloud Firestore")]
  node_fcm(("Firebase Cloud Messaging"))
end

subgraph group_client["Browser experience"]
  node_social_js["Social sign-in<br/>[social-login.js]"]
  node_push_js["Browser push<br/>[push.js]"]
  node_firebase_js["Firebase browser SDK<br/>[firebase.js]"]
end

node_user(("Visitor or user"))

node_user -->|"requests pages"| node_web_routes
node_web_routes -->|"dispatches sign-in"| node_login
node_web_routes -->|"dispatches registration"| node_register
node_user -->|"calls REST API"| node_api_routes
node_api_routes -->|"routes requests"| node_notes_api
node_login -->|"authenticates credentials"| node_user_provider
node_login -->|"verifies ID token"| node_firebase_auth
node_register -->|"creates account"| node_firebase_auth
node_register -->|"loads new user"| node_user_provider
node_user_provider -->|"loads user record"| node_firebase_auth
node_user_provider -->|"builds user"| node_firebase_user
node_social_js -->|"uses SDK"| node_firebase_js
node_social_js -->|"posts ID token"| node_login
node_api_routes -.->|"requires token auth"| node_id_middleware
node_notes_web -->|"reads and changes"| node_notes_store
node_notes_api -->|"reads and changes"| node_notes_store
node_notes_store -->|"reads and writes"| node_firestore
node_web_routes -->|"dispatches notes"| node_notes_web
node_web_routes -->|"dispatches admin"| node_admin_users
node_web_routes -->|"dispatches notifications"| node_push_admin
node_push_admin -->|"sends messages"| node_push_service
node_web_routes -->|"offers subscription"| node_push_js
node_push_js -->|"uses SDK"| node_firebase_js
node_push_service -.->|"sends push"| node_fcm
node_admin_users -->|"manages accounts"| node_firebase_auth

click node_web_routes "https://github.com/suhasrkms/lara-fire/blob/master/routes/web.php"
click node_api_routes "https://github.com/suhasrkms/lara-fire/blob/master/routes/api.php"
click node_login "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Auth/LoginController.php"
click node_register "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Auth/RegisterController.php"
click node_id_middleware "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Middleware/AuthenticateWithIdToken.php"
click node_user_provider "https://github.com/suhasrkms/lara-fire/blob/master/app/Auth/FirebaseUserProvider.php"
click node_firebase_user "https://github.com/suhasrkms/lara-fire/blob/master/app/Auth/FirebaseUser.php"
click node_notes_web "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/NoteController.php"
click node_notes_api "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Api/ApiController.php"
click node_notes_store "https://github.com/suhasrkms/lara-fire/blob/master/app/Services/NoteRepository.php"
click node_admin_users "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Admin/UserController.php"
click node_push_admin "https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Admin/NotificationController.php"
click node_push_service "https://github.com/suhasrkms/lara-fire/blob/master/app/Services/PushNotifications.php"
click node_social_js "https://github.com/suhasrkms/lara-fire/blob/master/resources/js/social-login.js"
click node_push_js "https://github.com/suhasrkms/lara-fire/blob/master/resources/js/push.js"
click node_firebase_js "https://github.com/suhasrkms/lara-fire/blob/master/resources/js/firebase.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_web_routes,node_api_routes,node_user toneBlue
class node_login,node_register,node_id_middleware,node_user_provider,node_firebase_user,node_firebase_auth toneAmber
class node_notes_web,node_notes_api,node_notes_store,node_admin_users,node_push_admin,node_push_service,node_firestore,node_fcm toneMint
class node_social_js,node_push_js,node_firebase_js toneRose
```

## Components

### Request routing

- [Web routes](https://github.com/suhasrkms/lara-fire/blob/master/routes/web.php): `routes/web.php`
- [API routes](https://github.com/suhasrkms/lara-fire/blob/master/routes/api.php): `routes/api.php`

### Identity and access

- [Sign-in](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [Registration](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`
- [ID token auth](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Middleware/AuthenticateWithIdToken.php): `app/Http/Middleware/AuthenticateWithIdToken.php`
- [User provider](https://github.com/suhasrkms/lara-fire/blob/master/app/Auth/FirebaseUserProvider.php): `app/Auth/FirebaseUserProvider.php`
- [Firebase user](https://github.com/suhasrkms/lara-fire/blob/master/app/Auth/FirebaseUser.php): `app/Auth/FirebaseUser.php`
- **Firebase Auth**

### Application features

- [Notes UI](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/NoteController.php): `app/Http/Controllers/NoteController.php`
- [Notes API](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Api/ApiController.php): `app/Http/Controllers/Api/ApiController.php`
- [Firestore notes](https://github.com/suhasrkms/lara-fire/blob/master/app/Services/NoteRepository.php): `app/Services/NoteRepository.php`
- [Admin users](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Admin/UserController.php): `app/Http/Controllers/Admin/UserController.php`
- [Admin notifications](https://github.com/suhasrkms/lara-fire/blob/master/app/Http/Controllers/Admin/NotificationController.php): `app/Http/Controllers/Admin/NotificationController.php`
- [Push service](https://github.com/suhasrkms/lara-fire/blob/master/app/Services/PushNotifications.php): `app/Services/PushNotifications.php`
- **Cloud Firestore**
- **Firebase Cloud Messaging**

### Browser experience

- [Social sign-in](https://github.com/suhasrkms/lara-fire/blob/master/resources/js/social-login.js): `resources/js/social-login.js`
- [Browser push](https://github.com/suhasrkms/lara-fire/blob/master/resources/js/push.js): `resources/js/push.js`
- [Firebase browser SDK](https://github.com/suhasrkms/lara-fire/blob/master/resources/js/firebase.js): `resources/js/firebase.js`

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Web routes: requests pages (evidence: `routes/web.php`)
- Web routes → Sign-in: dispatches sign-in (evidence: `routes/web.php`)
- Web routes → Registration: dispatches registration (evidence: `routes/web.php`)
- Visitor or user → API routes: calls REST API (evidence: `README.md`)
- API routes → Notes API: routes requests (evidence: `routes/api.php`)
- Sign-in → User provider: authenticates credentials (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Sign-in → Firebase Auth: verifies ID token (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Registration → Firebase Auth: creates account (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- Registration → User provider: loads new user (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- User provider → Firebase Auth: loads user record (evidence: `app/Auth/FirebaseUserProvider.php`)
- User provider → Firebase user: builds user (evidence: `app/Auth/FirebaseUserProvider.php`)
- Social sign-in → Firebase browser SDK: uses SDK (evidence: `resources/js/social-login.js`)
- Social sign-in → Sign-in: posts ID token (evidence: `README.md`)
- API routes → ID token auth: requires token auth
- Notes UI → Firestore notes: reads and changes (evidence: `app/Http/Controllers/NoteController.php`)
- Notes API → Firestore notes: reads and changes (evidence: `app/Http/Controllers/Api/ApiController.php`)
- Firestore notes → Cloud Firestore: reads and writes (evidence: `app/Services/NoteRepository.php`)
- Web routes → Notes UI: dispatches notes (evidence: `routes/web.php`)
- Web routes → Admin users: dispatches admin (evidence: `routes/web.php`)
- Web routes → Admin notifications: dispatches notifications (evidence: `routes/web.php`)
- Admin notifications → Push service: sends messages (evidence: `app/Http/Controllers/Admin/NotificationController.php`)
- Web routes → Browser push: offers subscription (evidence: `README.md`)
- Browser push → Firebase browser SDK: uses SDK (evidence: `resources/js/push.js`)
- Push service → Firebase Cloud Messaging: sends push
- Admin users → Firebase Auth: manages accounts (evidence: `app/Http/Controllers/Admin/UserController.php`)
