# rizwan-ghouri/blognest architecture

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

- Interactive diagram: https://gitdiagram.com/rizwan-ghouri/blognest
- Repository: https://github.com/rizwan-ghouri/blognest

## Overview

BlogNest is a Firebase-backed blog: users sign up or sign in, then browse posts or manage their own posts from the dashboard. The sampled scripts show authentication, a public-to-signed-in-user feed, and dashboard create/read/update/delete behavior. The README also documents Google sign-in and password reset, which are included within the login component. Source excerpts do not show the HTML wiring or unsampled page behavior, so those links are kept at the documented workflow level.

Main entry points: [`pages/Home/home.js`](https://github.com/rizwan-ghouri/blognest/blob/main/pages/Home/home.js) (Community feed), [`login.js`](https://github.com/rizwan-ghouri/blognest/blob/main/login.js) (Sign-in and recovery), [`pages/Dashboard/dashboard.js`](https://github.com/rizwan-ghouri/blognest/blob/main/pages/Dashboard/dashboard.js) (Post dashboard), [`firebase.js`](https://github.com/rizwan-ghouri/blognest/blob/main/firebase.js) (Firebase setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["User identity"]
  node_login["Sign-in and recovery<br/>[login.js]"]
  node_signup["Account signup<br/>[signup.js]"]
end

subgraph group_posts["Blog posts"]
  node_home["Community feed<br/>[home.js]"]
  node_dashboard["Post dashboard<br/>[dashboard.js]"]
  node_todos[("Todos collection")]
end

subgraph group_platform["Firebase platform"]
  node_firebase["Firebase setup<br/>[firebase.js]"]
  node_firebase_auth["Firebase Authentication"]
  node_firestore[("Cloud Firestore")]
end

node_user(("User"))

node_user -->|"signs in"| node_login
node_user -->|"creates account"| node_signup
node_user -->|"browses posts"| node_home
node_user -->|"manages posts"| node_dashboard
node_login -->|"authenticates"| node_firebase_auth
node_signup -->|"creates account"| node_firebase_auth
node_dashboard -->|"checks session"| node_firebase_auth
node_home -->|"checks session"| node_firebase_auth
node_firebase -->|"initializes"| node_firebase_auth
node_firebase -->|"initializes"| node_firestore
node_home -->|"reads posts"| node_todos
node_dashboard -->|"reads and edits"| node_todos
node_todos -.->|"stored in"| node_firestore
node_login -->|"redirects on sign-in"| node_home

click node_login "https://github.com/rizwan-ghouri/blognest/blob/main/login.js"
click node_signup "https://github.com/rizwan-ghouri/blognest/blob/main/pages/Signup/signup.js"
click node_home "https://github.com/rizwan-ghouri/blognest/blob/main/pages/Home/home.js"
click node_dashboard "https://github.com/rizwan-ghouri/blognest/blob/main/pages/Dashboard/dashboard.js"
click node_firebase "https://github.com/rizwan-ghouri/blognest/blob/main/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_login,node_signup,node_user toneBlue
class node_home,node_dashboard,node_todos toneAmber
class node_firebase,node_firebase_auth,node_firestore toneMint
```

## Components

### User identity

- [Sign-in and recovery](https://github.com/rizwan-ghouri/blognest/blob/main/login.js): `login.js`
- [Account signup](https://github.com/rizwan-ghouri/blognest/blob/main/pages/Signup/signup.js): `pages/Signup/signup.js`

### Blog posts

- [Community feed](https://github.com/rizwan-ghouri/blognest/blob/main/pages/Home/home.js): `pages/Home/home.js`
- [Post dashboard](https://github.com/rizwan-ghouri/blognest/blob/main/pages/Dashboard/dashboard.js): `pages/Dashboard/dashboard.js`
- **Todos collection**

### Firebase platform

- [Firebase setup](https://github.com/rizwan-ghouri/blognest/blob/main/firebase.js): `firebase.js`
- **Firebase Authentication**
- **Cloud Firestore**

### Other components

- **User**

## Connections

- User → Sign-in and recovery: signs in (evidence: `README.md`)
- User → Account signup: creates account (evidence: `README.md`)
- User → Community feed: browses posts (evidence: `README.md`)
- User → Post dashboard: manages posts (evidence: `README.md`)
- Sign-in and recovery → Firebase Authentication: authenticates (evidence: `login.js`)
- Account signup → Firebase Authentication: creates account (evidence: `pages/Signup/signup.js`)
- Post dashboard → Firebase Authentication: checks session (evidence: `pages/Dashboard/dashboard.js`)
- Community feed → Firebase Authentication: checks session (evidence: `pages/Home/home.js`)
- Firebase setup → Firebase Authentication: initializes (evidence: `firebase.js`)
- Firebase setup → Cloud Firestore: initializes (evidence: `firebase.js`)
- Community feed → Todos collection: reads posts (evidence: `pages/Home/home.js`)
- Post dashboard → Todos collection: reads and edits (evidence: `pages/Dashboard/dashboard.js`)
- Todos collection → Cloud Firestore: stored in
- Sign-in and recovery → Community feed: redirects on sign-in (evidence: `login.js`)
