kreativecoder / decatrade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decatrade

A simulated stock trading app using price from IEX

Tools / Frameworks used

  1. SpringBoot
  2. Postgres
  3. Lombok: to reduce boilerplate in java objects
  4. Retrofit: For HTTP Requests
  5. Rest-assured: More expressive api/integration testing
  6. Auth0 JWT: For generating and validating JWT tokens
  7. Swagger: For API documentation

##Todo

  1. No UI: couldn't implement the frontend part of the task
  2. Payment Integration
  3. Better Exception management / handling
  4. More unit tests: while there are ample IT tests, the unit are few, reverse should be the case.

Setup

  1. Clone the application

    git clone https://github.com/kreativecoder/decatrade.git
    cd decatrade
  2. Create Postgres database

    create database decatrade
  3. Change Postgres username and password

    • open src/main/resources/application.yml file.

    • change spring.datasource.username and spring.datasource.password properties

  4. 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
  5. Access the API Docs by pointing your browser to

    http://localhost:5000/swagger-ui.html

Docker / Docker Compose

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.

  1. Clone the application

    git clone https://github.com/kreativecoder/decatrade.git
    cd decatrade
  2. Run docker-compose(assumes you have docker and docker-compose setup already.)

    docker-compose up

Heroku

An instance of the app is running on heroku, you can try it out here

About


Languages

Language:Java 55.4%Language:JavaScript 41.3%Language:HTML 1.3%Language:TSQL 1.2%Language:Dockerfile 0.5%Language:CSS 0.3%