How ntbfain/dice works
DICE is a freelance-art commission and live-auction marketplace. Clients browse artist portfolios or auctions, commission work or bid, then track order stages, chat, review drafts, pay milestones, and receive completed files; artists and administrators manage those workflows. The frontend serves localized pages and communicates with FastAPI over REST and WebSockets. The README documents watermarking, protected master-file delivery, and milestone payments; sampled source confirms auction-to-order creation, notifications, authentication, and WebSocket updates. Several feature routers were not sampled, so their internal call relationships are not asserted.
Main entry points: main.py FastAPI Application · [locale] Marketplace and Dashboards · auction_service.py Auction Lifecycle · db.py Relational Database
Components 19
Web Client
- Marketplace and Dashboards
frontend/src/app/[locale] - API Client
frontend/src/lib/api.ts - Marketplace API Client
frontend/src/lib/marketplaceApi.ts - Realtime Client
frontend/src/components/WebSocketContext.tsx - Locale Routing
frontend/src/i18n/routing.ts
API Workflows
- FastAPI Application
backend/main.py - Authentication and Users
backend/api/routers/auth.py - Auction Endpoints
backend/api/routers/auctions.py - Orders and Queue
backend/api/routers/orders.py - Artist and Portfolio
backend/api/routers/artists.py - Analytics and Admin
backend/api/routers/analytics.py
Marketplace Services
- Auction Lifecycle
backend/services/auction_service.py - Payment State
backend/services/order_service.py - Notifications
backend/services/notification_service.py - Image Protection
backend/core/watermark.py
Persistence and Realtime
- Relational Database
backend/core/db.py - WebSocket Manager
backend/core/websocket.py - Protected File Storage
Other components
- Client or Artist
Connections 26
- Client or Artist → Marketplace and Dashboards: uses
- Marketplace and Dashboards → Locale Routing: routes by locale
- Marketplace and Dashboards → API Client: requests REST
- Marketplace and Dashboards → Marketplace API Client: requests marketplace
- Marketplace and Dashboards → Realtime Client: subscribes realtime
- API Client → FastAPI Application: sends REST
- Marketplace API Client → FastAPI Application: sends REST
- Realtime Client → FastAPI Application: opens socket
- FastAPI Application → Authentication and Users: dispatches routes
- FastAPI Application → Auction Endpoints: dispatches routes
- FastAPI Application → Orders and Queue: dispatches routes
- FastAPI Application → Artist and Portfolio: dispatches routes
- FastAPI Application → Analytics and Admin: dispatches routes
- FastAPI Application → Relational Database: initializes database
- FastAPI Application → WebSocket Manager: connects sockets
- Auction Lifecycle → Relational Database: reads and writes
- Auction Lifecycle → Payment State: checks payment state
- Auction Lifecycle → Notifications: creates notifications
- Auction Lifecycle → WebSocket Manager: broadcasts events
- Notifications → Relational Database: stores notifications
- Notifications → WebSocket Manager: sends messages
- Payment State → Relational Database: reads invoices
- Realtime Client → WebSocket Manager: receives events
- Orders and Queue → Protected File Storage: handles delivery
- Orders and Queue → Image Protection: protects previews
- Auction Endpoints → Auction Lifecycle: uses lifecycle