Design an Online Auction System
| Difficulty: Medium | Source: awesome-low-level-design |
Requirements
- Register and log in
- Create listings with item name, description, starting price, duration
- Browse and search listings
- Place bids on active listings
- Auto-update highest bid, notify bidders
- End auction at duration, declare winner
- Handle concurrent access
- Extensible
Class Diagram

Classes, Interfaces and Enumerations
| Class/Interface | Description |
|---|---|
| User | id, username, email |
| AuctionStatus | Enum: active, closed |
| AuctionListing | id, item name, description, starting price, duration, seller, current highest bid, bid list |
| Bid | id, bidder, amount, timestamp |
| AuctionSystem | Singleton; ConcurrentHashMap + CopyOnWriteArrayList for thread-safe management |
Design Patterns Used
| Pattern | Application |
|---|---|
| Singleton | AuctionSystem has a single instance managing all listings and bids |
Code Implementations
| Language | Source Code |
|---|---|
| Java | View on GitHub |
| Python | View on GitHub |
| C++ | View on GitHub |
| C# | View on GitHub |
| Go | View on GitHub |