# elpablooficial/-twm-proyecto-compra-venta architecture

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

- Interactive diagram: https://gitdiagram.com/elpablooficial/-twm-proyecto-compra-venta
- Repository: https://github.com/elpablooficial/-twm-proyecto-compra-venta

## Overview

This is a React/Vite commerce-management application with a public storefront and seller-facing administration. Users can browse the home screen or log in, while sellers navigate inventory, services, messages, reviews, quotes, orders, reports, receipts, and transaction history. Product and service state is held in React contexts with sample data; orders are explicitly in-memory. The README describes only the starter setup, so capabilities are inferred from the routes and sampled screens. Several screen implementations were not sampled, so their internal data flows are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/App.jsx) (Routes and providers), [`src/components/templates/SellerTemplate/SellerTemplate.jsx`](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/templates/SellerTemplate/SellerTemplate.jsx) (Seller layout), [`src/pages/Services/ServicesScreen.jsx`](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Services/ServicesScreen.jsx) (Service management), [`src/components/organisms/Header/Header.jsx`](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/organisms/Header/Header.jsx) (Site header)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application shell"]
  node_app["Routes and providers<br/>[App.jsx]"]
  node_main["React bootstrap<br/>[main.jsx]"]
end

subgraph group_public["Public and account"]
  node_home["Storefront home<br/>[HomeScreen.jsx]"]
  node_login["Sign in<br/>[LoginScreen.jsx]"]
  node_register["Registration<br/>[RegisterScreen.jsx]"]
  node_auth["Mock authentication<br/>[authService.js]"]
  node_profile["Profile<br/>[ProfileScreen.jsx]"]
end

subgraph group_catalog["Catalog management"]
  node_inventory["Product inventory"]
  node_productform["Product editor"]
  node_services["Service management<br/>[ServicesScreen.jsx]"]
  node_serviceform["Service editor"]
end

subgraph group_seller["Seller operations"]
  node_messages["Message moderation"]
  node_reviews["Review management<br/>[ReviewsScreen.jsx]"]
  node_quotes["Quote list<br/>[QuotesScreen.jsx]"]
  node_quotedetail["Quote details"]
  node_orders["Order management<br/>[OrdersScreen.jsx]"]
  node_reports["Sales reports<br/>[ReportsScreen.jsx]"]
  node_receipt["Receipt view<br/>[ReceiptScreen.jsx]"]
  node_transactions["Transaction history"]
end

subgraph group_shared["Shared UI and state"]
  node_products["Product state<br/>[ProductContext.jsx]"]
  node_servicestate["Service state<br/>[ServiceContext.jsx]"]
  node_quotestate["Quote state<br/>[QuotesContext.jsx]"]
  node_sellerlayout["Seller layout<br/>[SellerTemplate.jsx]"]
  node_header["Site header<br/>[Header.jsx]"]
  node_button["Styled button<br/>[CustomButton.jsx]"]
  node_confirm["Confirmation dialog<br/>[ConfirmDialog.jsx]"]
  node_stat["Summary card<br/>[StatCard.jsx]"]
end

node_user(("Visitor or seller"))

node_user -->|"opens app"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_inventory
node_app -->|"routes to"| node_productform
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_serviceform
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_quotes
node_app -->|"routes to"| node_quotedetail
node_app -->|"routes to"| node_reviews
node_app -->|"routes to"| node_orders
node_app -->|"routes to"| node_receipt
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_transactions
node_main -->|"renders"| node_app
node_main -->|"imports"| node_auth
node_login -->|"authenticates"| node_auth
node_inventory -->|"renders"| node_sellerlayout
node_services -->|"renders"| node_sellerlayout
node_messages -->|"renders"| node_sellerlayout
node_quotes -->|"renders"| node_sellerlayout
node_orders -->|"renders"| node_sellerlayout
node_reports -->|"renders"| node_sellerlayout
node_sellerlayout -->|"renders"| node_header
node_inventory -->|"reads and updates"| node_products
node_productform -.->|"reads and updates"| node_products
node_services -->|"reads categories"| node_products
node_services -->|"reads and deletes"| node_servicestate
node_serviceform -->|"reads categories"| node_products
node_serviceform -->|"reads and updates"| node_servicestate
node_quotes -->|"uses hook"| node_quotestate
node_quotedetail -.->|"uses state"| node_quotestate
node_inventory -->|"shows summaries"| node_stat
node_services -->|"shows summaries"| node_stat
node_messages -->|"shows summaries"| node_stat
node_orders -->|"shows summaries"| node_stat
node_reports -->|"shows summaries"| node_stat
node_confirm -->|"uses"| node_button
node_home -->|"renders"| node_header
node_profile -->|"renders"| node_header
node_receipt -->|"renders"| node_header
node_transactions -->|"renders"| node_header

