$ npm ci
# development
$ docker-compose up --build
-
Login
- Request
- playerId
- Password
- Logic
- Validate that this is a valid player user and generate a unique session id
- Response
- A login session id
- Request
-
Offer sets CRUD endpoint with this schema example
{
"gameId": "33",
"avlabilty": 15,
"offerSetName": "bundle medium",
"offerSetId": "63e8ac11df807b5c13656c69",
"sku": "222",
"priceInCents": "3900",
"currency": "usd",
"products": [
{
"amount": 500,
"sku": "002",
"name": "dice medium"
},
{
"amount": 1500,
"sku": "005",
"name": "coins medium"
}
]
}
-
Order
- Request
- Credit card details
- OfferSetId
- Session id
- Logic
- Validate that the user loged in
- Validate basic credit card details
- Validate OfferSet availability and reduce it
- Record the order in a DB table
- Response
- Encrypted new order id
- Use aes-256-cbc encryption algorithm (Edit: makes no sense to me, so I ignored that)
- Encrypted new order id
- Request
-
The system should be ready to lunch with the user and offers set data injected into the chosen DB in the setup
The Swagger doc is available locally at (if you use default .env
values):