# riverine06/ugc-bncc architecture

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

- Interactive diagram: https://gitdiagram.com/riverine06/ugc-bncc
- Repository: https://github.com/riverine06/ugc-bncc

## Overview

This is a BNCC platoon portal combining public information and cadet services with administrative content and membership management. The main user workflow enters through the routed app, browses public pages or a cadet profile, and uses Firebase-backed services; applicants can submit recruitment information, while administrators manage records and site content. The graph reflects documented imports, routes and service calls. The README is empty, and unsampled modules are represented only where the source index supports their role or relationship.

Main entry points: [`src/App.tsx`](https://github.com/riverine06/ugc-bncc/blob/main/src/App.tsx) (App routing), [`src/components/AdminDashboard.tsx`](https://github.com/riverine06/ugc-bncc/blob/main/src/components/AdminDashboard.tsx) (Admin dashboard), [`src/firebaseService.ts`](https://github.com/riverine06/ugc-bncc/blob/main/src/firebaseService.ts) (Firebase service facade), [`src/services/storageService.ts`](https://github.com/riverine06/ugc-bncc/blob/main/src/services/storageService.ts) (File storage service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Public portal"]
  node_app["App routing<br/>[App.tsx]"]
  node_home["Home and homepage CMS<br/>[Home.tsx]"]
  node_about["About<br/>[About.tsx]"]
  node_events["Events portal<br/>[EventPortal.tsx]"]
  node_achievements["Achievements<br/>[Achievements.tsx]"]
  node_documents["Document library"]
  node_gallery["Gallery<br/>[Gallery.tsx]"]
  node_seo["Page metadata<br/>[SEO.tsx]"]
end

subgraph group_membership["Cadets and admissions"]
  node_directory["Cadet directory<br/>[CadetDirectory.tsx]"]
  node_profile["Cadet profile<br/>[CadetProfile.tsx]"]
  node_recruitment["Recruitment applications<br/>[Recruitment.tsx]"]
  node_leadership["Leadership directory<br/>[Leadership.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_dash["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_members["Member management<br/>[MembersManager.tsx]"]
  node_inbox["Admissions inbox"]
  node_camps["Camps management<br/>[CampsCMS.tsx]"]
  node_admin_content["Content CMS panels"]
end

subgraph group_platform["Services and storage"]
  node_auth["Authentication and roles<br/>[auth.ts]"]
  node_firebase_facade["Firebase service facade<br/>[firebaseService.ts]"]
  node_firebase_init["Firebase initialization<br/>[firebase.ts]"]
  node_storage["File storage service<br/>[storageService.ts]"]
  node_validation["File validation<br/>[fileValidation.ts]"]
end

node_visitor(("Visitor or cadet"))
node_firebase[("Firebase platform")]
node_drive["Google Drive"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_achievements
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_directory
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_recruitment
node_app -->|"routes to"| node_leadership
node_app -.->|"routes to"| node_admin_dash
node_app -->|"uses"| node_auth
node_app -->|"subscribes via"| node_firebase_facade
node_admin_dash -->|"renders"| node_members
node_admin_dash -->|"renders"| node_inbox
node_admin_dash -->|"renders"| node_camps
node_admin_dash -->|"renders"| node_admin_content
node_members -->|"writes records"| node_firebase_facade
node_profile -->|"reads and writes"| node_firebase_facade
node_home -->|"saves homepage"| node_firebase_facade
node_firebase_facade -->|"re-exports services"| node_firebase_init
node_firebase_init -->|"initializes"| node_firebase
node_firebase_init -->|"delegates uploads"| node_storage
node_storage -->|"sanitizes files"| node_validation
node_storage -->|"requests access token"| node_auth
node_storage -->|"uploads and manages files"| node_drive
node_auth -->|"authenticates users"| node_firebase
node_seo -.->|"sets page metadata"| node_app

click node_app "https://github.com/riverine06/ugc-bncc/blob/main/src/App.tsx"
click node_home "https://github.com/riverine06/ugc-bncc/blob/main/src/components/Home.tsx"
click node_about "https://github.com/riverine06/ugc-bncc/blob/main/src/components/About.tsx"
click node_events "https://github.com/riverine06/ugc-bncc/blob/main/src/components/EventPortal.tsx"
click node_achievements "https://github.com/riverine06/ugc-bncc/blob/main/src/components/Achievements.tsx"
click node_documents "https://github.com/riverine06/ugc-bncc/blob/main/src/components/DocumentLibrary.tsx"
click node_gallery "https://github.com/riverine06/ugc-bncc/blob/main/src/components/Gallery.tsx"
click node_seo "https://github.com/riverine06/ugc-bncc/blob/main/src/components/SEO.tsx"
click node_directory "https://github.com/riverine06/ugc-bncc/blob/main/src/components/CadetDirectory.tsx"
click node_profile "https://github.com/riverine06/ugc-bncc/blob/main/src/components/CadetProfile.tsx"
click node_recruitment "https://github.com/riverine06/ugc-bncc/blob/main/src/components/Recruitment.tsx"
click node_leadership "https://github.com/riverine06/ugc-bncc/blob/main/src/components/Leadership.tsx"
click node_admin_dash "https://github.com/riverine06/ugc-bncc/blob/main/src/components/AdminDashboard.tsx"
click node_members "https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/MembersManager.tsx"
click node_inbox "https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/AdmissionsInbox.tsx"
click node_camps "https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/CampsCMS.tsx"
click node_admin_content "https://github.com/riverine06/ugc-bncc/tree/main/src/components/admin"
click node_auth "https://github.com/riverine06/ugc-bncc/blob/main/src/services/auth.ts"
click node_firebase_facade "https://github.com/riverine06/ugc-bncc/blob/main/src/firebaseService.ts"
click node_firebase_init "https://github.com/riverine06/ugc-bncc/blob/main/src/firebase.ts"
click node_storage "https://github.com/riverine06/ugc-bncc/blob/main/src/services/storageService.ts"
click node_validation "https://github.com/riverine06/ugc-bncc/blob/main/src/utils/fileValidation.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_app,node_home,node_about,node_events,node_achievements,node_documents,node_gallery,node_seo toneBlue
class node_directory,node_profile,node_recruitment,node_leadership,node_firebase toneAmber
class node_admin_dash,node_members,node_inbox,node_camps,node_admin_content toneMint
class node_auth,node_firebase_facade,node_firebase_init,node_storage,node_validation toneRose
class node_visitor,node_drive toneIndigo
```

## Components

### Public portal

- [App routing](https://github.com/riverine06/ugc-bncc/blob/main/src/App.tsx): `src/App.tsx`
- [Home and homepage CMS](https://github.com/riverine06/ugc-bncc/blob/main/src/components/Home.tsx): `src/components/Home.tsx`
- [About](https://github.com/riverine06/ugc-bncc/blob/main/src/components/About.tsx): `src/components/About.tsx`
- [Events portal](https://github.com/riverine06/ugc-bncc/blob/main/src/components/EventPortal.tsx): `src/components/EventPortal.tsx`
- [Achievements](https://github.com/riverine06/ugc-bncc/blob/main/src/components/Achievements.tsx): `src/components/Achievements.tsx`
- [Document library](https://github.com/riverine06/ugc-bncc/blob/main/src/components/DocumentLibrary.tsx): `src/components/DocumentLibrary.tsx`
- [Gallery](https://github.com/riverine06/ugc-bncc/blob/main/src/components/Gallery.tsx): `src/components/Gallery.tsx`
- [Page metadata](https://github.com/riverine06/ugc-bncc/blob/main/src/components/SEO.tsx): `src/components/SEO.tsx`

### Cadets and admissions

- [Cadet directory](https://github.com/riverine06/ugc-bncc/blob/main/src/components/CadetDirectory.tsx): `src/components/CadetDirectory.tsx`
- [Cadet profile](https://github.com/riverine06/ugc-bncc/blob/main/src/components/CadetProfile.tsx): `src/components/CadetProfile.tsx`
- [Recruitment applications](https://github.com/riverine06/ugc-bncc/blob/main/src/components/Recruitment.tsx): `src/components/Recruitment.tsx`
- [Leadership directory](https://github.com/riverine06/ugc-bncc/blob/main/src/components/Leadership.tsx): `src/components/Leadership.tsx`

### Administration

- [Admin dashboard](https://github.com/riverine06/ugc-bncc/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`
- [Member management](https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/MembersManager.tsx): `src/components/admin/MembersManager.tsx`
- [Admissions inbox](https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/AdmissionsInbox.tsx): `src/components/admin/AdmissionsInbox.tsx`
- [Camps management](https://github.com/riverine06/ugc-bncc/blob/main/src/components/admin/CampsCMS.tsx): `src/components/admin/CampsCMS.tsx`
- [Content CMS panels](https://github.com/riverine06/ugc-bncc/tree/main/src/components/admin): `src/components/admin`

### Services and storage

- [Authentication and roles](https://github.com/riverine06/ugc-bncc/blob/main/src/services/auth.ts): `src/services/auth.ts`
- [Firebase service facade](https://github.com/riverine06/ugc-bncc/blob/main/src/firebaseService.ts): `src/firebaseService.ts`
- [Firebase initialization](https://github.com/riverine06/ugc-bncc/blob/main/src/firebase.ts): `src/firebase.ts`
- [File storage service](https://github.com/riverine06/ugc-bncc/blob/main/src/services/storageService.ts): `src/services/storageService.ts`
- [File validation](https://github.com/riverine06/ugc-bncc/blob/main/src/utils/fileValidation.ts): `src/utils/fileValidation.ts`

### Other components

- **Visitor or cadet**
- **Firebase platform**
- **Google Drive**

## Connections

- Visitor or cadet → App routing: opens
- App routing → Home and homepage CMS: routes to (evidence: `src/App.tsx`)
- App routing → About: routes to (evidence: `src/App.tsx`)
- App routing → Events portal: routes to (evidence: `src/App.tsx`)
- App routing → Achievements: routes to (evidence: `src/App.tsx`)
- App routing → Document library: routes to (evidence: `src/App.tsx`)
- App routing → Gallery: routes to (evidence: `src/App.tsx`)
- App routing → Cadet directory: routes to (evidence: `src/App.tsx`)
- App routing → Cadet profile: routes to (evidence: `src/App.tsx`)
- App routing → Recruitment applications: routes to (evidence: `src/App.tsx`)
- App routing → Leadership directory: routes to (evidence: `src/App.tsx`)
- App routing → Admin dashboard: routes to (evidence: `src/App.tsx`)
- App routing → Authentication and roles: uses (evidence: `src/App.tsx`)
- App routing → Firebase service facade: subscribes via (evidence: `src/App.tsx`)
- Admin dashboard → Member management: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin dashboard → Admissions inbox: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin dashboard → Camps management: renders (evidence: `src/components/AdminDashboard.tsx`)
- Admin dashboard → Content CMS panels: renders (evidence: `src/components/AdminDashboard.tsx`)
- Member management → Firebase service facade: writes records (evidence: `src/components/admin/MembersManager.tsx`)
- Cadet profile → Firebase service facade: reads and writes (evidence: `src/components/CadetProfile.tsx`)
- Home and homepage CMS → Firebase service facade: saves homepage (evidence: `src/components/Home.tsx`)
- Firebase service facade → Firebase initialization: re-exports services (evidence: `src/firebaseService.ts`)
- Firebase initialization → Firebase platform: initializes (evidence: `src/firebase.ts`)
- Firebase initialization → File storage service: delegates uploads (evidence: `src/firebase.ts`)
- File storage service → File validation: sanitizes files (evidence: `src/services/storageService.ts`)
- File storage service → Authentication and roles: requests access token (evidence: `src/services/storageService.ts`)
- File storage service → Google Drive: uploads and manages files (evidence: `src/services/storageService.ts`)
- Authentication and roles → Firebase platform: authenticates users (evidence: `src/services/auth.ts`)
- Page metadata → App routing: sets page metadata
