# yanphayu/01-e-com architecture

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

- Interactive diagram: https://gitdiagram.com/yanphayu/01-e-com
- Repository: https://github.com/yanphayu/01-e-com

## Overview

This is a marketplace application: users browse and search listings, create products, manage accounts, and communicate through real-time chat; administrators manage marketplace content and analytics. The graph separates the Vue client, Laravel API/domain services, identity, messaging, and administration. Source evidence supports the product, search, authentication, and chat relationships shown; most frontend view-to-service wiring and several backend controller internals were not sampled, so those connections are omitted rather than inferred.

Main entry points: [`backend/routes/api.php`](https://github.com/yanphayu/01-e-com/blob/main/backend/routes/api.php) (API route dispatch), [`backend/app/Http/Controllers/ChatController.php`](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/ChatController.php) (Conversation operations), [`backend/app/Http/Controllers/SearchController.php`](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/SearchController.php) (Marketplace search), [`backend/app/Http/Controllers/AuthController.php`](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/AuthController.php) (Account workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Marketplace client"]
  node_app["Vue application shell<br/>[App.vue]"]
  node_navbar["Navigation<br/>[Navbar.vue]"]
  node_searchview["Search view<br/>[SearchView.vue]"]
  node_authlayout["Authentication UI<br/>[AuthLayout.vue]"]
end

subgraph group_commerce["Marketplace domain"]
  node_api["API route dispatch<br/>[api.php]"]
  node_products["Product lifecycle"]
  node_productdata[("Product records<br/>[Product.php]")]
  node_search["Marketplace search"]
  node_catalog[("Catalog taxonomy<br/>[Category.php]")]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Account workflows<br/>[AuthController.php]"]
  node_users[("User accounts<br/>[User.php]")]
  node_otp[("Verification codes<br/>[Otp.php]")]
end

subgraph group_messaging["Chat and notifications"]
  node_chat["Conversation operations<br/>[ChatController.php]"]
  node_conversations[("Conversations<br/>[Conversation.php]")]
  node_messages[("Messages<br/>[Message.php]")]
  node_broadcast["Chat events"]
end

subgraph group_admin["Administration"]
  node_admin["Admin dashboard analytics"]
  node_adminproducts["Admin product management"]
end

node_shopper(("Marketplace user"))

node_app -->|"renders"| node_navbar
node_app -.->|"serves"| node_shopper
node_shopper -.->|"searches"| node_searchview
node_searchview -->|"requests results"| node_search
node_shopper -.->|"uses marketplace"| node_api
node_api -->|"routes product requests"| node_products
node_api -->|"routes search requests"| node_search
node_products -->|"creates and updates"| node_productdata
node_search -->|"queries listings"| node_productdata
node_search -->|"queries categories"| node_catalog
node_api -->|"routes account requests"| node_auth
node_authlayout -.->|"collects credentials"| node_shopper
node_auth -->|"authenticates accounts"| node_users
node_auth -->|"issues verification codes"| node_otp
node_api -->|"routes chat requests"| node_chat
node_chat -->|"manages conversations"| node_conversations
node_chat -->|"stores and updates"| node_messages
node_chat -->|"broadcasts messages"| node_broadcast
node_messages -->|"belongs to"| node_conversations
node_api -.->|"routes admin requests"| node_adminproducts
node_admin -->|"reports listing data"| node_productdata

click node_app "https://github.com/yanphayu/01-e-com/blob/main/frontend/src/App.vue"
click node_navbar "https://github.com/yanphayu/01-e-com/blob/main/frontend/src/components/Navbar.vue"
click node_searchview "https://github.com/yanphayu/01-e-com/blob/main/frontend/src/views/SearchView.vue"
click node_authlayout "https://github.com/yanphayu/01-e-com/blob/main/frontend/src/components/AuthLayout.vue"
click node_api "https://github.com/yanphayu/01-e-com/blob/main/backend/routes/api.php"
click node_products "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/ProductController.php"
click node_productdata "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Product.php"
click node_search "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/SearchController.php"
click node_catalog "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Category.php"
click node_auth "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/AuthController.php"
click node_users "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/User.php"
click node_otp "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Otp.php"
click node_chat "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/ChatController.php"
click node_conversations "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Conversation.php"
click node_messages "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Message.php"
click node_broadcast "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Events/NewMessageEvent.php"
click node_admin "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/Admin/DashboardController.php"
click node_adminproducts "https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/Admin/ProductController.php"

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_navbar,node_searchview,node_authlayout,node_shopper toneBlue
class node_api,node_products,node_productdata,node_search,node_catalog toneAmber
class node_auth,node_users,node_otp toneMint
class node_chat,node_conversations,node_messages,node_broadcast toneRose
class node_admin,node_adminproducts toneIndigo
```

## Components

### Marketplace client

- [Vue application shell](https://github.com/yanphayu/01-e-com/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Navigation](https://github.com/yanphayu/01-e-com/blob/main/frontend/src/components/Navbar.vue): `frontend/src/components/Navbar.vue`
- [Search view](https://github.com/yanphayu/01-e-com/blob/main/frontend/src/views/SearchView.vue): `frontend/src/views/SearchView.vue`
- [Authentication UI](https://github.com/yanphayu/01-e-com/blob/main/frontend/src/components/AuthLayout.vue): `frontend/src/components/AuthLayout.vue`

### Marketplace domain

- [API route dispatch](https://github.com/yanphayu/01-e-com/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Product lifecycle](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/ProductController.php): `backend/app/Http/Controllers/ProductController.php`
- [Product records](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Product.php): `backend/app/Models/Product.php`
- [Marketplace search](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/SearchController.php): `backend/app/Http/Controllers/SearchController.php`
- [Catalog taxonomy](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Category.php): `backend/app/Models/Category.php`

### Identity and accounts

- [Account workflows](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/AuthController.php): `backend/app/Http/Controllers/AuthController.php`
- [User accounts](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`
- [Verification codes](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Otp.php): `backend/app/Models/Otp.php`

### Chat and notifications

- [Conversation operations](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/ChatController.php): `backend/app/Http/Controllers/ChatController.php`
- [Conversations](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Conversation.php): `backend/app/Models/Conversation.php`
- [Messages](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Models/Message.php): `backend/app/Models/Message.php`
- [Chat events](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Events/NewMessageEvent.php): `backend/app/Events/NewMessageEvent.php`

### Administration

- [Admin dashboard analytics](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/Admin/DashboardController.php): `backend/app/Http/Controllers/Admin/DashboardController.php`
- [Admin product management](https://github.com/yanphayu/01-e-com/blob/main/backend/app/Http/Controllers/Admin/ProductController.php): `backend/app/Http/Controllers/Admin/ProductController.php`

### Other components

- **Marketplace user**

## Connections

- Vue application shell → Navigation: renders (evidence: `frontend/src/App.vue`)
- Vue application shell → Marketplace user: serves
- Marketplace user → Search view: searches
- Search view → Marketplace search: requests results (evidence: `frontend/src/views/SearchView.vue`)
- Marketplace user → API route dispatch: uses marketplace
- API route dispatch → Product lifecycle: routes product requests (evidence: `backend/routes/api.php`)
- API route dispatch → Marketplace search: routes search requests (evidence: `backend/routes/api.php`)
- Product lifecycle → Product records: creates and updates (evidence: `backend/app/Http/Controllers/ProductController.php`)
- Marketplace search → Product records: queries listings (evidence: `backend/app/Http/Controllers/SearchController.php`)
- Marketplace search → Catalog taxonomy: queries categories (evidence: `backend/app/Http/Controllers/SearchController.php`)
- API route dispatch → Account workflows: routes account requests (evidence: `backend/routes/api.php`)
- Authentication UI → Marketplace user: collects credentials
- Account workflows → User accounts: authenticates accounts (evidence: `backend/app/Http/Controllers/AuthController.php`)
- Account workflows → Verification codes: issues verification codes (evidence: `backend/app/Http/Controllers/AuthController.php`)
- API route dispatch → Conversation operations: routes chat requests (evidence: `backend/routes/api.php`)
- Conversation operations → Conversations: manages conversations (evidence: `backend/app/Http/Controllers/ChatController.php`)
- Conversation operations → Messages: stores and updates (evidence: `backend/app/Http/Controllers/ChatController.php`)
- Conversation operations → Chat events: broadcasts messages (evidence: `backend/app/Http/Controllers/ChatController.php`)
- Messages → Conversations: belongs to (evidence: `backend/app/Models/Message.php`)
- API route dispatch → Admin product management: routes admin requests
- Admin dashboard analytics → Product records: reports listing data (evidence: `backend/app/Http/Controllers/Admin/DashboardController.php`)
