# jsambalod139/rbccms-system architecture

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

- Interactive diagram: https://gitdiagram.com/jsambalod139/rbccms-system
- Repository: https://github.com/jsambalod139/rbccms-system

## Overview

RBCCMSSYSTEM is a role-based barangay concern-management application. Residents sign in, submit and track concerns; personnel manage concerns and resident records; administrators oversee operations, reports, offices, audit history, and recovery. Angular routes select role-specific workspaces, while shared services handle authentication, concern records, settings, and analytics against Firebase. The tree and excerpts document the major product areas, but many page implementations were not sampled, so links to those areas are limited to route evidence.

Main entry points: [`src/app/core/firebase.config.ts`](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/firebase.config.ts) (Firebase), [`src/app/core/services/concern.service.ts`](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/concern.service.ts) (Concern Records), [`src/app/app.routes.ts`](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/app.routes.ts) (Role Routing), [`src/app/components/pages`](https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages) (Personnel Workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry &amp; Access"]
  node_routing["Role Routing<br/>[app.routes.ts]"]
  node_login["Sign In"]
end

subgraph group_resident["Resident Services"]
  node_resident_pages["Resident Workspace"]
  node_resident_submit["Submit Concern"]
  node_resident_tracking["Concern Tracking"]
end

subgraph group_operations["Concern Operations"]
  node_personnel_pages["Personnel Workspace"]
  node_personnel_reports["Personnel Reports"]
end

subgraph group_admin["Administration"]
  node_admin_pages["Admin Workspace"]
  node_admin_reports["Admin Reports<br/>[admin-reports.ts]"]
  node_admin_audit["Audit Logs"]
  node_admin_offices["Office Management"]
  node_admin_recovery["Backup &amp; Recovery"]
end

subgraph group_platform["Shared Platform"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_concern_service["Concern Records<br/>[concern.service.ts]"]
  node_category_service["Concern Categories"]
  node_resident_service["Resident Records"]
  node_analytics_service["Dashboard Analytics"]
  node_settings_service["Account Settings"]
  node_backup_service["Recovery Service"]
  node_firebase[("Firebase<br/>[firebase.config.ts]")]
end

node_user(("User"))
node_supabase["Supabase Audit API"]

node_user -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"reads profile"| node_firebase
node_auth -->|"posts audit"| node_supabase
node_user -->|"opens workspace"| node_routing
node_routing -->|"routes resident"| node_resident_pages
node_routing -->|"routes personnel"| node_personnel_pages
node_routing -->|"routes admin"| node_admin_pages
node_resident_submit -->|"creates concern"| node_concern_service
node_resident_submit -->|"loads categories"| node_category_service
node_resident_tracking -->|"loads concerns"| node_concern_service
node_personnel_pages -->|"manages concerns"| node_concern_service
node_personnel_pages -->|"loads residents"| node_resident_service
node_personnel_reports -->|"reads concerns"| node_concern_service
node_personnel_reports -->|"reads residents"| node_resident_service
node_admin_reports -->|"reads concerns"| node_concern_service
node_admin_pages -->|"loads analytics"| node_analytics_service
node_admin_offices -->|"manages offices"| node_firebase
node_admin_audit -->|"reads audit data"| node_firebase
node_admin_recovery -->|"invokes recovery"| node_backup_service
node_concern_service -->|"reads and writes"| node_firebase
node_category_service -.->|"loads categories"| node_firebase
node_resident_service -.->|"reads records"| node_firebase
node_analytics_service -->|"subscribes to data"| node_firebase
node_settings_service -->|"syncs settings"| node_firebase

click node_routing "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/app.routes.ts"
click node_login "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/auth/login-components/login-components.ts"
click node_auth "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/auth.service.ts"
click node_resident_pages "https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages"
click node_resident_submit "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/resident-submit-concern/resident-submit-concern.ts"
click node_resident_tracking "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/resident-my-concern/resident-my-concern.ts"
click node_personnel_pages "https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages"
click node_personnel_reports "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/personnel-reports/personnel-reports.ts"
click node_admin_pages "https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages"
click node_admin_reports "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-reports/admin-reports.ts"
click node_admin_audit "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-audit-logs/admin-audit-logs.ts"
click node_admin_offices "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-participating-office/admin-participating-office.ts"
click node_admin_recovery "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-backup-recovery/admin-backup-recovery.ts"
click node_concern_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/concern.service.ts"
click node_category_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/concern-category.service.ts"
click node_resident_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/resident.service.ts"
click node_analytics_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/admin-dashboard.service.ts"
click node_settings_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/settings.service.ts"
click node_backup_service "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/backup-recovery.service.ts"
click node_firebase "https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/firebase.config.ts"

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_routing,node_login,node_user toneBlue
class node_resident_pages,node_resident_submit,node_resident_tracking toneAmber
class node_personnel_pages,node_personnel_reports,node_supabase toneMint
class node_admin_pages,node_admin_reports,node_admin_audit,node_admin_offices,node_admin_recovery toneRose
class node_auth,node_concern_service,node_category_service,node_resident_service,node_analytics_service,node_settings_service,node_backup_service,node_firebase toneIndigo
```

## Components

### App Entry & Access

- [Role Routing](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Sign In](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/auth/login-components/login-components.ts): `src/app/components/auth/login-components/login-components.ts`

### Resident Services

- [Resident Workspace](https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages): `src/app/components/pages`
- [Submit Concern](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/resident-submit-concern/resident-submit-concern.ts): `src/app/components/pages/resident-submit-concern/resident-submit-concern.ts`
- [Concern Tracking](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/resident-my-concern/resident-my-concern.ts): `src/app/components/pages/resident-my-concern/resident-my-concern.ts`

### Concern Operations

- [Personnel Workspace](https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages): `src/app/components/pages`
- [Personnel Reports](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/personnel-reports/personnel-reports.ts): `src/app/components/pages/personnel-reports/personnel-reports.ts`

### Administration

- [Admin Workspace](https://github.com/jsambalod139/rbccms-system/tree/main/src/app/components/pages): `src/app/components/pages`
- [Admin Reports](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-reports/admin-reports.ts): `src/app/components/pages/admin-reports/admin-reports.ts`
- [Audit Logs](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-audit-logs/admin-audit-logs.ts): `src/app/components/pages/admin-audit-logs/admin-audit-logs.ts`
- [Office Management](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-participating-office/admin-participating-office.ts): `src/app/components/pages/admin-participating-office/admin-participating-office.ts`
- [Backup & Recovery](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/components/pages/admin-backup-recovery/admin-backup-recovery.ts): `src/app/components/pages/admin-backup-recovery/admin-backup-recovery.ts`

### Shared Platform

- [Authentication](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/auth.service.ts): `src/app/core/services/auth.service.ts`
- [Concern Records](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/concern.service.ts): `src/app/core/services/concern.service.ts`
- [Concern Categories](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/concern-category.service.ts): `src/app/core/services/concern-category.service.ts`
- [Resident Records](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/resident.service.ts): `src/app/core/services/resident.service.ts`
- [Dashboard Analytics](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/admin-dashboard.service.ts): `src/app/core/services/admin-dashboard.service.ts`
- [Account Settings](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/settings.service.ts): `src/app/core/services/settings.service.ts`
- [Recovery Service](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/services/backup-recovery.service.ts): `src/app/core/services/backup-recovery.service.ts`
- [Firebase](https://github.com/jsambalod139/rbccms-system/blob/main/src/app/core/firebase.config.ts): `src/app/core/firebase.config.ts`

### Other components

- **User**
- **Supabase Audit API**

## Connections

- User → Sign In: signs in
- Sign In → Authentication: authenticates (evidence: `src/app/components/auth/login-components/login-components.ts`)
- Authentication → Firebase: reads profile (evidence: `src/app/core/services/auth.service.ts`)
- Authentication → Supabase Audit API: posts audit (evidence: `src/app/core/services/auth.service.ts`)
- User → Role Routing: opens workspace (evidence: `src/app/app.routes.ts`)
- Role Routing → Resident Workspace: routes resident (evidence: `src/app/app.routes.ts`)
- Role Routing → Personnel Workspace: routes personnel (evidence: `src/app/app.routes.ts`)
- Role Routing → Admin Workspace: routes admin (evidence: `src/app/app.routes.ts`)
- Submit Concern → Concern Records: creates concern (evidence: `src/app/components/pages/resident-submit-concern/resident-submit-concern.ts`)
- Submit Concern → Concern Categories: loads categories (evidence: `src/app/components/pages/resident-submit-concern/resident-submit-concern.ts`)
- Concern Tracking → Concern Records: loads concerns (evidence: `src/app/components/pages/resident-my-concern/resident-my-concern.ts`)
- Personnel Workspace → Concern Records: manages concerns (evidence: `src/app/components/pages/personnel-concern/personnel-concern.ts`)
- Personnel Workspace → Resident Records: loads residents (evidence: `src/app/components/pages/personnel-residents/personnel-residents.ts`)
- Personnel Reports → Concern Records: reads concerns (evidence: `src/app/components/pages/personnel-reports/personnel-reports.ts`)
- Personnel Reports → Resident Records: reads residents (evidence: `src/app/components/pages/personnel-reports/personnel-reports.ts`)
- Admin Reports → Concern Records: reads concerns (evidence: `src/app/components/pages/admin-reports/admin-reports.ts`)
- Admin Workspace → Dashboard Analytics: loads analytics (evidence: `src/app/components/pages/admin-dashboard/admin-dashboard.ts`)
- Office Management → Firebase: manages offices (evidence: `src/app/components/pages/admin-participating-office/admin-participating-office.ts`)
- Audit Logs → Firebase: reads audit data (evidence: `src/app/components/pages/admin-audit-logs/admin-audit-logs.ts`)
- Backup & Recovery → Recovery Service: invokes recovery (evidence: `src/app/components/pages/admin-backup-recovery/admin-backup-recovery.ts`)
- Concern Records → Firebase: reads and writes (evidence: `src/app/core/services/concern.service.ts`)
- Concern Categories → Firebase: loads categories
- Resident Records → Firebase: reads records (evidence: `src/app/core/services/resident.service.ts`)
- Dashboard Analytics → Firebase: subscribes to data (evidence: `src/app/core/services/admin-dashboard.service.ts`)
- Account Settings → Firebase: syncs settings (evidence: `src/app/core/services/settings.service.ts`)
