# imran-ahmedd/nnnnn architecture

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

- Interactive diagram: https://gitdiagram.com/imran-ahmedd/nnnnn
- Repository: https://github.com/imran-ahmedd/nnnnn

## Overview

সাথী একটি Vanilla JS/Firebase ডেটিং PWA। ব্যবহারকারী সাইন আপ বা লগইন করে প্রোফাইল ও ছবি যোগ করেন; এরপর আবিষ্কার ডেকে লাইক/পাস করেন, পারস্পরিক লাইক ম্যাচ তৈরি করে, এবং ম্যাচ থেকে রিয়েলটাইম চ্যাট বা WebRTC কল শুরু হয়। `js/app.js` ভিউ ও ফিচার মডিউলগুলোর সূচনা/নেভিগেশন সামলায়; Firebase Auth, Firestore ও Storage ডেটা ও সিগন্যালিংয়ের backend। README-তে বর্ণিত PWA app-shell cache-ও দেখানো হয়েছে।

Main entry points: [`js/app.js`](https://github.com/imran-ahmedd/nnnnn/blob/main/js/app.js) (Bootstrap and navigation), [`js/auth.js`](https://github.com/imran-ahmedd/nnnnn/blob/main/js/auth.js) (Authentication), [`js/profile.js`](https://github.com/imran-ahmedd/nnnnn/blob/main/js/profile.js) (Onboarding and profile), [`js/swipe.js`](https://github.com/imran-ahmedd/nnnnn/blob/main/js/swipe.js) (Discovery and matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_shell["Single-page shell<br/>[index.html]"]
  node_app["Bootstrap and navigation<br/>[app.js]"]
  node_ui["View and toast helpers<br/>[ui.js]"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Authentication<br/>[auth.js]"]
  node_profile["Onboarding and profile<br/>[profile.js]"]
end

subgraph group_discovery["Discovery and matching"]
  node_swipe["Discovery and matching<br/>[swipe.js]"]
end

subgraph group_connections["Chat and calls"]
  node_chat["Match chat<br/>[chat.js]"]
  node_call["Video calling<br/>[videocall.js]"]
end

subgraph group_platform["Platform services"]
  node_firebase["Firebase client setup<br/>[firebase-config.js]"]
  node_firestore[("Firestore")]
  node_firebaseauth["Firebase Authentication"]
  node_storage[("Firebase Storage")]
  node_webrtc["Browser WebRTC and media"]
  node_manifest["PWA manifest<br/>[manifest.json]"]
  node_worker["App-shell service worker<br/>[sw.js]"]
  node_browsercache[("Browser cache")]
end

node_user(("App user"))

node_user -->|"uses"| node_shell
node_shell -->|"loads"| node_app
node_app -->|"starts and observes"| node_auth
node_app -->|"initializes"| node_profile
node_app -->|"initializes and loads"| node_swipe
node_app -->|"initializes"| node_chat
node_app -->|"initializes controls"| node_call
node_app -->|"switches views"| node_ui
node_auth -->|"reports auth state"| node_app
node_profile -->|"signals completion"| node_app
node_swipe -->|"signals new match"| node_app
node_app -->|"registers"| node_worker
node_shell -.->|"declares PWA"| node_manifest
node_worker -->|"caches app shell"| node_browsercache
node_firebase -->|"provides client"| node_auth
node_firebase -->|"provides clients"| node_profile
node_firebase -->|"provides client"| node_swipe
node_firebase -->|"provides client"| node_chat
node_firebase -->|"provides client"| node_call
node_auth -->|"authenticates"| node_firebaseauth
node_auth -->|"reads and writes users"| node_firestore
node_profile -->|"updates profile"| node_firestore
node_profile -->|"uploads photos"| node_storage
node_swipe -->|"reads profiles and records swipes"| node_firestore
node_swipe -->|"creates matches"| node_firestore
node_chat -->|"listens and writes messages"| node_firestore
node_chat -->|"starts and listens for calls"| node_call
node_call -->|"exchanges call signaling"| node_firestore
node_call -->|"sets up media connection"| node_webrtc
node_auth -->|"shows errors"| node_ui
node_profile -->|"shows feedback"| node_ui
node_swipe -->|"shows feedback"| node_ui
node_chat -->|"formats timestamps"| node_ui
node_call -->|"shows call views"| node_ui

click node_shell "https://github.com/imran-ahmedd/nnnnn/blob/main/index.html"
click node_app "https://github.com/imran-ahmedd/nnnnn/blob/main/js/app.js"
click node_ui "https://github.com/imran-ahmedd/nnnnn/blob/main/js/ui.js"
click node_auth "https://github.com/imran-ahmedd/nnnnn/blob/main/js/auth.js"
click node_profile "https://github.com/imran-ahmedd/nnnnn/blob/main/js/profile.js"
click node_swipe "https://github.com/imran-ahmedd/nnnnn/blob/main/js/swipe.js"
click node_chat "https://github.com/imran-ahmedd/nnnnn/blob/main/js/chat.js"
click node_call "https://github.com/imran-ahmedd/nnnnn/blob/main/js/videocall.js"
click node_firebase "https://github.com/imran-ahmedd/nnnnn/blob/main/js/firebase-config.js"
click node_manifest "https://github.com/imran-ahmedd/nnnnn/blob/main/manifest.json"
click node_worker "https://github.com/imran-ahmedd/nnnnn/blob/main/sw.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_shell,node_app,node_ui,node_user toneBlue
class node_auth,node_profile toneAmber
class node_swipe toneMint
class node_chat,node_call toneRose
class node_firebase,node_firestore,node_firebaseauth,node_storage,node_webrtc,node_manifest,node_worker,node_browsercache toneIndigo
```

## Components

### App experience

- [Single-page shell](https://github.com/imran-ahmedd/nnnnn/blob/main/index.html): `index.html`
- [Bootstrap and navigation](https://github.com/imran-ahmedd/nnnnn/blob/main/js/app.js): `js/app.js`
- [View and toast helpers](https://github.com/imran-ahmedd/nnnnn/blob/main/js/ui.js): `js/ui.js`

### Identity and profile

- [Authentication](https://github.com/imran-ahmedd/nnnnn/blob/main/js/auth.js): `js/auth.js`
- [Onboarding and profile](https://github.com/imran-ahmedd/nnnnn/blob/main/js/profile.js): `js/profile.js`

### Discovery and matching

- [Discovery and matching](https://github.com/imran-ahmedd/nnnnn/blob/main/js/swipe.js): `js/swipe.js`

### Chat and calls

- [Match chat](https://github.com/imran-ahmedd/nnnnn/blob/main/js/chat.js): `js/chat.js`
- [Video calling](https://github.com/imran-ahmedd/nnnnn/blob/main/js/videocall.js): `js/videocall.js`

### Platform services

- [Firebase client setup](https://github.com/imran-ahmedd/nnnnn/blob/main/js/firebase-config.js): `js/firebase-config.js`
- **Firestore**
- **Firebase Authentication**
- **Firebase Storage**
- **Browser WebRTC and media**
- [PWA manifest](https://github.com/imran-ahmedd/nnnnn/blob/main/manifest.json): `manifest.json`
- [App-shell service worker](https://github.com/imran-ahmedd/nnnnn/blob/main/sw.js): `sw.js`
- **Browser cache**

### Other components

- **App user**

## Connections

- App user → Single-page shell: uses
- Single-page shell → Bootstrap and navigation: loads
- Bootstrap and navigation → Authentication: starts and observes
- Bootstrap and navigation → Onboarding and profile: initializes
- Bootstrap and navigation → Discovery and matching: initializes and loads
- Bootstrap and navigation → Match chat: initializes
- Bootstrap and navigation → Video calling: initializes controls
- Bootstrap and navigation → View and toast helpers: switches views
- Authentication → Bootstrap and navigation: reports auth state
- Onboarding and profile → Bootstrap and navigation: signals completion
- Discovery and matching → Bootstrap and navigation: signals new match
- Bootstrap and navigation → App-shell service worker: registers
- Single-page shell → PWA manifest: declares PWA
- App-shell service worker → Browser cache: caches app shell
- Firebase client setup → Authentication: provides client
- Firebase client setup → Onboarding and profile: provides clients
- Firebase client setup → Discovery and matching: provides client
- Firebase client setup → Match chat: provides client
- Firebase client setup → Video calling: provides client
- Authentication → Firebase Authentication: authenticates
- Authentication → Firestore: reads and writes users
- Onboarding and profile → Firestore: updates profile
- Onboarding and profile → Firebase Storage: uploads photos
- Discovery and matching → Firestore: reads profiles and records swipes
- Discovery and matching → Firestore: creates matches
- Match chat → Firestore: listens and writes messages
- Match chat → Video calling: starts and listens for calls
- Video calling → Firestore: exchanges call signaling
- Video calling → Browser WebRTC and media: sets up media connection
- Authentication → View and toast helpers: shows errors
- Onboarding and profile → View and toast helpers: shows feedback
- Discovery and matching → View and toast helpers: shows feedback
- Match chat → View and toast helpers: formats timestamps
- Video calling → View and toast helpers: shows call views
