# yayauheny/bidplace architecture

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

- Interactive diagram: https://gitdiagram.com/yayauheny/bidplace
- Repository: https://github.com/yayauheny/bidplace

## Overview

bidplace is a curated marketplace for creator-associated items, centered on timed auctions rather than general resale. Its MVP flow is seller authentication and product/listing creation, public link discovery, buyer bidding, timed auction closure, winner selection, and creation of a minimal order. Other documented product areas include seller pages, image handling, moderation, and administration. The README documents PostgreSQL and realtime bidding; sampled controllers show several API-to-service calls, but unsampled implementation wiring is not asserted.

Main entry points: [`packages/api-client/src/request.ts`](https://github.com/yayauheny/bidplace/blob/main/packages/api-client/src/request.ts) (API client), [`apps/mobile/src/app/_layout.tsx`](https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/app/_layout.tsx) (Mobile app), [`apps/mobile/src/features/products/product-screen.tsx`](https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/features/products/product-screen.tsx) (Auction screens), [`apps/api/src/orders/orders.service.ts`](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/orders/orders.service.ts) (Orders service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_mobile["Mobile app<br/>[_layout.tsx]"]
  node_seller_ui["Seller screens"]
  node_buyer_ui["Auction screens<br/>[product-screen.tsx]"]
  node_api_client["API client<br/>[request.ts]"]
end

subgraph group_catalog["Seller and catalog"]
  node_products_api["Product API"]
  node_products_service["Product service"]
  node_sellers_api["Seller API"]
  node_sellers_service["Seller service<br/>[sellers.service.ts]"]
  node_images_api["Image API"]
  node_images_service["Image service<br/>[images.service.ts]"]
  node_discovery["Discovery API"]
  node_portfolio["Portfolio API"]
end

subgraph group_auction["Auction and orders"]
  node_listings_api["Listing API"]
  node_listings_service["Listing service"]
  node_bids_api["Bidding API<br/>[bids.controller.ts]"]
  node_bids_service["Bidding service<br/>[bids.service.ts]"]
  node_auction_rules["Auction rules<br/>[state-machine.ts]"]
  node_lifecycle["Auction lifecycle"]
  node_orders_api["Orders API"]
  node_orders_service["Orders service<br/>[orders.service.ts]"]
  node_realtime["Realtime gateway"]
end

subgraph group_operations["Platform operations"]
  node_auth_api["Authentication API<br/>[auth.controller.ts]"]
  node_auth_service["Authentication service<br/>[auth.service.ts]"]
  node_admin_api["Admin API"]
  node_db[("PostgreSQL access<br/>[prisma.service.ts]")]
end

node_seller(("Seller"))
node_buyer(("Buyer"))
node_postgres[("PostgreSQL")]

node_seller -->|"uses"| node_mobile
node_buyer -->|"uses"| node_mobile
node_mobile -->|"renders"| node_seller_ui
node_mobile -->|"renders"| node_buyer_ui
node_seller_ui -->|"requests"| node_api_client
node_buyer_ui -->|"requests"| node_api_client
node_api_client -->|"calls REST"| node_auth_api
node_api_client -->|"calls REST"| node_products_api
node_api_client -->|"calls REST"| node_sellers_api
node_api_client -->|"calls REST"| node_listings_api
node_api_client -->|"calls REST"| node_bids_api
node_api_client -->|"calls REST"| node_orders_api
node_products_api -->|"delegates"| node_products_service
node_sellers_api -->|"delegates"| node_sellers_service
node_images_api -->|"delegates"| node_images_service
node_listings_api -->|"delegates"| node_listings_service
node_bids_api -->|"delegates"| node_bids_service
node_orders_api -->|"delegates"| node_orders_service
node_admin_api -->|"manages orders"| node_orders_service
node_admin_api -->|"queries"| node_db
node_lifecycle -->|"creates winner order"| node_orders_service
node_realtime -.->|"broadcasts bids"| node_buyer_ui
node_db -->|"reads and writes"| node_postgres

click node_mobile "https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/app/_layout.tsx"
click node_seller_ui "https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/features/sellers/product-draft-screen.tsx"
click node_buyer_ui "https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/features/products/product-screen.tsx"
click node_api_client "https://github.com/yayauheny/bidplace/blob/main/packages/api-client/src/request.ts"
click node_auth_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/auth/auth.controller.ts"
click node_auth_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/auth/auth.service.ts"
click node_products_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/products/products.controller.ts"
click node_products_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/products/products.service.ts"
click node_sellers_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/sellers/sellers.controller.ts"
click node_sellers_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/sellers/sellers.service.ts"
click node_images_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/images/images.controller.ts"
click node_images_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/images/images.service.ts"
click node_listings_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/listings/listings.controller.ts"
click node_listings_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/listings/listings.service.ts"
click node_bids_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/bids/bids.controller.ts"
click node_bids_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/bids/bids.service.ts"
click node_auction_rules "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/core/auction/state-machine.ts"
click node_lifecycle "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/lifecycle/listing-lifecycle.service.ts"
click node_orders_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/orders/orders.controller.ts"
click node_orders_service "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/orders/orders.service.ts"
click node_discovery "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/discovery/discovery.controller.ts"
click node_portfolio "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/portfolio/portfolio.controller.ts"
click node_realtime "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/realtime/realtime.gateway.ts"
click node_admin_api "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/admin/admin.controller.ts"
click node_db "https://github.com/yayauheny/bidplace/blob/main/apps/api/src/core/database/prisma.service.ts"

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_mobile,node_seller_ui,node_buyer_ui,node_api_client toneBlue
class node_products_api,node_products_service,node_sellers_api,node_sellers_service,node_images_api,node_images_service,node_discovery,node_portfolio,node_postgres toneAmber
class node_listings_api,node_listings_service,node_bids_api,node_bids_service,node_auction_rules,node_lifecycle,node_orders_api,node_orders_service,node_realtime toneMint
class node_auth_api,node_auth_service,node_admin_api,node_db toneRose
class node_seller,node_buyer toneIndigo
```

## Components

### Client experience

- [Mobile app](https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/app/_layout.tsx): `apps/mobile/src/app/_layout.tsx`
- [Seller screens](https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/features/sellers/product-draft-screen.tsx): `apps/mobile/src/features/sellers/product-draft-screen.tsx`
- [Auction screens](https://github.com/yayauheny/bidplace/blob/main/apps/mobile/src/features/products/product-screen.tsx): `apps/mobile/src/features/products/product-screen.tsx`
- [API client](https://github.com/yayauheny/bidplace/blob/main/packages/api-client/src/request.ts): `packages/api-client/src/request.ts`

### Seller and catalog

- [Product API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/products/products.controller.ts): `apps/api/src/products/products.controller.ts`
- [Product service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/products/products.service.ts): `apps/api/src/products/products.service.ts`
- [Seller API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/sellers/sellers.controller.ts): `apps/api/src/sellers/sellers.controller.ts`
- [Seller service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/sellers/sellers.service.ts): `apps/api/src/sellers/sellers.service.ts`
- [Image API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/images/images.controller.ts): `apps/api/src/images/images.controller.ts`
- [Image service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/images/images.service.ts): `apps/api/src/images/images.service.ts`
- [Discovery API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/discovery/discovery.controller.ts): `apps/api/src/discovery/discovery.controller.ts`
- [Portfolio API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/portfolio/portfolio.controller.ts): `apps/api/src/portfolio/portfolio.controller.ts`

### Auction and orders

- [Listing API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/listings/listings.controller.ts): `apps/api/src/listings/listings.controller.ts`
- [Listing service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/listings/listings.service.ts): `apps/api/src/listings/listings.service.ts`
- [Bidding API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/bids/bids.controller.ts): `apps/api/src/bids/bids.controller.ts`
- [Bidding service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/bids/bids.service.ts): `apps/api/src/bids/bids.service.ts`
- [Auction rules](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/core/auction/state-machine.ts): `apps/api/src/core/auction/state-machine.ts`
- [Auction lifecycle](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/lifecycle/listing-lifecycle.service.ts): `apps/api/src/lifecycle/listing-lifecycle.service.ts`
- [Orders API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/orders/orders.controller.ts): `apps/api/src/orders/orders.controller.ts`
- [Orders service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/orders/orders.service.ts): `apps/api/src/orders/orders.service.ts`
- [Realtime gateway](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/realtime/realtime.gateway.ts): `apps/api/src/realtime/realtime.gateway.ts`

### Platform operations

- [Authentication API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/auth/auth.controller.ts): `apps/api/src/auth/auth.controller.ts`
- [Authentication service](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/auth/auth.service.ts): `apps/api/src/auth/auth.service.ts`
- [Admin API](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/admin/admin.controller.ts): `apps/api/src/admin/admin.controller.ts`
- [PostgreSQL access](https://github.com/yayauheny/bidplace/blob/main/apps/api/src/core/database/prisma.service.ts): `apps/api/src/core/database/prisma.service.ts`

### Other components

- **Seller**
- **Buyer**
- **PostgreSQL**

## Connections

- Seller → Mobile app: uses
- Buyer → Mobile app: uses
- Mobile app → Seller screens: renders
- Mobile app → Auction screens: renders
- Seller screens → API client: requests
- Auction screens → API client: requests
- API client → Authentication API: calls REST
- API client → Product API: calls REST
- API client → Seller API: calls REST
- API client → Listing API: calls REST
- API client → Bidding API: calls REST
- API client → Orders API: calls REST
- Product API → Product service: delegates
- Seller API → Seller service: delegates
- Image API → Image service: delegates
- Listing API → Listing service: delegates
- Bidding API → Bidding service: delegates
- Orders API → Orders service: delegates
- Admin API → Orders service: manages orders
- Admin API → PostgreSQL access: queries
- Auction lifecycle → Orders service: creates winner order
- Realtime gateway → Auction screens: broadcasts bids
- PostgreSQL access → PostgreSQL: reads and writes
