The Coffee Club System is a decentralized coffee ordering platform built on the Sui blockchain, enabling members to order coffee from partner cafes using a smart contract system and automated coffee machine integration.
The Coffee Club system consists of four main components:
- Smart Contract (Move): Handles membership, cafe management, and order processing on the Sui blockchain
- Member Portal (React): Web interface for members to place orders and managers to oversee operations
- Event Listener: Backend service that monitors blockchain events and triggers coffee machine actions
- Coffee Machine Controller: Python-based Bluetooth controller for DeLonghi Primadonna machines
graph TB
subgraph "Frontend"
A[Member Portal<br/>React + TypeScript] --> B[Sui SDK]
end
subgraph "Blockchain"
B --> C[Sui Network]
C --> D[Coffee Club<br/>Smart Contract]
end
subgraph "Backend Services"
C --> E[Event Listener]
E --> F[Prisma DB]
E --> G[Coffee Machine<br/>Controller]
G --> H[DeLonghi<br/>Primadonna]
end
subgraph "User Roles"
I[Members] --> A
J[Cafe Managers] --> A
K[Admins] --> A
end
- Manages membership NFTs
- Handles cafe registration and management
- Processes coffee orders with status tracking
- Implements role-based access control (Admin, Manager, Member)
- Emits events for order status changes
- React-based web interface
- Connects to Sui wallet
- Supports member registration
- Enables coffee ordering
- Provides cafe management interface
- Shows order history and status
- Role-based UI components
- Monitors Sui blockchain events
- Maintains order database using Prisma
- Triggers coffee machine actions
- Handles order status updates
- Manages error recovery
- Bluetooth LE communication with DeLonghi machines
- Supports various coffee preparations
- Handles machine status monitoring
- Implements error handling and recovery
- Command-line interface for testing
- Decentralized Membership: NFT-based membership system
- Role-Based Access: Admin, Cafe Manager, and Member roles
- Real-time Updates: Order status tracking and notifications
- Automated Brewing: Direct coffee machine integration
- Multi-Cafe Support: Manages multiple cafe locations
- Order History: Tracks all orders and their statuses
- Blockchain: Sui Network
- Smart Contract: Move
- Frontend: React, TypeScript, Sui SDK
- Backend: NestJS, Prisma
- Machine Control: Python, Bleak (Bluetooth LE)
- Database: PostgreSQL (via Prisma)