# mohammed-taha-zubair/brainly-fe architecture

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

- Interactive diagram: https://gitdiagram.com/mohammed-taha-zubair/brainly-fe
- Repository: https://github.com/mohammed-taha-zubair/brainly-fe

## Overview

Brainly Frontend is a Second Brain client for collecting, filtering, previewing, and sharing saved links. The main workflow runs from the routed dashboard through content loading and filtering, or through the add-content form into dashboard state and the backend; cards render platform-specific previews. Signup/signin and public sharing are additional documented capabilities. Backend calls are supported by the dashboard excerpt and README endpoint table; some modal internals and shared-view routing were not sampled.

Main entry points: [`src/pages/Dashboard.tsx`](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Dashboard.tsx) (Dashboard), [`src/App.tsx`](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/App.tsx) (Route app), [`src/components/CreateContentModal.tsx`](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/CreateContentModal.tsx) (Add content form), [`src/components/Sidebar.tsx`](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Sidebar.tsx) (Category sidebar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["Route app<br/>[App.tsx]"]
end

subgraph group_identity["Authentication"]
  node_signin["Sign in<br/>[Signin.tsx]"]
  node_signup["Sign up<br/>[Signup.tsx]"]
end

subgraph group_knowledge["Knowledge dashboard"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_api_config["API endpoint config<br/>[config.tsx]"]
  node_content_modal["Add content form"]
  node_share_modal["Share brain modal"]
  node_sidebar["Category sidebar<br/>[Sidebar.tsx]"]
  node_card["Content cards<br/>[Card.tsx]"]
end

subgraph group_ui["Shared UI"]
  node_button["Button control<br/>[Button.tsx]"]
  node_input["Text input<br/>[Input.tsx]"]
  node_sidebar_item["Sidebar item<br/>[SidebarItem.tsx]"]
  node_icons["Platform icons"]
end

node_user(("User"))
node_backend{{"Brainly backend"}}
node_platforms{{"Social platforms"}}

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_signin
node_app -->|"routes to"| node_signup
node_user -->|"submits credentials"| node_signin
node_user -->|"registers"| node_signup
node_signin -->|"authenticates"| node_backend
node_signup -->|"registers account"| node_backend
node_dashboard -->|"uses endpoint"| node_api_config
node_dashboard -->|"loads and saves content"| node_backend
node_dashboard -->|"opens and receives"| node_content_modal
node_content_modal -->|"submits item"| node_dashboard
node_content_modal -->|"uses fields"| node_input
node_content_modal -->|"uses control"| node_button
node_dashboard -->|"renders filters"| node_sidebar
node_sidebar -->|"renders items"| node_sidebar_item
node_dashboard -->|"renders filtered content"| node_card
node_dashboard -->|"opens modal"| node_share_modal
node_share_modal -->|"creates share link"| node_backend
node_dashboard -->|"requests shared-brain link"| node_backend
node_card -.->|"embeds media"| node_platforms
node_card -->|"renders platform icons"| node_icons
node_sidebar -->|"renders category icons"| node_icons
node_dashboard -->|"uses actions"| node_button

click node_app "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/App.tsx"
click node_dashboard "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Dashboard.tsx"
click node_signin "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Signin.tsx"
click node_signup "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Signup.tsx"
click node_api_config "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/config.tsx"
click node_content_modal "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/CreateContentModal.tsx"
click node_share_modal "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/ShareBrainModal.tsx"
click node_sidebar "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Sidebar.tsx"
click node_card "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Card.tsx"
click node_button "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Button.tsx"
click node_input "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Input.tsx"
click node_sidebar_item "https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/SidebarItem.tsx"
click node_icons "https://github.com/mohammed-taha-zubair/brainly-fe/tree/main/src/icons"

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_user toneBlue
class node_signin,node_signup toneAmber
class node_dashboard,node_api_config,node_content_modal,node_share_modal,node_sidebar,node_card toneMint
class node_button,node_input,node_sidebar_item,node_icons toneRose
class node_backend,node_platforms toneIndigo
```

## Components

### App entry

- [Route app](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/App.tsx): `src/App.tsx`

### Authentication

- [Sign in](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Signin.tsx): `src/pages/Signin.tsx`
- [Sign up](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Signup.tsx): `src/pages/Signup.tsx`

### Knowledge dashboard

- [Dashboard](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [API endpoint config](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/config.tsx): `src/config.tsx`
- [Add content form](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/CreateContentModal.tsx): `src/components/CreateContentModal.tsx`
- [Share brain modal](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/ShareBrainModal.tsx): `src/components/ShareBrainModal.tsx`
- [Category sidebar](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Content cards](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Card.tsx): `src/components/Card.tsx`

### Shared UI

- [Button control](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Button.tsx): `src/components/Button.tsx`
- [Text input](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/Input.tsx): `src/components/Input.tsx`
- [Sidebar item](https://github.com/mohammed-taha-zubair/brainly-fe/blob/main/src/components/SidebarItem.tsx): `src/components/SidebarItem.tsx`
- [Platform icons](https://github.com/mohammed-taha-zubair/brainly-fe/tree/main/src/icons): `src/icons`

### Other components

- **User**
- **Brainly backend**
- **Social platforms**

## Connections

- User → Route app: opens (evidence: `README.md`)
- Route app → Dashboard: routes to (evidence: `src/App.tsx`)
- Route app → Sign in: routes to (evidence: `src/App.tsx`)
- Route app → Sign up: routes to (evidence: `src/App.tsx`)
- User → Sign in: submits credentials (evidence: `README.md`)
- User → Sign up: registers (evidence: `README.md`)
- Sign in → Brainly backend: authenticates (evidence: `README.md`)
- Sign up → Brainly backend: registers account (evidence: `README.md`)
- Dashboard → API endpoint config: uses endpoint (evidence: `src/pages/Dashboard.tsx`)
- Dashboard → Brainly backend: loads and saves content (evidence: `src/pages/Dashboard.tsx`)
- Dashboard → Add content form: opens and receives (evidence: `src/pages/Dashboard.tsx`)
- Add content form → Dashboard: submits item (evidence: `src/components/CreateContentModal.tsx`)
- Add content form → Text input: uses fields (evidence: `src/components/CreateContentModal.tsx`)
- Add content form → Button control: uses control (evidence: `src/components/CreateContentModal.tsx`)
- Dashboard → Category sidebar: renders filters (evidence: `src/pages/Dashboard.tsx`)
- Category sidebar → Sidebar item: renders items (evidence: `src/components/Sidebar.tsx`)
- Dashboard → Content cards: renders filtered content (evidence: `src/pages/Dashboard.tsx`)
- Dashboard → Share brain modal: opens modal (evidence: `src/pages/Dashboard.tsx`)
- Share brain modal → Brainly backend: creates share link (evidence: `README.md`)
- Dashboard → Brainly backend: requests shared-brain link (evidence: `README.md`)
- Content cards → Social platforms: embeds media (evidence: `README.md`)
- Content cards → Platform icons: renders platform icons (evidence: `src/components/Card.tsx`)
- Category sidebar → Platform icons: renders category icons (evidence: `src/components/Sidebar.tsx`)
- Dashboard → Button control: uses actions (evidence: `src/pages/Dashboard.tsx`)
