# majhimohit/art_gallery_new architecture

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

- Interactive diagram: https://gitdiagram.com/majhimohit/art_gallery_new
- Repository: https://github.com/majhimohit/art_gallery_new

## Overview

This is a React virtual art gallery: visitors browse artwork and exhibitions, inspect pieces, and use accounts for wishlists and purchases; artists, curators, and administrators have separate dashboards. App.jsx provides the route entry point and applies authentication/role guards to protected pages. The graph preserves the main discovery, account, and role-specific areas, along with the API client and mock-data layer. Some page implementations were not excerpted, so their internal calls and data flows are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/majhimohit/art_gallery_new/blob/main/src/App.jsx) (Routes and shell), [`src/data/mockData.jsx`](https://github.com/majhimohit/art_gallery_new/blob/main/src/data/mockData.jsx) (Gallery mock data), [`src/context/AuthContext.jsx`](https://github.com/majhimohit/art_gallery_new/blob/main/src/context/AuthContext.jsx) (Auth state), [`src/services/api.js`](https://github.com/majhimohit/art_gallery_new/blob/main/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Gallery experience"]
  node_app["Routes and shell<br/>[App.jsx]"]
  node_nav["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer links<br/>[Footer.jsx]"]
end

subgraph group_identity["Accounts and access"]
  node_guard["Role guard<br/>[ProtectedRoute.jsx]"]
  node_auth["Auth state<br/>[AuthContext.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_verify["Email verification<br/>[VerifyEmail.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_discovery["Art discovery"]
  node_home["Gallery home<br/>[Home.jsx]"]
  node_gallery["Artwork gallery<br/>[Gallery.jsx]"]
  node_card["Artwork card<br/>[ArtworkCard.jsx]"]
  node_details["Artwork details<br/>[ArtworkDetails.jsx]"]
  node_exhibitions["Exhibitions<br/>[Exhibitions.jsx]"]
  node_tour["Virtual tour<br/>[VirtualTour.jsx]"]
  node_mock["Gallery mock data<br/>[mockData.jsx]"]
end

subgraph group_commerce["Visitor activity"]
  node_wishlist["Wishlist<br/>[Wishlist.jsx]"]
  node_purchases["Purchases<br/>[Purchases.jsx]"]
  node_visitor_dash["Visitor dashboard"]
end

subgraph group_management["Gallery management"]
  node_artist["Artist dashboard"]
  node_add_art["Add artwork<br/>[AddArtwork.jsx]"]
  node_edit_art["Edit artwork<br/>[EditArtwork.jsx]"]
  node_curator["Curator dashboard"]
  node_admin["Admin dashboard<br/>[AdminDashboard.jsx]"]
end

node_visitor(("Gallery visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_footer
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_exhibitions
node_app -->|"protects routes"| node_guard
node_app -->|"routes to"| node_wishlist
node_app -->|"routes to"| node_purchases
node_app -->|"routes to"| node_add_art
node_app -->|"routes to"| node_edit_art
node_app -->|"routes to"| node_curator
node_app -->|"routes to"| node_visitor_dash
node_app -->|"routes to"| node_artist
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_tour
node_guard -->|"checks roles"| node_auth
node_login -->|"uses auth"| node_auth
node_register -->|"calls API"| node_api
node_verify -->|"calls API"| node_api
node_auth -->|"calls API"| node_api
node_card -->|"uses auth"| node_auth
node_card -->|"deletes artwork"| node_api
node_admin -->|"loads users"| node_api
node_artist -.->|"references data"| node_mock
node_home -.->|"references data"| node_mock
node_gallery -.->|"references data"| node_mock
node_details -.->|"references data"| node_mock
node_exhibitions -.->|"references data"| node_mock
node_tour -.->|"references data"| node_mock
node_visitor_dash -.->|"references data"| node_mock
node_wishlist -.->|"references data"| node_mock

click node_app "https://github.com/majhimohit/art_gallery_new/blob/main/src/App.jsx"
click node_nav "https://github.com/majhimohit/art_gallery_new/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/majhimohit/art_gallery_new/blob/main/src/components/Footer.jsx"
click node_guard "https://github.com/majhimohit/art_gallery_new/blob/main/src/components/ProtectedRoute.jsx"
click node_auth "https://github.com/majhimohit/art_gallery_new/blob/main/src/context/AuthContext.jsx"
click node_login "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Login.jsx"
click node_register "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Register.jsx"
click node_verify "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VerifyEmail.jsx"
click node_api "https://github.com/majhimohit/art_gallery_new/blob/main/src/services/api.js"
click node_home "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Home.jsx"
click node_gallery "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Gallery.jsx"
click node_card "https://github.com/majhimohit/art_gallery_new/blob/main/src/components/ArtworkCard.jsx"
click node_details "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/ArtworkDetails.jsx"
click node_exhibitions "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Exhibitions.jsx"
click node_tour "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VirtualTour.jsx"
click node_mock "https://github.com/majhimohit/art_gallery_new/blob/main/src/data/mockData.jsx"
click node_wishlist "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Wishlist.jsx"
click node_purchases "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Purchases.jsx"
click node_visitor_dash "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VisitorDashboard.jsx"
click node_artist "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/ArtistDashboard.jsx"
click node_add_art "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/AddArtwork.jsx"
click node_edit_art "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/EditArtwork.jsx"
click node_curator "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/CuratorDashboard.jsx"
click node_admin "https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/AdminDashboard.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_nav,node_footer toneBlue
class node_guard,node_auth,node_login,node_register,node_verify,node_api toneAmber
class node_home,node_gallery,node_card,node_details,node_exhibitions,node_tour,node_mock toneMint
class node_wishlist,node_purchases,node_visitor_dash toneRose
class node_artist,node_add_art,node_edit_art,node_curator,node_admin,node_visitor toneIndigo
```

## Components

### Gallery experience

- [Routes and shell](https://github.com/majhimohit/art_gallery_new/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/majhimohit/art_gallery_new/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Footer links](https://github.com/majhimohit/art_gallery_new/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Accounts and access

- [Role guard](https://github.com/majhimohit/art_gallery_new/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`
- [Auth state](https://github.com/majhimohit/art_gallery_new/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Sign in](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Registration](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Register.jsx): `src/pages/Register.jsx`
- [Email verification](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VerifyEmail.jsx): `src/pages/VerifyEmail.jsx`
- [API client](https://github.com/majhimohit/art_gallery_new/blob/main/src/services/api.js): `src/services/api.js`

### Art discovery

- [Gallery home](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Artwork gallery](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Gallery.jsx): `src/pages/Gallery.jsx`
- [Artwork card](https://github.com/majhimohit/art_gallery_new/blob/main/src/components/ArtworkCard.jsx): `src/components/ArtworkCard.jsx`
- [Artwork details](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/ArtworkDetails.jsx): `src/pages/ArtworkDetails.jsx`
- [Exhibitions](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Exhibitions.jsx): `src/pages/Exhibitions.jsx`
- [Virtual tour](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VirtualTour.jsx): `src/pages/VirtualTour.jsx`
- [Gallery mock data](https://github.com/majhimohit/art_gallery_new/blob/main/src/data/mockData.jsx): `src/data/mockData.jsx`

### Visitor activity

- [Wishlist](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Wishlist.jsx): `src/pages/Wishlist.jsx`
- [Purchases](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/Purchases.jsx): `src/pages/Purchases.jsx`
- [Visitor dashboard](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/VisitorDashboard.jsx): `src/pages/VisitorDashboard.jsx`

### Gallery management

- [Artist dashboard](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/ArtistDashboard.jsx): `src/pages/ArtistDashboard.jsx`
- [Add artwork](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/AddArtwork.jsx): `src/pages/AddArtwork.jsx`
- [Edit artwork](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/EditArtwork.jsx): `src/pages/EditArtwork.jsx`
- [Curator dashboard](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/CuratorDashboard.jsx): `src/pages/CuratorDashboard.jsx`
- [Admin dashboard](https://github.com/majhimohit/art_gallery_new/blob/main/src/pages/AdminDashboard.jsx): `src/pages/AdminDashboard.jsx`

### Other components

- **Gallery visitor**

## Connections

- Gallery visitor → Routes and shell: opens
- Routes and shell → Auth state: provides auth (evidence: `src/App.jsx`)
- Routes and shell → Navigation: renders (evidence: `src/App.jsx`)
- Routes and shell → Footer links: renders (evidence: `src/App.jsx`)
- Routes and shell → Gallery home: routes to (evidence: `src/App.jsx`)
- Routes and shell → Artwork gallery: routes to (evidence: `src/App.jsx`)
- Routes and shell → Artwork details: routes to (evidence: `src/App.jsx`)
- Routes and shell → Exhibitions: routes to (evidence: `src/App.jsx`)
- Routes and shell → Role guard: protects routes (evidence: `src/App.jsx`)
- Routes and shell → Wishlist: routes to (evidence: `src/App.jsx`)
- Routes and shell → Purchases: routes to (evidence: `src/App.jsx`)
- Routes and shell → Add artwork: routes to (evidence: `src/App.jsx`)
- Routes and shell → Edit artwork: routes to (evidence: `src/App.jsx`)
- Routes and shell → Curator dashboard: routes to (evidence: `src/App.jsx`)
- Routes and shell → Visitor dashboard: routes to (evidence: `src/App.jsx`)
- Routes and shell → Artist dashboard: routes to (evidence: `src/App.jsx`)
- Routes and shell → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Routes and shell → Virtual tour: routes to (evidence: `src/App.jsx`)
- Role guard → Auth state: checks roles (evidence: `src/components/ProtectedRoute.jsx`)
- Sign in → Auth state: uses auth (evidence: `src/pages/Login.jsx`)
- Registration → API client: calls API (evidence: `src/pages/Register.jsx`)
- Email verification → API client: calls API (evidence: `src/pages/VerifyEmail.jsx`)
- Auth state → API client: calls API (evidence: `src/context/AuthContext.jsx`)
- Artwork card → Auth state: uses auth (evidence: `src/components/ArtworkCard.jsx`)
- Artwork card → API client: deletes artwork (evidence: `src/components/ArtworkCard.jsx`)
- Admin dashboard → API client: loads users (evidence: `src/pages/AdminDashboard.jsx`)
- Artist dashboard → Gallery mock data: references data (evidence: `src/pages/ArtistDashboard.jsx`)
- Gallery home → Gallery mock data: references data (evidence: `src/pages/Home.jsx`)
- Artwork gallery → Gallery mock data: references data (evidence: `src/pages/Gallery.jsx`)
- Artwork details → Gallery mock data: references data (evidence: `src/pages/ArtworkDetails.jsx`)
- Exhibitions → Gallery mock data: references data (evidence: `src/pages/Exhibitions.jsx`)
- Virtual tour → Gallery mock data: references data (evidence: `src/pages/VirtualTour.jsx`)
- Visitor dashboard → Gallery mock data: references data (evidence: `src/pages/VisitorDashboard.jsx`)
- Wishlist → Gallery mock data: references data (evidence: `src/pages/Wishlist.jsx`)
