https://github.com/leodhb/pokecoin
Exchange to trade pokémon as NFTs
https://github.com/leodhb/pokecoin
bxblue nft pokemon rails7 ruby technical-test
Last synced: about 2 months ago
JSON representation
Exchange to trade pokémon as NFTs
- Host: GitHub
- URL: https://github.com/leodhb/pokecoin
- Owner: leodhb
- License: agpl-3.0
- Created: 2022-04-05T00:13:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T01:27:00.000Z (about 3 years ago)
- Last Synced: 2025-01-27T16:49:22.387Z (3 months ago)
- Topics: bxblue, nft, pokemon, rails7, ruby, technical-test
- Language: Ruby
- Homepage:
- Size: 997 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PokéCoin
Exchange to trade pokémon as NFTs## Project Specifications
#### HTTP Routes:
| **VERB** | **Route** | **Description** |
|----------|-----------------------|-----------------------------------------|
| [GET] | / | Landing Page |
| [GET] | /pokemon | List All Pokemon |
| [GET] | /pokemon/:id | Shows a Pokemon |
| [GET] | /pokemon/:id/checkout | Proceed to buy a Pokemon |
| [POST] | /pokemon/:id/buy | Validates and transact a valid purchase |
| [POST] | /pokemon/:id/sell | Validates and transact a valid sale |
| [GET] | /me | Displays the logged in user account |
| [GET] | /me/add | Shows a screen to add money to wallet |
| [PATCH] | /me/add | Adds money to the wallet |
| [GET] | /me/transactions | Shows all user transactions |#### Registering a Buy (from the exchange):
- Check if user has enough USD_BTC to buy
- Decrement from user balance
- Change the pokemon owner
- Change the last_sell_price
- Register a transaction with a BUY operation#### Registering a Sell (to the exchange):
- Check if user really own that Pokemon
- Change the pokemon owner
- Change the last_sell_price
- Add to from user balance
- Register a transaction with a SELL operation## ERD Diagram
