# devanshdahiya/paste-app architecture

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

- Interactive diagram: https://gitdiagram.com/devanshdahiya/paste-app
- Repository: https://github.com/devanshdahiya/paste-app

## Overview

Paste App is a client-side text-snippet manager. Users create or edit titled content, save it locally, then browse, search, view, share, copy, download, or delete pastes. Routing selects the editor, collection, or read-only view; Redux manages paste state and the slice persists changes in browser localStorage. The shown code supports the primary UI-to-state workflow and local persistence; no server or remote sharing service is evidenced. The README documents sharing, while the sampled list code shows a share action but not its implementation.

Main entry points: [`src/redux/pasteSlice.js`](https://github.com/devanshdahiya/paste-app/blob/master/src/redux/pasteSlice.js) (Paste state), [`src/App.jsx`](https://github.com/devanshdahiya/paste-app/blob/master/src/App.jsx) (Route shell), [`src/components/Home.jsx`](https://github.com/devanshdahiya/paste-app/blob/master/src/components/Home.jsx) (Create and edit), [`src/components/Paste.jsx`](https://github.com/devanshdahiya/paste-app/blob/master/src/components/Paste.jsx) (Browse and manage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app_shell["Route shell<br/>[App.jsx]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
end

subgraph group_paste_workflow["Paste workflows"]
  node_editor["Create and edit<br/>[Home.jsx]"]
  node_paste_list["Browse and manage<br/>[Paste.jsx]"]
  node_paste_view["Read-only view<br/>[ViewPaste.jsx]"]
end

subgraph group_state_storage["State and storage"]
  node_redux_store["Redux store<br/>[store.js]"]
  node_paste_state["Paste state<br/>[pasteSlice.js]"]
  node_local_storage[("Browser storage")]
end

node_user(("User"))
node_browser(("Browser runtime"))

node_user -->|"uses routes"| node_app_shell
node_app_shell -->|"renders"| node_navbar
node_app_shell -->|"routes to"| node_editor
node_app_shell -->|"routes to"| node_paste_list
node_app_shell -->|"routes to"| node_paste_view
node_editor -->|"dispatches changes"| node_paste_state
node_editor -->|"reads pastes"| node_paste_state
node_paste_list -->|"reads pastes"| node_paste_state
node_paste_list -->|"dispatches deletion"| node_paste_state
node_paste_view -->|"reads paste"| node_paste_state
node_redux_store -->|"registers reducer"| node_paste_state
node_paste_state -->|"persists state"| node_local_storage
node_local_storage -->|"loads initial state"| node_paste_state
node_user -->|"copies or downloads"| node_browser

click node_app_shell "https://github.com/devanshdahiya/paste-app/blob/master/src/App.jsx"
click node_navbar "https://github.com/devanshdahiya/paste-app/blob/master/src/components/Navbar.jsx"
click node_editor "https://github.com/devanshdahiya/paste-app/blob/master/src/components/Home.jsx"
click node_paste_list "https://github.com/devanshdahiya/paste-app/blob/master/src/components/Paste.jsx"
click node_paste_view "https://github.com/devanshdahiya/paste-app/blob/master/src/components/ViewPaste.jsx"
click node_redux_store "https://github.com/devanshdahiya/paste-app/blob/master/src/store.js"
click node_paste_state "https://github.com/devanshdahiya/paste-app/blob/master/src/redux/pasteSlice.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_app_shell,node_navbar,node_user,node_browser toneBlue
class node_editor,node_paste_list,node_paste_view toneAmber
class node_redux_store,node_paste_state,node_local_storage toneMint
```

## Components

### App navigation

- [Route shell](https://github.com/devanshdahiya/paste-app/blob/master/src/App.jsx): `src/App.jsx`
- [Navigation bar](https://github.com/devanshdahiya/paste-app/blob/master/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Paste workflows

- [Create and edit](https://github.com/devanshdahiya/paste-app/blob/master/src/components/Home.jsx): `src/components/Home.jsx`
- [Browse and manage](https://github.com/devanshdahiya/paste-app/blob/master/src/components/Paste.jsx): `src/components/Paste.jsx`
- [Read-only view](https://github.com/devanshdahiya/paste-app/blob/master/src/components/ViewPaste.jsx): `src/components/ViewPaste.jsx`

### State and storage

- [Redux store](https://github.com/devanshdahiya/paste-app/blob/master/src/store.js): `src/store.js`
- [Paste state](https://github.com/devanshdahiya/paste-app/blob/master/src/redux/pasteSlice.js): `src/redux/pasteSlice.js`
- **Browser storage**

### Other components

- **User**
- **Browser runtime**

## Connections

- User → Route shell: uses routes (evidence: `src/App.jsx`)
- Route shell → Navigation bar: renders (evidence: `src/App.jsx`)
- Route shell → Create and edit: routes to (evidence: `src/App.jsx`)
- Route shell → Browse and manage: routes to (evidence: `src/App.jsx`)
- Route shell → Read-only view: routes to (evidence: `src/App.jsx`)
- Create and edit → Paste state: dispatches changes (evidence: `src/components/Home.jsx`)
- Create and edit → Paste state: reads pastes (evidence: `src/components/Home.jsx`)
- Browse and manage → Paste state: reads pastes (evidence: `src/components/Paste.jsx`)
- Browse and manage → Paste state: dispatches deletion (evidence: `src/components/Paste.jsx`)
- Read-only view → Paste state: reads paste (evidence: `src/components/ViewPaste.jsx`)
- Redux store → Paste state: registers reducer (evidence: `src/store.js`)
- Paste state → Browser storage: persists state (evidence: `src/redux/pasteSlice.js`)
- Browser storage → Paste state: loads initial state (evidence: `src/redux/pasteSlice.js`)
- User → Browser runtime: copies or downloads
