# dxxdev/dily architecture

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

- Interactive diagram: https://gitdiagram.com/dxxdev/dily
- Repository: https://github.com/dxxdev/dily

## Overview

Dily.uz combines an electronics storefront and admin panel with a service-provider marketplace. The primary shop journey routes users into a static product catalog, where they can search, filter, browse categories, and open product details. Separately, customers can find providers and submit service requests, while providers and admins have role-protected routes. The README describes a MongoDB backend; sampled server code confirms a product API, while the sampled client catalog uses static data. Marketplace persistence uses Supabase. Some page internals were not sampled, so uncertain connections are omitted.

Main entry points: [`client/src/App.jsx`](https://github.com/dxxdev/dily/blob/main/client/src/App.jsx) (Route application), [`client/src/layouts/AdminLayout.jsx`](https://github.com/dxxdev/dily/blob/main/client/src/layouts/AdminLayout.jsx) (Admin panel), [`server/index.js`](https://github.com/dxxdev/dily/blob/main/server/index.js) (Express server), [`client/src/context/AuthContext.jsx`](https://github.com/dxxdev/dily/blob/main/client/src/context/AuthContext.jsx) (Auth context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Route application<br/>[App.jsx]"]
  node_mainlayout["Store layout<br/>[MainLayout.jsx]"]
  node_home["Home storefront<br/>[Home.jsx]"]
  node_catalog["Category listings"]
  node_originalcatalog["Subcategory listings"]
  node_productdetail["Product details<br/>[ProductDetail.jsx]"]
  node_search["Search and filters<br/>[Searched.jsx]"]
  node_searchfn["Product search"]
  node_catalogdata["Static catalog<br/>[data.js]"]
  node_saved["Saved products<br/>[Save.jsx]"]
  node_servicelist["Repair services<br/>[ServisesPage.jsx]"]
  node_repairdetail["Repair details"]
end

subgraph group_marketplace["Service marketplace"]
  node_findprovider["Find provider<br/>[FindProvider.jsx]"]
  node_requestmodal["Service request"]
  node_myrequests["Customer requests<br/>[MyRequests.jsx]"]
  node_providerregister["Provider registration"]
  node_providerpending["Provider review status"]
  node_providerrequests["Incoming requests"]
  node_reviewmodal["Provider review"]
  node_regions["Active regions"]
end

subgraph group_identity["Identity and access"]
  node_auth["Auth context<br/>[AuthContext.jsx]"]
  node_protected["Role guard<br/>[ProtectedRoute.jsx]"]
  node_admin["Admin panel<br/>[AdminLayout.jsx]"]
  node_adminproducts["Product management<br/>[AdminProducts.jsx]"]
  node_adminproviders["Provider approvals"]
end

subgraph group_backend["Product backend"]
  node_server["Express server<br/>[index.js]"]
  node_productapi["Product API<br/>[products.js]"]
  node_mongodb[("MongoDB")]
end

node_shopper(("Shopper"))
node_supabase[("Supabase")]
node_apiuser(("API client"))

node_shopper -->|"navigates"| node_app
node_app -->|"routes storefront"| node_mainlayout
node_app -->|"routes home"| node_home
node_app -->|"routes category"| node_catalog
node_app -->|"routes subcategory"| node_originalcatalog
node_app -->|"routes product"| node_productdetail
node_app -->|"routes search"| node_search
node_app -->|"routes saved"| node_saved
node_app -->|"routes repairs"| node_servicelist
node_app -->|"routes repair"| node_repairdetail
node_app -->|"routes providers"| node_findprovider
node_app -->|"guards customer route"| node_myrequests
node_app -->|"guards provider route"| node_providerregister
node_app -->|"guards status route"| node_providerpending
node_app -->|"guards provider requests"| node_providerrequests
node_app -->|"guards admin route"| node_admin
node_app -->|"uses auth provider"| node_auth
node_search -->|"searches catalog"| node_searchfn
node_searchfn -->|"filters products"| node_catalogdata
node_requestmodal -->|"inserts requests"| node_supabase
node_reviewmodal -->|"inserts reviews"| node_supabase
node_regions -->|"reads active regions"| node_supabase
node_auth -->|"auth and profile reads"| node_supabase
node_app -->|"renders route guard"| node_protected
node_protected -->|"checks identity"| node_auth
node_admin -->|"renders products"| node_adminproducts
node_admin -->|"renders approvals"| node_adminproviders
node_apiuser -->|"sends HTTP requests"| node_server
node_server -->|"mounts product routes"| node_productapi
node_server -->|"connects database"| node_mongodb
node_productapi -->|"reads and writes products"| node_mongodb

click node_app "https://github.com/dxxdev/dily/blob/main/client/src/App.jsx"
click node_mainlayout "https://github.com/dxxdev/dily/blob/main/client/src/layouts/MainLayout.jsx"
click node_home "https://github.com/dxxdev/dily/blob/main/client/src/pages/Home.jsx"
click node_catalog "https://github.com/dxxdev/dily/blob/main/client/src/pages/CategoryProducts.jsx"
click node_originalcatalog "https://github.com/dxxdev/dily/blob/main/client/src/pages/OriginalCategoryProducts.jsx"
click node_productdetail "https://github.com/dxxdev/dily/blob/main/client/src/pages/ProductDetail.jsx"
click node_search "https://github.com/dxxdev/dily/blob/main/client/src/pages/Searched.jsx"
click node_searchfn "https://github.com/dxxdev/dily/blob/main/client/src/functions/searchedProducts.js"
click node_catalogdata "https://github.com/dxxdev/dily/blob/main/client/src/data/data.js"
click node_saved "https://github.com/dxxdev/dily/blob/main/client/src/pages/Save.jsx"
click node_servicelist "https://github.com/dxxdev/dily/blob/main/client/src/pages/ServisesPage.jsx"
click node_repairdetail "https://github.com/dxxdev/dily/blob/main/client/src/pages/ServisesRepairDetail.jsx"
click node_findprovider "https://github.com/dxxdev/dily/blob/main/client/src/pages/FindProvider.jsx"
click node_requestmodal "https://github.com/dxxdev/dily/blob/main/client/src/components/RequestServiceModal.jsx"
click node_myrequests "https://github.com/dxxdev/dily/blob/main/client/src/pages/MyRequests.jsx"
click node_providerregister "https://github.com/dxxdev/dily/blob/main/client/src/pages/ProviderRegister.jsx"
click node_providerpending "https://github.com/dxxdev/dily/blob/main/client/src/pages/ProviderPending.jsx"
click node_providerrequests "https://github.com/dxxdev/dily/blob/main/client/src/pages/provider/IncomingRequests.jsx"
click node_reviewmodal "https://github.com/dxxdev/dily/blob/main/client/src/components/LeaveReviewModal.jsx"
click node_regions "https://github.com/dxxdev/dily/blob/main/client/src/hooks/useActiveRegions.js"
click node_auth "https://github.com/dxxdev/dily/blob/main/client/src/context/AuthContext.jsx"
click node_protected "https://github.com/dxxdev/dily/blob/main/client/src/components/ProtectedRoute.jsx"
click node_admin "https://github.com/dxxdev/dily/blob/main/client/src/layouts/AdminLayout.jsx"
click node_adminproducts "https://github.com/dxxdev/dily/blob/main/client/src/pages/admin/AdminProducts.jsx"
click node_adminproviders "https://github.com/dxxdev/dily/blob/main/client/src/pages/admin/PendingProviders.jsx"
click node_server "https://github.com/dxxdev/dily/blob/main/server/index.js"
click node_productapi "https://github.com/dxxdev/dily/blob/main/server/routes/products.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,node_mainlayout,node_home,node_catalog,node_originalcatalog,node_productdetail,node_search,node_searchfn,node_catalogdata,node_saved,node_servicelist,node_repairdetail,node_apiuser toneBlue
class node_findprovider,node_requestmodal,node_myrequests,node_providerregister,node_providerpending,node_providerrequests,node_reviewmodal,node_regions,node_supabase toneAmber
class node_auth,node_protected,node_admin,node_adminproducts,node_adminproviders toneMint
class node_server,node_productapi,node_mongodb toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Route application](https://github.com/dxxdev/dily/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Store layout](https://github.com/dxxdev/dily/blob/main/client/src/layouts/MainLayout.jsx): `client/src/layouts/MainLayout.jsx`
- [Home storefront](https://github.com/dxxdev/dily/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Category listings](https://github.com/dxxdev/dily/blob/main/client/src/pages/CategoryProducts.jsx): `client/src/pages/CategoryProducts.jsx`
- [Subcategory listings](https://github.com/dxxdev/dily/blob/main/client/src/pages/OriginalCategoryProducts.jsx): `client/src/pages/OriginalCategoryProducts.jsx`
- [Product details](https://github.com/dxxdev/dily/blob/main/client/src/pages/ProductDetail.jsx): `client/src/pages/ProductDetail.jsx`
- [Search and filters](https://github.com/dxxdev/dily/blob/main/client/src/pages/Searched.jsx): `client/src/pages/Searched.jsx`
- [Product search](https://github.com/dxxdev/dily/blob/main/client/src/functions/searchedProducts.js): `client/src/functions/searchedProducts.js`
- [Static catalog](https://github.com/dxxdev/dily/blob/main/client/src/data/data.js): `client/src/data/data.js`
- [Saved products](https://github.com/dxxdev/dily/blob/main/client/src/pages/Save.jsx): `client/src/pages/Save.jsx`
- [Repair services](https://github.com/dxxdev/dily/blob/main/client/src/pages/ServisesPage.jsx): `client/src/pages/ServisesPage.jsx`
- [Repair details](https://github.com/dxxdev/dily/blob/main/client/src/pages/ServisesRepairDetail.jsx): `client/src/pages/ServisesRepairDetail.jsx`

### Service marketplace

- [Find provider](https://github.com/dxxdev/dily/blob/main/client/src/pages/FindProvider.jsx): `client/src/pages/FindProvider.jsx`
- [Service request](https://github.com/dxxdev/dily/blob/main/client/src/components/RequestServiceModal.jsx): `client/src/components/RequestServiceModal.jsx`
- [Customer requests](https://github.com/dxxdev/dily/blob/main/client/src/pages/MyRequests.jsx): `client/src/pages/MyRequests.jsx`
- [Provider registration](https://github.com/dxxdev/dily/blob/main/client/src/pages/ProviderRegister.jsx): `client/src/pages/ProviderRegister.jsx`
- [Provider review status](https://github.com/dxxdev/dily/blob/main/client/src/pages/ProviderPending.jsx): `client/src/pages/ProviderPending.jsx`
- [Incoming requests](https://github.com/dxxdev/dily/blob/main/client/src/pages/provider/IncomingRequests.jsx): `client/src/pages/provider/IncomingRequests.jsx`
- [Provider review](https://github.com/dxxdev/dily/blob/main/client/src/components/LeaveReviewModal.jsx): `client/src/components/LeaveReviewModal.jsx`
- [Active regions](https://github.com/dxxdev/dily/blob/main/client/src/hooks/useActiveRegions.js): `client/src/hooks/useActiveRegions.js`

### Identity and access

- [Auth context](https://github.com/dxxdev/dily/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Role guard](https://github.com/dxxdev/dily/blob/main/client/src/components/ProtectedRoute.jsx): `client/src/components/ProtectedRoute.jsx`
- [Admin panel](https://github.com/dxxdev/dily/blob/main/client/src/layouts/AdminLayout.jsx): `client/src/layouts/AdminLayout.jsx`
- [Product management](https://github.com/dxxdev/dily/blob/main/client/src/pages/admin/AdminProducts.jsx): `client/src/pages/admin/AdminProducts.jsx`
- [Provider approvals](https://github.com/dxxdev/dily/blob/main/client/src/pages/admin/PendingProviders.jsx): `client/src/pages/admin/PendingProviders.jsx`

### Product backend

- [Express server](https://github.com/dxxdev/dily/blob/main/server/index.js): `server/index.js`
- [Product API](https://github.com/dxxdev/dily/blob/main/server/routes/products.js): `server/routes/products.js`
- **MongoDB**

### Other components

- **Shopper**
- **Supabase**
- **API client**

## Connections

- Shopper → Route application: navigates
- Route application → Store layout: routes storefront
- Route application → Home storefront: routes home
- Route application → Category listings: routes category
- Route application → Subcategory listings: routes subcategory
- Route application → Product details: routes product
- Route application → Search and filters: routes search
- Route application → Saved products: routes saved
- Route application → Repair services: routes repairs
- Route application → Repair details: routes repair
- Route application → Find provider: routes providers
- Route application → Customer requests: guards customer route
- Route application → Provider registration: guards provider route
- Route application → Provider review status: guards status route
- Route application → Incoming requests: guards provider requests
- Route application → Admin panel: guards admin route
- Route application → Auth context: uses auth provider
- Search and filters → Product search: searches catalog
- Product search → Static catalog: filters products
- Service request → Supabase: inserts requests
- Provider review → Supabase: inserts reviews
- Active regions → Supabase: reads active regions
- Auth context → Supabase: auth and profile reads
- Route application → Role guard: renders route guard
- Role guard → Auth context: checks identity
- Admin panel → Product management: renders products
- Admin panel → Provider approvals: renders approvals
- API client → Express server: sends HTTP requests
- Express server → Product API: mounts product routes
- Express server → MongoDB: connects database
- Product API → MongoDB: reads and writes products
