A simulated stock trading app using price from IEX
- SpringBoot
- Postgres
- Lombok: to reduce boilerplate in java objects
- Retrofit: For HTTP Requests
- Rest-assured: More expressive api/integration testing
- Auth0 JWT: For generating and validating JWT tokens
- Swagger: For API documentation
##Todo
- No UI: couldn't implement the frontend part of the task
- Payment Integration
- Better Exception management / handling
- More unit tests: while there are ample IT tests, the unit are few, reverse should be the case.
-
Clone the application
git clone https://github.com/kreativecoder/decatrade.git cd decatrade
-
Create Postgres database
create database decatrade
-
Change Postgres username and password
-
open
src/main/resources/application.yml
file. -
change
spring.datasource.username
andspring.datasource.password
properties
-
-
Run the app
You can run the spring boot app by typing the following command -
mvn spring-boot:run
The server will start on port 5000.
You can also package the application in the form of a
jar
file and then run it like so -mvn package java -jar target/decatrade-0.0.1-SNAPSHOT.jar
-
Access the API Docs by pointing your browser to
http://localhost:5000/swagger-ui.html
There is a docker-compose setup that makes getting a copy of this on your local environment faster. The docker compose runs both the app and an instance of postgres.
-
Clone the application
git clone https://github.com/kreativecoder/decatrade.git cd decatrade
-
Run docker-compose(assumes you have docker and docker-compose setup already.)
docker-compose up
An instance of the app is running on heroku, you can try it out here