# mmahimashree/smart-microblog-solo architecture

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

- Interactive diagram: https://gitdiagram.com/mmahimashree/smart-microblog-solo
- Repository: https://github.com/mmahimashree/smart-microblog-solo

## Overview

Smart Microblog Privacy Guard is a microblogging app with privacy-risk checks before posts are saved. The main workflow runs from composing text, through scanning and risk scoring, to optional user review and saving; the home view then loads the feed and statistics. The frontend also exposes explore, notifications, messages, bookmarks, profile, and settings routes, though their implementations were not sampled. Source excerpts show the API and persistence flow; connections for unsampled page behavior are omitted.

Main entry points: [`frontend/src/pages/Home.jsx`](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/pages/Home.jsx) (Home Dashboard), [`frontend/src/components/PostComposer.jsx`](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/PostComposer.jsx) (Post Composer), [`frontend/src/api/client.js`](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/api/client.js) (API Client), [`backend/main.py`](https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/main.py) (FastAPI Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["App Router<br/>[App.jsx]"]
  node_home["Home Dashboard<br/>[Home.jsx]"]
  node_composer["Post Composer<br/>[PostComposer.jsx]"]
  node_debounce["Input Debounce<br/>[useDebounce.js]"]
  node_riskui["Risk Review UI<br/>[RiskMeter.jsx]"]
  node_warning["Warning Modal<br/>[WarningModal.jsx]"]
  node_feed["Feed<br/>[Feed.jsx]"]
  node_postcard["Post Card<br/>[PostCard.jsx]"]
  node_riskbadge["Risk Badge<br/>[RiskBadge.jsx]"]
  node_profilecard["Profile Card<br/>[ProfileCard.jsx]"]
  node_stats["Stats Panel<br/>[StatsPanel.jsx]"]
  node_search["Search Bar<br/>[SearchBar.jsx]"]
  node_otherpages["Other Routes"]
  node_theme["Theme Context<br/>[ThemeContext.jsx]"]
  node_client["API Client<br/>[client.js]"]
end

subgraph group_privacy["Privacy Analysis"]
  node_detector["PII Detector<br/>[pii_detector.py]"]
  node_scorer["Risk Scorer<br/>[risk_scorer.py]"]
end

subgraph group_backend["API Backend"]
  node_api["FastAPI Routes<br/>[main.py]"]
end

subgraph group_persistence["Persistence"]
  node_database["Database Access<br/>[database.py]"]
end

node_user(("User"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_otherpages
node_home -->|"renders"| node_composer
node_home -->|"renders"| node_feed
node_home -->|"renders"| node_profilecard
node_home -->|"renders"| node_stats
node_home -->|"renders"| node_search
node_home -->|"loads feed and stats"| node_client
node_home -->|"deletes posts"| node_client
node_feed -->|"renders"| node_postcard
node_postcard -->|"renders"| node_riskbadge
node_composer -->|"debounces text"| node_debounce
node_composer -->|"renders"| node_riskui
node_composer -->|"opens review"| node_warning
node_composer -->|"scans and saves"| node_client
node_profilecard -->|"loads profile"| node_client
node_client -->|"calls HTTP routes"| node_api
node_api -->|"detects PII"| node_detector
node_api -->|"scores risk"| node_scorer
node_api -->|"reads and writes"| node_database
node_database -->|"queries"| node_postgres

click node_app "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/pages/Home.jsx"
click node_composer "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/PostComposer.jsx"
click node_debounce "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/hooks/useDebounce.js"
click node_riskui "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/RiskMeter.jsx"
click node_warning "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/WarningModal.jsx"
click node_feed "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/Feed.jsx"
click node_postcard "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/PostCard.jsx"
click node_riskbadge "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/RiskBadge.jsx"
click node_profilecard "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/ProfileCard.jsx"
click node_stats "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/StatsPanel.jsx"
click node_search "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/SearchBar.jsx"
click node_otherpages "https://github.com/mmahimashree/smart-microblog-solo/tree/main/frontend/src/pages"
click node_theme "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/context/ThemeContext.jsx"
click node_client "https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/api/client.js"
click node_api "https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/main.py"
click node_detector "https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/pii_detector.py"
click node_scorer "https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/risk_scorer.py"
click node_database "https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/database.py"

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_composer,node_debounce,node_riskui,node_warning,node_feed,node_postcard,node_riskbadge,node_profilecard,node_stats,node_search,node_otherpages,node_theme,node_client,node_user toneBlue
class node_detector,node_scorer,node_postgres toneAmber
class node_api toneMint
class node_database toneRose
```

## Components

### Frontend

- [App Router](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Home Dashboard](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Post Composer](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/PostComposer.jsx): `frontend/src/components/PostComposer.jsx`
- [Input Debounce](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/hooks/useDebounce.js): `frontend/src/hooks/useDebounce.js`
- [Risk Review UI](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/RiskMeter.jsx): `frontend/src/components/RiskMeter.jsx`
- [Warning Modal](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/WarningModal.jsx): `frontend/src/components/WarningModal.jsx`
- [Feed](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/Feed.jsx): `frontend/src/components/Feed.jsx`
- [Post Card](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/PostCard.jsx): `frontend/src/components/PostCard.jsx`
- [Risk Badge](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/RiskBadge.jsx): `frontend/src/components/RiskBadge.jsx`
- [Profile Card](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/ProfileCard.jsx): `frontend/src/components/ProfileCard.jsx`
- [Stats Panel](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/StatsPanel.jsx): `frontend/src/components/StatsPanel.jsx`
- [Search Bar](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/components/SearchBar.jsx): `frontend/src/components/SearchBar.jsx`
- [Other Routes](https://github.com/mmahimashree/smart-microblog-solo/tree/main/frontend/src/pages): `frontend/src/pages`
- [Theme Context](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/context/ThemeContext.jsx): `frontend/src/context/ThemeContext.jsx`
- [API Client](https://github.com/mmahimashree/smart-microblog-solo/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Privacy Analysis

- [PII Detector](https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/pii_detector.py): `backend/pii_detector.py`
- [Risk Scorer](https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/risk_scorer.py): `backend/risk_scorer.py`

### API Backend

- [FastAPI Routes](https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/main.py): `backend/main.py`

### Persistence

- [Database Access](https://github.com/mmahimashree/smart-microblog-solo/blob/main/backend/database.py): `backend/database.py`

### Other components

- **User**
- **PostgreSQL**

## Connections

- User → App Router: uses
- App Router → Home Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App Router → Other Routes: routes to (evidence: `frontend/src/App.jsx`)
- Home Dashboard → Post Composer: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → Feed: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → Profile Card: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → Stats Panel: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → Search Bar: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → API Client: loads feed and stats (evidence: `frontend/src/pages/Home.jsx`)
- Home Dashboard → API Client: deletes posts (evidence: `frontend/src/pages/Home.jsx`)
- Feed → Post Card: renders (evidence: `frontend/src/components/Feed.jsx`)
- Post Card → Risk Badge: renders (evidence: `frontend/src/components/PostCard.jsx`)
- Post Composer → Input Debounce: debounces text (evidence: `frontend/src/components/PostComposer.jsx`)
- Post Composer → Risk Review UI: renders (evidence: `frontend/src/components/PostComposer.jsx`)
- Post Composer → Warning Modal: opens review (evidence: `frontend/src/components/PostComposer.jsx`)
- Post Composer → API Client: scans and saves (evidence: `frontend/src/components/PostComposer.jsx`)
- Profile Card → API Client: loads profile (evidence: `frontend/src/components/ProfileCard.jsx`)
- API Client → FastAPI Routes: calls HTTP routes (evidence: `frontend/src/api/client.js`)
- FastAPI Routes → PII Detector: detects PII (evidence: `backend/main.py`)
- FastAPI Routes → Risk Scorer: scores risk (evidence: `backend/main.py`)
- FastAPI Routes → Database Access: reads and writes (evidence: `backend/main.py`)
- Database Access → PostgreSQL: queries (evidence: `backend/database.py`)
