Secure voting directly from a mobile phone
TypeScript
React Native
Expo
Node
Have node js installed then run the following commands to install yarn, expo and typescript globally.
npm install expo-cli --global # install expo globally
npm install yarn --global # install yarn globally
npm install typescript --global # install ts globallyDownload Redis, for windows download or installer go HERE or for a manual download for other platforms click HERE
Download Android Studio to utilize virtual device, after installed watch this video for help
Use xcode for ur virtual device which will be ios, if you need help getting a virtual ios device running you can probably find something online to help
you do not need to even use a virtual device, download the expo go app on your phone. When starting the mobile app run yarn start and scan qr code and the app will open on your phone
Make sure your device is running at this point in time, it just has to be on and open.
Next go to the directory in which you want to run / install this project and run the following commands
git clone https://github.com/adushaj2022/VoteSafe.git
cd mobile
yarn install # install dependencies using yarn
yarn start # for expo option
expo start --android # starting the app
# or for ios
expo start --iosThere is one more thing you need to do, go into ./mobile/api/config.ts
export const _http = axios.create({
baseURL: "",
});Change the baseURL to http://{yourIpAddress}:{nodeServerPort}/ If you do not know your ip run ipconfig :)
cd server
npm install # if there are dependencies missing
npm run build # compile typescript
npm start # run appDownload postgresql on your computer, make sure you know your password, keep port on 5432 this is default just do not change it. After setting up your .env file (see below), please create a database called 'votesafe', when starting the server the databases will be created automatically
Go to root file directory and enter the commands
cd server
touch .env # bash
ni .env # powershell.env file contents can be found in discord
Instead of stopping the server, compiling typescript, then restarting the server. We can do the following. Open up a new terminal and run the following
npm run watchNext leave that terminal open and open a new one, and run the following
npm run devNow it will watch for changes and recompile for you :)
Native Base
Navigation
Expo
Redux
Create a branch of your own and submit pull requests that will then be reviewed