- Notifications
You must be signed in to change notification settings - Fork124
pgorecki/python-ddd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Disclaimer: this is a work in progress project, stay tuned for updates (*).
(*)This project is is accompanied by my bloghttps://dddinpython.com/ where I introduce some of the concepts and patterns implemented this repository.
AUCTION APPLICATION
The goal is to implement an automatic bidding system using DDD tactical patterns,described here:https://www.ebay.co.uk/pages/help/buy/bidding-overview.html
Online Auctions domain was selected for the purpose of this project, which is loosely based on Ebay bidding system.
The main reason for selecting this domain is general familiarity and limited complexity - many people understand how internet bidding work and the whole concept is not difficult to understand (or at least it's much simpler that healthcare or banking domains). On the other hand it's not simply a CRUD system - there are some business rules that must be implemented in the system.
This is a summary of the information we got from a domain expert about how the auction system should work.
When you want to sell an item, the first step in getting your item in front of buyers is creating aListing
. For now we only focus on selling through auctions (https://www.ebay.com/help/selling/listings/auction-format?id=4110), but in the future we may consider selling with "Buy It Now" (https://www.ebay.com/help/selling/listings/selling-buy-now?id=4109) or in some other ways. When presenting anListing
for sale (which we callpublishing
in the Catalog), seller must provide aListing
duration and initial price. Also it is also possible to schedule aListing
publication (https://www.ebay.com/help/selling/listings/selecting-listing-duration?id=4652).
You can cancel your listing when bidding takes place, but only under certain circumstances: if time left in listing < 12 hrs you can cancel your listing only if no bids were places (but we might change it in the future).
If you are a new seller (you never sold an item before), you can list only oneItem
in theCatalog
at a time.
WhenListing
is selled through auctionBidding
takes place. As aBuyer
, you can place a bid, which must be greated than the current price + 1 USD and which sets the the highest price you are willing to pay for an item. System will let you know if someone outbids you and you can decide if you want to increase your maximum limit. Sometimes you can can be automatically outbidded (if some other buyer sets his maximum limit higher that yours) - seehttps://www.ebay.com/help/buying/bidding/automatic-bidding?id=4014.
After a fixed time since the bidding was started a bidding ends and theWinner
is announced.
At this point, payments are out of scope for this project.
Each user can be aSeller
or aBuyer
(or both). User priveledges can be elevated to aStaff member
orAdministrator
.
Event storming technique was used to discover the business domain and the most important business processes.
Lising
,Bidding
andPayment
bounded contexts were identified as a result of event storming. Relationship between these bounded contexts is presented in the following context map.
SincePayment
context will be provided by a 3rd party payments provider (via REST API), the downstream context (Bidding
) must conform to whatever the upstream provides.
poetry shell
poetry install
poe compose_up
- run in a separate shell to start the database
poe start
poe test
About
Python DDD example
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.