# mcrs101/oodev architecture

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

- Interactive diagram: https://gitdiagram.com/mcrs101/oodev
- Repository: https://github.com/mcrs101/oodev

## Overview

Godunk appears to be a small retail/POS suite: a customer-facing storefront, a manager-facing inventory and purchasing app, a supplier/customer operations app, and an Express/Prisma API. The likely workflow spans product discovery, cart checkout, order and stock updates, and staff inventory operations. The README is unreadable, so capabilities are inferred from the source tree and sampled code; unsampled screens are included, but links to backend behavior are omitted unless the source shows them.

Main entry points: [`backend/src/routes/auth.routes.js`](https://github.com/mcrs101/oodev/blob/main/backend/src/routes/auth.routes.js) (API routes), [`godunk-sell/src/app/app.ts`](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/app.ts) (Storefront UI), [`godunk-manager/src/app/app.ts`](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/app.ts) (Manager UI), [`godunk-sell/src/app/home/home.ts`](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/home/home.ts) (Product browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_seller_ui["Storefront UI<br/>[app.ts]"]
  node_login["Login<br/>[login.ts]"]
  node_register["Registration<br/>[register.ts]"]
  node_catalog["Product browsing<br/>[home.ts]"]
  node_product_data["Product data<br/>[product.ts]"]
  node_search["Product search<br/>[search.service.ts]"]
  node_cart["Cart and checkout<br/>[cart.service.ts]"]
  node_about["About page<br/>[about.ts]"]
end

subgraph group_operations["Store operations"]
  node_fine_app["Operations UI<br/>[app.ts]"]
  node_ops_home["Operations home<br/>[home.ts]"]
  node_customer_ops["Customer operations<br/>[customerpage.ts]"]
  node_supplier_ops["Supplier operations<br/>[suppli.ts]"]
  node_manager_app["Manager UI<br/>[app.ts]"]
  node_dashboard["Dashboard<br/>[dashboard.ts]"]
  node_inventory["Inventory management<br/>[inventory.ts]"]
  node_purchase["Purchase orders<br/>[purchase-order.ts]"]
  node_manager["Manager records<br/>[manager.ts]"]
end

subgraph group_api["Backend API"]
  node_api_server["HTTP server<br/>[server.js]"]
  node_api_routes["API routes<br/>[auth.routes.js]"]
  node_auth["Authentication<br/>[auth.controller.js]"]
  node_products["Product operations"]
  node_orders["Orders and stock"]
  node_auth_middleware["Profile authorization<br/>[auth.middleware.js]"]
end

subgraph group_persistence["Data persistence"]
  node_database[("Application database<br/>[schema.prisma]")]
end

node_customer(("Shopper"))

node_customer -->|"uses"| node_seller_ui
node_seller_ui -->|"routes to"| node_login
node_seller_ui -->|"routes to"| node_register
node_seller_ui -->|"routes to"| node_catalog
node_seller_ui -->|"routes to"| node_about
node_catalog -->|"uses"| node_product_data
node_catalog -->|"uses"| node_search
node_catalog -->|"uses"| node_cart
node_fine_app -->|"routes to"| node_ops_home
node_fine_app -->|"routes to"| node_customer_ops
node_fine_app -->|"routes to"| node_supplier_ops
node_manager_app -->|"routes to"| node_dashboard
node_manager_app -->|"routes to"| node_inventory
node_manager_app -->|"routes to"| node_purchase
node_manager_app -->|"routes to"| node_manager
node_manager -->|"posts manager data"| node_api_routes
node_api_server -->|"mounts"| node_api_routes
node_api_routes -->|"dispatches to"| node_auth
node_api_routes -->|"dispatches to"| node_products
node_api_routes -->|"dispatches to"| node_orders
node_api_routes -->|"guards profile"| node_auth_middleware
node_auth -->|"reads and writes"| node_database
node_products -->|"reads and writes"| node_database
node_orders -->|"reads and writes"| node_database

click node_seller_ui "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/app.ts"
click node_login "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/login/login.ts"
click node_register "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/register/register.ts"
click node_catalog "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/home/home.ts"
click node_product_data "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/product.ts"
click node_search "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/search.service.ts"
click node_cart "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/cart.service.ts"
click node_about "https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/about/about.ts"
click node_fine_app "https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/app.ts"
click node_ops_home "https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/home/home.ts"
click node_customer_ops "https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/customerpage/customerpage.ts"
click node_supplier_ops "https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/suppli/suppli.ts"
click node_manager_app "https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/app.ts"
click node_dashboard "https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/dashboard/dashboard.ts"
click node_inventory "https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/inventory/inventory.ts"
click node_purchase "https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/purchase-order/purchase-order.ts"
click node_manager "https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/manager/manager.ts"
click node_api_server "https://github.com/mcrs101/oodev/blob/main/backend/server.js"
click node_api_routes "https://github.com/mcrs101/oodev/blob/main/backend/src/routes/auth.routes.js"
click node_auth "https://github.com/mcrs101/oodev/blob/main/backend/src/controller/auth.controller.js"
click node_products "https://github.com/mcrs101/oodev/blob/main/backend/src/controller/products.controller.js"
click node_orders "https://github.com/mcrs101/oodev/blob/main/backend/src/controller/order.controller.js"
click node_auth_middleware "https://github.com/mcrs101/oodev/blob/main/backend/src/middleware/auth.middleware.js"
click node_database "https://github.com/mcrs101/oodev/blob/main/backend/prisma/schema.prisma"

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_seller_ui,node_login,node_register,node_catalog,node_product_data,node_search,node_cart,node_about toneBlue
class node_fine_app,node_ops_home,node_customer_ops,node_supplier_ops,node_manager_app,node_dashboard,node_inventory,node_purchase,node_manager toneAmber
class node_api_server,node_api_routes,node_auth,node_products,node_orders,node_auth_middleware toneMint
class node_database toneRose
class node_customer toneIndigo
```

## Components

### Customer storefront

- [Storefront UI](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/app.ts): `godunk-sell/src/app/app.ts`
- [Login](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/login/login.ts): `godunk-sell/src/app/login/login.ts`
- [Registration](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/register/register.ts): `godunk-sell/src/app/register/register.ts`
- [Product browsing](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/home/home.ts): `godunk-sell/src/app/home/home.ts`
- [Product data](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/product.ts): `godunk-sell/src/app/services/product.ts`
- [Product search](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/search.service.ts): `godunk-sell/src/app/services/search.service.ts`
- [Cart and checkout](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/services/cart.service.ts): `godunk-sell/src/app/services/cart.service.ts`
- [About page](https://github.com/mcrs101/oodev/blob/main/godunk-sell/src/app/about/about.ts): `godunk-sell/src/app/about/about.ts`

### Store operations

- [Operations UI](https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/app.ts): `godunk-fine/src/app/app.ts`
- [Operations home](https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/home/home.ts): `godunk-fine/src/app/home/home.ts`
- [Customer operations](https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/customerpage/customerpage.ts): `godunk-fine/src/app/customerpage/customerpage.ts`
- [Supplier operations](https://github.com/mcrs101/oodev/blob/main/godunk-fine/src/app/suppli/suppli.ts): `godunk-fine/src/app/suppli/suppli.ts`
- [Manager UI](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/app.ts): `godunk-manager/src/app/app.ts`
- [Dashboard](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/dashboard/dashboard.ts): `godunk-manager/src/app/dashboard/dashboard.ts`
- [Inventory management](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/inventory/inventory.ts): `godunk-manager/src/app/inventory/inventory.ts`
- [Purchase orders](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/purchase-order/purchase-order.ts): `godunk-manager/src/app/purchase-order/purchase-order.ts`
- [Manager records](https://github.com/mcrs101/oodev/blob/main/godunk-manager/src/app/manager/manager.ts): `godunk-manager/src/app/manager/manager.ts`

### Backend API

- [HTTP server](https://github.com/mcrs101/oodev/blob/main/backend/server.js): `backend/server.js`
- [API routes](https://github.com/mcrs101/oodev/blob/main/backend/src/routes/auth.routes.js): `backend/src/routes/auth.routes.js`
- [Authentication](https://github.com/mcrs101/oodev/blob/main/backend/src/controller/auth.controller.js): `backend/src/controller/auth.controller.js`
- [Product operations](https://github.com/mcrs101/oodev/blob/main/backend/src/controller/products.controller.js): `backend/src/controller/products.controller.js`
- [Orders and stock](https://github.com/mcrs101/oodev/blob/main/backend/src/controller/order.controller.js): `backend/src/controller/order.controller.js`
- [Profile authorization](https://github.com/mcrs101/oodev/blob/main/backend/src/middleware/auth.middleware.js): `backend/src/middleware/auth.middleware.js`

### Data persistence

- [Application database](https://github.com/mcrs101/oodev/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`

### Other components

- **Shopper**

## Connections

- Shopper → Storefront UI: uses
- Storefront UI → Login: routes to
- Storefront UI → Registration: routes to
- Storefront UI → Product browsing: routes to
- Storefront UI → About page: routes to
- Product browsing → Product data: uses (evidence: `godunk-sell/src/app/home/home.ts`)
- Product browsing → Product search: uses (evidence: `godunk-sell/src/app/home/home.ts`)
- Product browsing → Cart and checkout: uses (evidence: `godunk-sell/src/app/home/home.ts`)
- Operations UI → Operations home: routes to
- Operations UI → Customer operations: routes to
- Operations UI → Supplier operations: routes to
- Manager UI → Dashboard: routes to
- Manager UI → Inventory management: routes to
- Manager UI → Purchase orders: routes to
- Manager UI → Manager records: routes to
- Manager records → API routes: posts manager data (evidence: `godunk-manager/src/app/manager/manager.ts`)
- HTTP server → API routes: mounts (evidence: `backend/server.js`)
- API routes → Authentication: dispatches to (evidence: `backend/src/routes/auth.routes.js`)
- API routes → Product operations: dispatches to (evidence: `backend/src/routes/auth.routes.js`)
- API routes → Orders and stock: dispatches to (evidence: `backend/src/routes/auth.routes.js`)
- API routes → Profile authorization: guards profile (evidence: `backend/src/routes/auth.routes.js`)
- Authentication → Application database: reads and writes (evidence: `backend/src/controller/auth.controller.js`)
- Product operations → Application database: reads and writes (evidence: `backend/src/controller/products.controller.js`)
- Orders and stock → Application database: reads and writes (evidence: `backend/src/controller/order.controller.js`)
