Skip to content

ninadfrenzy/SIH2020-angular-django-ethereum-tollblocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

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.

Contributors

Angular development

  • Ninad Manjaramkar
  • Snehal Naikare
  • Vineet Shinde

Django development

  • Rohit Nawale
  • Kaustubh Patil
  • Disha Shinde

Run Locally

Pre requisites

Postman | The Collaboration Platform for API Development

Frontend

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

Backend

[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

Database

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;

Create a ministry user

run postman and send a request to the endpoint localhost:8080/test/api/addministry with payload

{
    name: "some name",
    email: "ministry",
    password: "some password",
    
}