- Postgresql
- Node
Clone the repository to your local workspace.
Configure your postgres credentials from /config/config.js file.
Then run
npx sequelize-cli db:migrate
to initialize database with tables data. After that runnpx sequelize-cli db:seed:all
to fill database with mock data. If you get any error you can try installing sequelize-cli globally bynpm install -g sequelize-cli
- Docker
- Docker Compose
- Clone the repository to your local workspace.
Run
docker-compose up
command. After that to initialize database with mock data. You need to connect docker instance either withdocker exec < container-id >
or if you use windows, you can just use Docker Desktop then find container and click to cli button. After that you just need to run commands below.npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
With the provided postman collection. You make requests to specific endpoints. In the app; You can do CRUD operations to Users, Portfolios and Shares. Also you can buy and sell a share. There is no authentication for users to sell or buy stocks. You just need to include username, rate symbol and amounth. When a transaction happens application records transactions to database by their types. (etc. 'buy' and 'sell') Also you can see Users Share's on PorfolioShare database.