This is the repository for SIH 2020 project by team tollblocks, which is a web application for effective toll processing and management, using a hybrid blockchain based stack to process toll payments and simulate a road contract, preventing corruption and increasing transparency, throughout the stakeholder chain from vehicle owner to government.
- Ninad Manjaramkar
- Snehal Naikare
- Vineet Shinde
- Rohit Nawale
- Kaustubh Patil
- Disha Shinde
-
node js & npm [LTS preferably].
For windows, the GUI based installer works well.
For linux, install NVM to manage nodejs installations easily.
-
Angular CLI
npm install -g @angular/cli
-
Python packages:
pip install Django==2.2
pip install djangorestframework
pip install django-cors-headers
pip install pyjwt.
pip install web3
-
MySQL server [workbench is optional, but recommended]
- ubuntu
How To Install MySQL on Ubuntu 18.04 | DigitalOcean
- windows
MySQL :: MySQL and Windows :: 1 Installing MySQL on Microsoft Windows
-
Postman [optional but recommended]
Postman | The Collaboration Platform for API Development
install angular CLI using npm.
npm install -g @angular/cli
Clone the repository at a convenient location.
Open cmd/bash and navigate to tollblocks-webapp/client/ folder inside cloned repository.
Perform npm install.
npm install
run the command npm start to start the angular server.
npm start
[Optional] Create a virtual environment, and activate it.
install prerequisite packages using pip. (refer prerequisites)
Clone the repository at a convenient location.
Open cmd/bash and navigate to backend_root folder inside cloned repository.
Delete migrations folder if exists.
Before proceeding to next step, ensure all database steps are done.
make migrations
migrate
runserver
python manage.py makemigrations testing
python manage.py migrate
python manage.py runserver 8080
create a database(schema) for toll_blocks.
create a new user with name and credentials.
grant privileges to user created.
Flush.
CREATE DATABASE toll_blocks;
CREATE USER 'dbadmin' identified by ‘password’;
GRANT ALL ON toll_blocks.* to 'dbadmin'@'%';
FLUSH PRIVILEGES;
run postman and send a request to the endpoint localhost:8080/test/api/addministry with payload
{
name: "some name",
email: "ministry",
password: "some password",
}