VoteSub is a webapp(SPA) where users can create new subjects and add respective candidates or/and vote to their favorite candidates of particular subject, all in realtime.
Click on the following link to visit Preview Channel(Testing Ver.) of VoteSub project
https://kiranbansode-votesub--testing-dw5bf5c5.web.app/
Disclaimer: The
Preview Channel
contain some code or functionality which you will might or might not find on GitHub'stesting
branch. Once underlying code reach it's maturity level, I will slowlypush
it totesting
branch.
Soon you will have access to Live Channel(Production Ver.) of VoteSub project since project is near completion.
Just follow the below instructions step by step to test VoteSub locally.
- Open any terminal to your desired location.
- Type
git clone https://github.com/kiranbansode/votesub.git
in your terminal. Make sure you already installedgit
on your machine. - You can also use
GitHub CLI
. To use it, make sure you first install it and give necessary permissions. Then typegh repo clone kiranbansode/votesub
To install project related dependencies you first need to understand it's folder structure. This project can be divided into 2 parts. Frontend and the Backend or more specifically Firebase's Cloud Functions.
When you open to project's folder by default you will be in the Frontend section. Just open terminal in project's root directory and follow the below instructions.
- Use
yarn
oryarn install
ornpm install
to install all required dependencies. - Once all dependencies are installed, type
yarn dev
ornpm run dev
command to start development server. You can also use--host
flag likeyarn dev --host
ornpn run dev --host
to run project on locally connected devices on your network like mobile phones. - Once you start the development server you can view VoteSub webapp at
localhost:3000
.
Now you need to install dependencies for Backend or Firebase's Cloud Functions. To install required dependencies you first need to go to functions
folder. So follow to below instructions.
- Open terminal in project's root directory.
- Type
cd functions
, to go to functions folder. - Use
npm install
to install necessary dependencies.๐ DON'T use yarn ๐
here. - To run backend related code, first you need to compile them. REMEMBER! that project is built using
TypeScript
. - To compile to code you need to use
npm run build
. After it successfully compiles you will find related code inlib
folder. - You can also
npm run build:watch
command to compile the code as you make any changes to codebase.
Once all required dependencies are installed and Cloud Functions code is compiled you need to setup Firebase Emulators to use Authentication, Cloud Functions, Firestore Database and many more. To start the Firebase Emulators follow the below instructions.
-
Open terminal inside project's root repository.
-
To run Firebase Emulators, we need to install
firebase-tools
package globally. To install it globally useyarn global add firebase-tools
ornpm install -g firebase-tools
command if you are using npm. This way you can usefirebase
anywhere regardless of any directory. Make sure you give necessary permissions to allow global installation likesudo
or anything like administrative stuff. -
To run Firebase Emulators, use
firebase emulators:start --export-on-exit=./emulators_data/ --import=./emulators_data
command. Lets understand what this command exactly do.emulators:start
- It will start Firebase Emulators onhttp://127.0.0.1:4000/
--export-on-exist=./emulators_data/
- When you exist the Firebase Emulators, it will save all stored data at./emulators_data
folder.--import=./emulators_data
- When you start the Firebase Emulators in future, it will import all previously saved data from./emulators_data
.
If you get the error like Directory "/home/kiranbansode/votesub/emulators_data" does not exist.
Don't worry! Just create a folder name emulators_data
inside project's root directory
Now the project is ready to use.
Click on the following links to visit respective resources of VoteSub like Web Designs, wireframes, Trello and many more
- Wireframes - Draw.io (Download and Import to Diagrams.net)
- Web Designs - Figma
- Software Development Lifecycle(SDLC) Progress - Trello
- to show my students the power of Computer technologies(yes, I was a Teacher)
- create a webapp where my students can vote their favorite teacher or school subject(original idea for VoteSub) depending on weekly performance or teaching styles of teachers
- want to impress my future employers or HR by showing my development skills
- give votes to favorite candidates of particular subject from vote bank
- register according user type. (different user will have a slightly different registration form )
- create new subjects and candidates for other users to vote
- view realtime votes
- view voting history on daily basis separated by each subject and number of total votes given to a particular candidate
- view information using Profile page
- remaining votes counter(realtime)
- Admin Panel where subject owner can do CRUD operations
- Settings Page where users can change appearance of VoteSub
- Entire backend will be re-written using Node.js, Express, MongoDB or PostgreSQL and will be hosted on Bare metal servers