The repository contains all of the necessary code files to run this Cryptocurrency Web Trading application. This was created as a project for IT490-101, Systems Integration at NJIT under Donald Kehoe. Users will be able to login into the app to trade Cryptocurrency such as Etherium and Bitcoin. They will be able to review their trade history, have portfolio tracking, recieve push notifications when they execute a trade, and see up to date charts of each cryptocurrency. You can see technologies used in the project below.
Front End: Python, Bootstrap, HTML, CSS, Javascript
Back End: Python, SQL
DMZ: Python
Data Sources: CoinMarketCap API, CryptoCompare API
These instructions will help you get started setting up on the local machine for whatever purpose is needed. The binding for the queues are created automatically when anything using RabbitMQ is run
Username: dmz
Password: dmz
Exchange Type: Direct Queue
Username: mysql
Password: mysql
Exchange Type: Direct Queue
Username: networklogger
Password: networklogger
Exchange Type: Direct Queue
As specified you will need to get the RabbitMQ management server plugin and start the RabbitMQ instance in the browser at the specified IP address
The exchanges that need to be made are specified above (NetworkLogger exchange, DMZ exchange, and MySQL exchange). The queues are automatically created and binded and they need to be direct exchanges.
The database topology is in the dbServer directory in the schema.sql file
DB credentials are up to you but input in the database.config file in the dbAPI directory
The functions for information to get stored in the SQL database are in the dbAPI directory and store in the sqlpython.py file
To run everything that you need for the DMZ go into the CoinAPI directory and python3 the CoinAPI to load the listener and logger
To run the server for the front end python3 manage.py runserver_plus --cert-file cert.pem --key-file key.pem in the /It490proj/website/kommando directory
Also python3 the API.py and DB.py files in the rpcClient directory while the server is running
-Open branch testLogin/validation /It490proj/website/kommando in the browser begin the testing the webpages
-Login: loging with the username and password
-Register: ener personal and specifique information before gaining access to home page
-Home: display contents information after login.
-Account: top bar page to access account(cash, bitcoin, ethereum)
-Market trade: a top bar page to make your trade
-Learn: a Learning page accessible to learn more about bitcoin, and ethereum by getting redirected to coinbase
-Chart: side bard page to see the current price flow rate currency
For Dev usage:
- Download pack_tool folder
Where ever you place the folder will be where it's path is when installed. So pick a spot a keep it there.
- Run setup.sh
./setup.sh
Running the script will:
- install req python libs
- place tool path in bashrc
- make proper directory structure for tool in (~/.config/packtool/)
- constructs the packtool config file
Now close current terminal and reopen a fresh terminal.
To check install, type:
pack
This should bring up the subcommand documentation
- Commands
Before making a package, set project root folder:
pack setroot ~/folder/project_folder/
To make a package:
pack make samplepak-1.0 file1.py file2.html file3.css
Package name must conform to pkg naming convention 'pkgname-2.3'. The make command makes the package and sends it to the deployment server.
fresh ubuntu 20.04 LTS
sudo apt update
sudo apt upgrade
- sudo apt install
git
- sudo apt install
mysql-server
- sudo apt install
openssh-server
- sudo apt install
python3-pip
- pip3 install
mysql-connector-python
-
pull branch from github
-
run setup.sh for packtool
./setup.sh
Where ever you place the packtool folder will be where it's path is when installed. So pick a spot a keep it there.
- copy packages dir structure to ~, this is where the packages will be stored
cp -r packages ~
check hosts.yaml to ensure accurate host information
- Copy listener.service to systemd
Change user and script path inside listener as necessary
sudo cp listener.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable listener.service
sudo systemctl start listener.service
in MySQL:
create database deployment;
create user 'deploy'@'localhost'
grant select, update, delete, insert on deployment.* to deploy@localhost;
load .sql file into db
mysql -u root -p deployment < /path/deployment.sql
The two APIs being used for free are CoinMarketCap and CryptoCompare < br>
Nayeem Kamal - Front, Back, DMZ, SQL - NHK6
Jared Myers - Deployment, Back End - JM 297
Parnell Provilon - Front End - PDP72
James Lupo - Back End, SQL - JAL97
Ibrahima Diallo - Front End - ID55