click node_app "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/App.jsx"
click node_home "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Home/HomeScreen.jsx"
click node_login "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Login/LoginScreen.jsx"
click node_register "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Register/RegisterScreen.jsx"
click node_auth "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/services/authService.js"
click node_inventory "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Inventory/InventoryScreen.jsx"
click node_productform "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Inventory/AddProductScreen.jsx"
click node_products "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/ProductContext.jsx"
click node_services "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Services/ServicesScreen.jsx"
click node_serviceform "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Services/ServiceFormScreen.jsx"
click node_servicestate "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/ServiceContext.jsx"
click node_messages "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/MessageModeration/MessageModerationScreen.jsx"
click node_reviews "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Reviews/ReviewsScreen.jsx"
click node_quotes "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Quotes/QuotesScreen.jsx"
click node_quotedetail "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Quotes/QuoteDetailScreen.jsx"
click node_quotestate "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/QuotesContext.jsx"
click node_orders "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Orders/OrdersScreen.jsx"
click node_reports "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Reports/ReportsScreen.jsx"
click node_receipt "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Receipt/ReceiptScreen.jsx"
click node_transactions "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/TransHistoryScreen/TransHistoryScreen.jsx"
click node_profile "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Profile/ProfileScreen.jsx"
click node_sellerlayout "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/templates/SellerTemplate/SellerTemplate.jsx"
click node_header "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/organisms/Header/Header.jsx"
click node_button "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/atoms/Button/CustomButton.jsx"
click node_confirm "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/molecules/ConfirmDialog/ConfirmDialog.jsx"
click node_stat "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/molecules/StatCard/StatCard.jsx"
click node_main "https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/main.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_main toneBlue
class node_home,node_login,node_register,node_auth,node_profile toneAmber
class node_inventory,node_productform,node_services,node_serviceform toneMint
class node_messages,node_reviews,node_quotes,node_quotedetail,node_orders,node_reports,node_receipt,node_transactions toneRose
class node_products,node_servicestate,node_quotestate,node_sellerlayout,node_header,node_button,node_confirm,node_stat,node_user toneIndigo
```

## Components

### Application shell

- [Routes and providers](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/App.jsx): `src/App.jsx`
- [React bootstrap](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/main.jsx): `src/main.jsx`

### Public and account

- [Storefront home](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Home/HomeScreen.jsx): `src/pages/Home/HomeScreen.jsx`
- [Sign in](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Login/LoginScreen.jsx): `src/pages/Login/LoginScreen.jsx`
- [Registration](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Register/RegisterScreen.jsx): `src/pages/Register/RegisterScreen.jsx`
- [Mock authentication](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/services/authService.js): `src/services/authService.js`
- [Profile](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Profile/ProfileScreen.jsx): `src/pages/Profile/ProfileScreen.jsx`

### Catalog management

- [Product inventory](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Inventory/InventoryScreen.jsx): `src/pages/Inventory/InventoryScreen.jsx`
- [Product editor](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Inventory/AddProductScreen.jsx): `src/pages/Inventory/AddProductScreen.jsx`
- [Service management](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Services/ServicesScreen.jsx): `src/pages/Services/ServicesScreen.jsx`
- [Service editor](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Services/ServiceFormScreen.jsx): `src/pages/Services/ServiceFormScreen.jsx`

### Seller operations

- [Message moderation](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/MessageModeration/MessageModerationScreen.jsx): `src/pages/MessageModeration/MessageModerationScreen.jsx`
- [Review management](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Reviews/ReviewsScreen.jsx): `src/pages/Reviews/ReviewsScreen.jsx`
- [Quote list](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Quotes/QuotesScreen.jsx): `src/pages/Quotes/QuotesScreen.jsx`
- [Quote details](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Quotes/QuoteDetailScreen.jsx): `src/pages/Quotes/QuoteDetailScreen.jsx`
- [Order management](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Orders/OrdersScreen.jsx): `src/pages/Orders/OrdersScreen.jsx`
- [Sales reports](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Reports/ReportsScreen.jsx): `src/pages/Reports/ReportsScreen.jsx`
- [Receipt view](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/Receipt/ReceiptScreen.jsx): `src/pages/Receipt/ReceiptScreen.jsx`
- [Transaction history](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/pages/TransHistoryScreen/TransHistoryScreen.jsx): `src/pages/TransHistoryScreen/TransHistoryScreen.jsx`

### Shared UI and state

- [Product state](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/ProductContext.jsx): `src/context/ProductContext.jsx`
- [Service state](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/ServiceContext.jsx): `src/context/ServiceContext.jsx`
- [Quote state](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/context/QuotesContext.jsx): `src/context/QuotesContext.jsx`
- [Seller layout](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/templates/SellerTemplate/SellerTemplate.jsx): `src/components/templates/SellerTemplate/SellerTemplate.jsx`
- [Site header](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/organisms/Header/Header.jsx): `src/components/organisms/Header/Header.jsx`
- [Styled button](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/atoms/Button/CustomButton.jsx): `src/components/atoms/Button/CustomButton.jsx`
- [Confirmation dialog](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/molecules/ConfirmDialog/ConfirmDialog.jsx): `src/components/molecules/ConfirmDialog/ConfirmDialog.jsx`
- [Summary card](https://github.com/elpablooficial/-twm-proyecto-compra-venta/blob/main/src/components/molecules/StatCard/StatCard.jsx): `src/components/molecules/StatCard/StatCard.jsx`

### Other components

- **Visitor or seller**

## Connections

- Visitor or seller → Routes and providers: opens app (evidence: `src/App.jsx`)
- Routes and providers → Storefront home: routes to (evidence: `src/App.jsx`)
- Routes and providers → Sign in: routes to (evidence: `src/App.jsx`)
- Routes and providers → Registration: routes to (evidence: `src/App.jsx`)
- Routes and providers → Product inventory: routes to (evidence: `src/App.jsx`)
- Routes and providers → Product editor: routes to (evidence: `src/App.jsx`)
- Routes and providers → Service management: routes to (evidence: `src/App.jsx`)
- Routes and providers → Service editor: routes to (evidence: `src/App.jsx`)
- Routes and providers → Message moderation: routes to (evidence: `src/App.jsx`)
- Routes and providers → Profile: routes to (evidence: `src/App.jsx`)
- Routes and providers → Quote list: routes to (evidence: `src/App.jsx`)
- Routes and providers → Quote details: routes to (evidence: `src/App.jsx`)
- Routes and providers → Review management: routes to (evidence: `src/App.jsx`)
- Routes and providers → Order management: routes to (evidence: `src/App.jsx`)
- Routes and providers → Receipt view: routes to (evidence: `src/App.jsx`)
- Routes and providers → Sales reports: routes to (evidence: `src/App.jsx`)
- Routes and providers → Transaction history: routes to (evidence: `src/App.jsx`)
- React bootstrap → Routes and providers: renders (evidence: `src/main.jsx`)
- React bootstrap → Mock authentication: imports (evidence: `src/main.jsx`)
- Sign in → Mock authentication: authenticates (evidence: `src/pages/Login/LoginScreen.jsx`)
- Product inventory → Seller layout: renders (evidence: `src/pages/Inventory/InventoryScreen.jsx`)
- Service management → Seller layout: renders (evidence: `src/pages/Services/ServicesScreen.jsx`)
- Message moderation → Seller layout: renders (evidence: `src/pages/MessageModeration/MessageModerationScreen.jsx`)
- Quote list → Seller layout: renders (evidence: `src/pages/Quotes/QuotesScreen.jsx`)
- Order management → Seller layout: renders (evidence: `src/pages/Orders/OrdersScreen.jsx`)
- Sales reports → Seller layout: renders (evidence: `src/pages/Reports/ReportsScreen.jsx`)
- Seller layout → Site header: renders (evidence: `src/components/templates/SellerTemplate/SellerTemplate.jsx`)
- Product inventory → Product state: reads and updates (evidence: `src/pages/Inventory/InventoryScreen.jsx`)
- Product editor → Product state: reads and updates
- Service management → Product state: reads categories (evidence: `src/pages/Services/ServicesScreen.jsx`)
- Service management → Service state: reads and deletes (evidence: `src/pages/Services/ServicesScreen.jsx`)
- Service editor → Product state: reads categories (evidence: `src/pages/Services/ServiceFormScreen.jsx`)
- Service editor → Service state: reads and updates (evidence: `src/pages/Services/ServiceFormScreen.jsx`)
- Quote list → Quote state: uses hook (evidence: `src/pages/Quotes/QuotesScreen.jsx`)
- Quote details → Quote state: uses state
- Product inventory → Summary card: shows summaries (evidence: `src/pages/Inventory/InventoryScreen.jsx`)
- Service management → Summary card: shows summaries (evidence: `src/pages/Services/ServicesScreen.jsx`)
- Message moderation → Summary card: shows summaries (evidence: `src/pages/MessageModeration/MessageModerationScreen.jsx`)
- Order management → Summary card: shows summaries (evidence: `src/pages/Orders/OrdersScreen.jsx`)
- Sales reports → Summary card: shows summaries (evidence: `src/pages/Reports/ReportsScreen.jsx`)
- Confirmation dialog → Styled button: uses (evidence: `src/components/molecules/ConfirmDialog/ConfirmDialog.jsx`)
- Storefront home → Site header: renders (evidence: `src/pages/Home/HomeScreen.jsx`)
- Profile → Site header: renders (evidence: `src/pages/Profile/ProfileScreen.jsx`)
- Receipt view → Site header: renders (evidence: `src/pages/Receipt/ReceiptScreen.jsx`)
- Transaction history → Site header: renders (evidence: `src/pages/TransHistoryScreen/TransHistoryScreen.jsx`)
