Xtbfront is a sample UI using XtbClient. The main goal was to show how to use library features to build a simple application.
To see a demo of the application go to Demo website.
To start a backend server:
- make a copy of
./back/xtbfront/.sample-envas./back/xtbfront/.env - replace env placeholders with proper values. Paragraph about obtaining credentials to XTB: XTB credentials.
- run command
cd ./back/xtbfront
mix deps.get
mix phx.serverTo start a frontend part:
cd ./front
npm install
npm run devAfter running front-end and back-end parts, they should be available at http://localhost:8000 for the front-end and http://localhost:4000/api for the back-end part.
It is also possible to run the application as Docker containers with docker-compose.
To start the whole stack:
- make a copy of
./.sample_xtbfront-api-envas./.xtbfront-api.env - replace env placeholders with proper values. Apart from XTB credentials described in XTB credentials you might need to put a secret key for Phoenix application.
To get it run
mix phx.gen.secretinside./back/xtbfrontfolder. - run command
docker-compose -f docker-compose.dev.yml up -d --buildIf you don't have an account on XTB platform, go to XTB website to create one.
After validating your e-mail you should get an account number.
Account number and password are needed to put them in .env files for proper communication with XTB server.