This is a small test task that emulates crypto portfolio
- Copy .env.example file
cp .env.example .env
- Replace
FINNHUB_SECRET
variable in .env file with real finnhub API key - Run project
docker-compose up --build
- The backend will be available on http://127.0.0.1:8080
You have to options:
- You can run project locally with docker-compose and it will be available on http://127.0.0.1:8080
- You can use deployed demo: https://darkstore.four-velocity.com
In both cases here is the requirements 👇
- You can find the swagger docs on the root endpoint
- You can send requests directly from swagger
- Send POST request on
/populate
endpoint to fill db with dummy values and users (no AUTH needed) - Two users will be created: admin and John Doe
- For all other endpoints you have to authenticate with JWT token. You can get them
from https://jwt.io/ or copy from the tokens section below.
- If you will use jwt.io pls ensure that the algorithm is HS256 and the
"name"
field value is"admin"
or"John Doe"
- If you will use jwt.io pls ensure that the algorithm is HS256 and the
- With admin user you can clean db by sending POST request to
/wipe
endpoint. If you perform that action all users and portfolios will be deleted. You can always populate new data with/populate
endpoint, but your previous changes won't be saved
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6ImFkbWluIiwiaWF0IjoxNTE2MjM5MDIyfQ.T26Dm4buOBRdxNs58srk1l_N5y1Dxii9y-YMj-9J7mM