Skip to content

IS213 project [Grade: A] - A full stack microservice web application for stock trading (demo)

Notifications You must be signed in to change notification settings

heiEzekiel/Dr-Stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Merger of this 2 repositories
https://github.com/ESDG3/dr_stocks-frontend
https://github.com/ESDG3/dr_stocks-backend

Dr Stocks Backend Setup Guide

Prerequisite to run this project

  1. WAMPServer
  2. MySQL
  3. Python
  4. Docker
  5. Postman

How to setup the backend services?

  1. Unzip the zip file into a folder on your desktop

  2. Open the backend folder and navigate to the "dr_stocks-backend/database" folder

  3. Start the WAMPServer

  4. Open all the SQL files using MySQL (via phpmyadmin or not) and execute/run all the files

  5. Next, Open the "docker-compose.yml" file and change the docker id for the images to your own docker id.

  6. Make sure you have run the Docker application.

  7. Open a cmd terminal and cd to the "dr_stocks-backend/microservices" folder.

  8. After, proceed to type this command "docker-compose up -d" and hit enter to run it in the terminal. This will set up all the required services.

  9. Wait for about 30 seconds after the containers have been created and started to let the services start up.

  10. Next, type this URL "localhost:1337" in your browser to access the KONGA portal.

  11. Create an admin account:

    Name: admin

    Email: Any email

    Password: password

    Confirm Password: password

  12. and set the default connection as this:

    Name: default

    Kong Admin URL: http://kong:8001

  13. Next, proceed to the services page. *It will be blank since no services has been added

  14. Create all this services and routes as stated in the table

    (can refer to the included word document: "KONG-Setup.docx"):

    You will be redirected to the dashboard page which is the default page:

  15. Next, go to the plugin tab for each service and add the Key Auth plugin for all services

    EXCEPT LOGIN (userinfoapi-login).

    For each Key Auth, under key names, add a key called "apikey" and hit enter and click add plugin at the bottom.

  16. Next, navigate to the consumer tab (left nav bar) and create a consumer called "customer" and under the credentials tab, create an api key with the key as this "NTaKvMth2Syfjf30m9dmKWXzANDRqbzh".

  17. Also, under the groups tab, add a group called "customer".

  18. With this, you can open Postman and test the connection using this URL: http://localhost:8000/api/v1/login?email=maryesther@gmail.com&password=dGVtcDE=

  19. Lastly, once all has been configured or if you face any issues, please stop the all the microservices docker containers and start them again and wait for about 1 minute for all the services to complete starting up.

With this, you have successfully configured the backend services! You can proceed to setup the frontend services if you have not done so.

Dr Stocks Frontend Setup Guide

How to setup frontend services?

  1. Unzip the zip file into a folder

  2. Copy the frontend folder to the "www" folder in your "wamp64" folder on your C: drive eg. "C:/wamp64/www/"

  3. Next, make sure that your WAMPServer is running. If it is not, please run it

  4. Enter this URL in your browser: http://localhost/dr_stocks-frontend/index.html

    This is the login page of our website

  5. You can then login using this account details:

    Email: ezekieltheprophet55@gmail.com

    Password: temp

  6. Next, you will be redirected to this main page *Note if you did not get redirected to the main/dashboard page, this may be due microservices still in the starting up process or KONG api gateway establishing the services and routes. Thus, please wait for around 1 minute before trying to log in again.

With this, you have successfully setup this project and please feel free to try out this project!

About

IS213 project [Grade: A] - A full stack microservice web application for stock trading (demo)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages