A Digital Voting System
- Clone the repository
- Create a Python Virtual environment and activate it!
- Run
pip install -r requirements.txt
in the environment to install all the dependencies and libraries. - create an
.env
file in the project directory to add all the environment variables.
-
Create a firebase project and get all the configurations of the project from
Project Settings
. -
Navigate to the Authentication section in your firebase project and enable the
Email and Password
authentication. -
The Configuration is as follow :-
config = {
"apiKey": YOUR_API_KEY ,
"authDomain": YOUR_AUTH_DOMAIN,
"databaseURL": YOUR_DATABASEURL,
"projectId": YOUR_PROJECT_ID,
"storageBucket": YOUR_STORAGE_BUCKET,
"messagingSenderId": YOUR_MESSAGING_SENDER_ID,
"appId": YOUR_APP_ID,
"measurementId": YOUR_MEASUREMENT_ID
}
- Now in you
.env
file include the following parameters as it is :-
export FIREBASE_APIKEY=YOUR_API_KEY
export FIREBASE_AUTHDOMAIN=YOUR_AUTH_DOMAIN
export FIREBASE_DATABASEURL=YOUR_DATABASEURL
export FIREBASE_PROJECT_ID=YOUR_PROJECT_ID
export FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET
export FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER_ID
export FIREBASE_APP_ID=YOUR_APP_ID
-
Create a mongodb cluster in MonDB Atlas and the add the required configurations in the
.env
. -
Now in you
.env
file include the following parameters as it is :-
export ENVIRONMENT=prod
export APP_SECRET_KEY=ANY_SECRET_STRING
export MONGO_URI=YOUR_MONGO_URI
export MONGO_USERNAME=YOUR_MONGO_USERNAME
export MONGO_PASSWORD=YOUR_MONGO_PASSWORD
export DB_NAME=YOUR_DB_NAME
- If you want to use dev mode you can put the following in the
.env
instead (make sure to run the mongodb in local):-
export ENVIRONMENT=dev
- To run the project just run
./start_server.sh
in git bash terminal.