# itisthenikhilsingh/cloudsharewebapp architecture

> Architecture diagram of the GitHub repository itisthenikhilsingh/cloudsharewebapp, 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/itisthenikhilsingh/cloudsharewebapp
- Repository: https://github.com/itisthenikhilsingh/cloudsharewebapp

## Overview

CloudShare is a React frontend for uploading, organizing, sharing, and downloading files, with credit-based plans and transaction history. The principal workflow runs through the authenticated dashboard: users upload files, review recent uploads, then manage or share files; public-link visitors can view and download shared files. Landing-page marketing, credit tracking, subscriptions, and transactions are separate product branches. API endpoint definitions and sampled page code establish the frontend’s backend interactions; backend implementation details are not present in this repository.

Main entry points: [`src/App.jsx`](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/App.jsx) (App router), [`src/pages/MyFiles.jsx`](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/MyFiles.jsx) (My files), [`src/util/apiEndpoints.js`](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/util/apiEndpoints.js) (API endpoints), [`src/layout/DashboardLayout.jsx`](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/layout/DashboardLayout.jsx) (Dashboard layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and access"]
  node_app["App router<br/>[App.jsx]"]
  node_clerk["Clerk identity"]
  node_layout["Dashboard layout"]
  node_navbar["Navbar<br/>[Navbar.jsx]"]
  node_side_menu["Side menu<br/>[SideMenu.jsx]"]
end

subgraph group_files["File workflows"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_dashboard_upload["Dashboard upload"]
  node_recent_files["Recent files<br/>[RecentFiles.jsx]"]
  node_upload_page["Upload page<br/>[Upload.jsx]"]
  node_upload_box["Upload box<br/>[UploadBox.jsx]"]
  node_my_files["My files<br/>[MyFiles.jsx]"]
  node_file_card["File card<br/>[FileCard.jsx]"]
  node_file_row["File list row<br/>[FileListRow.jsx]"]
  node_modal["Modal<br/>[Modal.jsx]"]
  node_share_modal["Link share modal<br/>[LinkShareModal.jsx]"]
  node_public_file["Public file view<br/>[PublicFileView.jsx]"]
  node_api["API endpoints<br/>[apiEndpoints.js]"]
end

subgraph group_account["Credits and billing"]
  node_credits["User credits"]
  node_credits_display["Credits display<br/>[CreditsDisplay.jsx]"]
  node_subscription["Subscription<br/>[Subscription.jsx]"]
  node_transactions["Transactions<br/>[Transactions.jsx]"]
end

subgraph group_presentation["Product presentation"]
  node_landing["Landing page<br/>[Landing.jsx]"]
  node_landing_sections["Landing sections"]
end

node_user(("Visitor or user"))
node_backend["CloudShare API"]
node_razorpay["Razorpay checkout"]

node_user -->|"visits"| node_app
node_app -->|"gates routes"| node_clerk
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_upload_page
node_app -->|"routes to"| node_my_files
node_app -->|"routes to"| node_public_file
node_app -->|"routes to"| node_subscription
node_app -->|"routes to"| node_transactions
node_app -->|"provides"| node_credits
node_user -->|"browses"| node_landing
node_landing -->|"renders"| node_landing_sections
node_dashboard -->|"renders within"| node_layout
node_dashboard -->|"renders"| node_dashboard_upload
node_dashboard -->|"renders"| node_recent_files
node_dashboard -->|"fetches and uploads"| node_api
node_upload_page -->|"renders within"| node_layout
node_upload_page -->|"renders"| node_upload_box
node_upload_page -->|"uploads files"| node_api
node_my_files -->|"renders within"| node_layout
node_my_files -->|"manages files"| node_api
node_my_files -->|"renders"| node_file_card
node_my_files -->|"renders"| node_file_row
node_my_files -->|"opens"| node_share_modal
node_my_files -->|"uses dialogs"| node_modal
node_public_file -->|"fetches and downloads"| node_api
node_public_file -->|"renders"| node_share_modal
node_api -->|"defines endpoints"| node_backend
node_layout -->|"renders"| node_navbar
node_layout -->|"renders"| node_side_menu
node_credits -->|"fetches credits"| node_api
node_navbar -->|"renders"| node_credits_display
node_subscription -->|"renders within"| node_layout
node_subscription -->|"reads and updates"| node_credits
node_subscription -->|"creates and verifies orders"| node_api
node_subscription -->|"opens checkout"| node_razorpay
node_transactions -->|"renders within"| node_layout
node_transactions -->|"fetches transactions"| node_api

click node_app "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/App.jsx"
click node_dashboard "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Dashboard.jsx"
click node_dashboard_upload "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/DashboardUpload.jsx"
click node_recent_files "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/RecentFiles.jsx"
click node_upload_page "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Upload.jsx"
click node_upload_box "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/UploadBox.jsx"
click node_my_files "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/MyFiles.jsx"
click node_file_card "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/FileCard.jsx"
click node_file_row "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/FileListRow.jsx"
click node_modal "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/Modal.jsx"
click node_share_modal "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/LinkShareModal.jsx"
click node_public_file "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/PublicFileView.jsx"
click node_api "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/util/apiEndpoints.js"
click node_layout "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/layout/DashboardLayout.jsx"
click node_navbar "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/Navbar.jsx"
click node_side_menu "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/SideMenu.jsx"
click node_landing "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Landing.jsx"
click node_landing_sections "https://github.com/itisthenikhilsingh/cloudsharewebapp/tree/main/src/components/landing"
click node_credits "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/context/UserCreditsContext.jsx"
click node_credits_display "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/CreditsDisplay.jsx"
click node_subscription "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Subscription.jsx"
click node_transactions "https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Transactions.jsx"

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_clerk,node_layout,node_navbar,node_side_menu,node_user toneBlue
class node_dashboard,node_dashboard_upload,node_recent_files,node_upload_page,node_upload_box,node_my_files,node_file_card,node_file_row,node_modal,node_share_modal,node_public_file,node_api toneAmber
class node_credits,node_credits_display,node_subscription,node_transactions,node_backend toneMint
class node_landing,node_landing_sections toneRose
class node_razorpay toneIndigo
```

## Components

### App and access

- [App router](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/App.jsx): `src/App.jsx`
- **Clerk identity**
- [Dashboard layout](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/layout/DashboardLayout.jsx): `src/layout/DashboardLayout.jsx`
- [Navbar](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Side menu](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/SideMenu.jsx): `src/components/SideMenu.jsx`

### File workflows

- [Dashboard](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Dashboard upload](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/DashboardUpload.jsx): `src/components/DashboardUpload.jsx`
- [Recent files](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/RecentFiles.jsx): `src/components/RecentFiles.jsx`
- [Upload page](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Upload.jsx): `src/pages/Upload.jsx`
- [Upload box](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/UploadBox.jsx): `src/components/UploadBox.jsx`
- [My files](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/MyFiles.jsx): `src/pages/MyFiles.jsx`
- [File card](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/FileCard.jsx): `src/components/FileCard.jsx`
- [File list row](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/FileListRow.jsx): `src/components/FileListRow.jsx`
- [Modal](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/Modal.jsx): `src/components/Modal.jsx`
- [Link share modal](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/LinkShareModal.jsx): `src/components/LinkShareModal.jsx`
- [Public file view](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/PublicFileView.jsx): `src/pages/PublicFileView.jsx`
- [API endpoints](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/util/apiEndpoints.js): `src/util/apiEndpoints.js`

### Credits and billing

- [User credits](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/context/UserCreditsContext.jsx): `src/context/UserCreditsContext.jsx`
- [Credits display](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/components/CreditsDisplay.jsx): `src/components/CreditsDisplay.jsx`
- [Subscription](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Subscription.jsx): `src/pages/Subscription.jsx`
- [Transactions](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Transactions.jsx): `src/pages/Transactions.jsx`

### Product presentation

- [Landing page](https://github.com/itisthenikhilsingh/cloudsharewebapp/blob/main/src/pages/Landing.jsx): `src/pages/Landing.jsx`
- [Landing sections](https://github.com/itisthenikhilsingh/cloudsharewebapp/tree/main/src/components/landing): `src/components/landing`

### Other components

- **Visitor or user**
- **CloudShare API**
- **Razorpay checkout**

## Connections

- Visitor or user → App router: visits (evidence: `src/App.jsx`)
- App router → Clerk identity: gates routes (evidence: `src/App.jsx`)
- App router → Dashboard: routes to (evidence: `src/App.jsx`)
- App router → Upload page: routes to (evidence: `src/App.jsx`)
- App router → My files: routes to (evidence: `src/App.jsx`)
- App router → Public file view: routes to (evidence: `src/App.jsx`)
- App router → Subscription: routes to (evidence: `src/App.jsx`)
- App router → Transactions: routes to (evidence: `src/App.jsx`)
- App router → User credits: provides (evidence: `src/App.jsx`)
- Visitor or user → Landing page: browses
- Landing page → Landing sections: renders (evidence: `src/pages/Landing.jsx`)
- Dashboard → Dashboard layout: renders within (evidence: `src/pages/Dashboard.jsx`)
- Dashboard → Dashboard upload: renders (evidence: `src/pages/Dashboard.jsx`)
- Dashboard → Recent files: renders (evidence: `src/pages/Dashboard.jsx`)
- Dashboard → API endpoints: fetches and uploads (evidence: `src/pages/Dashboard.jsx`)
- Upload page → Dashboard layout: renders within (evidence: `src/pages/Upload.jsx`)
- Upload page → Upload box: renders (evidence: `src/pages/Upload.jsx`)
- Upload page → API endpoints: uploads files (evidence: `src/pages/Upload.jsx`)
- My files → Dashboard layout: renders within (evidence: `src/pages/MyFiles.jsx`)
- My files → API endpoints: manages files (evidence: `src/pages/MyFiles.jsx`)
- My files → File card: renders (evidence: `src/pages/MyFiles.jsx`)
- My files → File list row: renders (evidence: `src/pages/MyFiles.jsx`)
- My files → Link share modal: opens (evidence: `src/pages/MyFiles.jsx`)
- My files → Modal: uses dialogs (evidence: `src/pages/MyFiles.jsx`)
- Public file view → API endpoints: fetches and downloads (evidence: `src/pages/PublicFileView.jsx`)
- Public file view → Link share modal: renders (evidence: `src/pages/PublicFileView.jsx`)
- API endpoints → CloudShare API: defines endpoints (evidence: `src/util/apiEndpoints.js`)
- Dashboard layout → Navbar: renders (evidence: `src/layout/DashboardLayout.jsx`)
- Dashboard layout → Side menu: renders (evidence: `src/layout/DashboardLayout.jsx`)
- User credits → API endpoints: fetches credits (evidence: `src/context/UserCreditsContext.jsx`)
- Navbar → Credits display: renders (evidence: `src/components/Navbar.jsx`)
- Subscription → Dashboard layout: renders within (evidence: `src/pages/Subscription.jsx`)
- Subscription → User credits: reads and updates (evidence: `src/pages/Subscription.jsx`)
- Subscription → API endpoints: creates and verifies orders (evidence: `src/pages/Subscription.jsx`)
- Subscription → Razorpay checkout: opens checkout (evidence: `src/pages/Subscription.jsx`)
- Transactions → Dashboard layout: renders within (evidence: `src/pages/Transactions.jsx`)
- Transactions → API endpoints: fetches transactions (evidence: `src/pages/Transactions.jsx`)
