Skip to content

ItaiLash/ourGovernment-React

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

OurGovernment official web app


View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contact
  4. External docs

About The Project

The executive branch, or government, is typically not elected directly by the people, but rather formed by another elected body or person such as the parliament or the president. As a result, its members are not directly accountable to the people, individually or as a group. Indeed, in coalition systems, following coalition negotiations, each party in the coalition gets a group of ministries which, in turn, have to be populated by ministers. We consider a scenario in which the members of the government are elected directly by the people, and wish to achieve proportional representation while doing so. The project includes a system for electing ministers in the government, a research paper that analyzing the results of the algorithm and an application that will present the algorithm.

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

For development, you will only need Node.js, npm and python installed on your environement.

  • For the Client side:
    • To download the latest version of npm (include Node.js), on the command line, run the following command:
      npm install
      or visit https://nodejs.org/en/
    • To see if you already have Node.js and npm installed and check the installed version, run the following commands:
      node -v
      npm -v
  • For the Server side:
    • To see if you already have python installed and check the installed version, run the following commands:
      python --version
    • If pip is not installed on your computer, download it via the following link: https://pip.pypa.io/en/stable/installation/

Installation

  1. Clone the repo

    git clone https://github.com/ItaiLash/ourGovernment-React.git
  2. Open the repo in two different terminals (one to activate the server and another one to activate the web app).

  3. Activating the server:

    • First, go into the Server folder: cd Server

    • Then, you need to install some packages for the server:

      • Django pip install django
      • Django REST framework: pip install djangorestframework
      • django-cors-headers: pip install django-cors-headers
      • CORScanner: pip install cors
      • opempyxl - pip install openpyxl
    • Inside the Server directory run the command python3 manage.py runserver

    • You are supposed to see:

      Logo
  4. Activating the web app:

    • First, in the second terminal go into the Client folder: cd Client

    • Then you need to install all our packages for the web app: npm install

    • Run the webpage via the other terminal by entering npm start command.

    • You are supposed to see:

      Logo

Running the algorithm

  1. On the website itself, click on the Demo  button that will take you to another page.
  2. On the demo page, enter the following parameters in the appropriate textboxes:
    • Number of offices.
    • The maximum number of candidates for any office.
    • Number of voters. Click submit.
  3. A number of cards will open and in each tab the name of the office and the names of the candidates must be entered. Click next (note that there is a delay of 5 seconds until the next component is received).
  4. After a few seconds more cards will open where each voter's name and his choices (preferences) must be entered. Click done (here too there is a delay of 5 seconds).
  5. The results of the algorithm run will be displayed on the screen and there will be a link to download explained results.

(back to top)

Contact

Project Link: https://github.com/ItaiLash/ourGovernment-React

(back to top)

External docs

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •