View Demo | Offical Website | Report Bug | Request Feature
In response to the pandemic, Covid-19 caused a huge spike in bicycle sales. Because of increased concern about public transit and a need for physical activity, an increasing number of people are opting for one of the most basic modes of transportation, resulting in a so-called "bike boom.” Along with the increase in cycling came a huge drop in greenhouse gas emissions, which plunged to 4.6 percent in 2020. However, when the Covid-19 limitations were lifted and people returned to in-person school and work, bike use has declined, leading in an increase in automobile usage. What was thought to be a permanent decrease in emissions was nothing a blip, with global greenhouse gas emissions rising above pre-pandemic levels in 2021 and onwards. Zero emission vehicles are expensive and not accessible for everyone. Thus, it is necessary to generate a solution to which everybody in the world could contribute.
Unitify is an App run on Android and IOS. We hope it could encourage people use cycling as their main public transit mode therefore preventing greenshouse gas emissions.
frontend
All the source code for Unifity App modules. Make sure you follow the software builds instruction below before you run it with Expo Go.backend
This is where you can find our data scheme on MongoDB and APIs for connecting from Unitify App to backend.
-
You should run all command below under
frontend
.cd frontend
-
Follow Expo Installation Guide to install all required tools on your development environment.
-
Install all dependencies.
- expo-cli
npx expo install
- or npm
npm install
- or yarn
yarn install
- expo-cli
-
Configure your expo app.
- Please find these two configurations files under
frontend
folder.. ├── frontend/ │ │ │ ├── app.json │ └── config.json │ └──... └── ...
- app.json - Follow instructions on Expo MapView Instruction to configure Google Map API Services for Android and IOS.
- config.json - Copy the same API Key from Google Cloud Credential manager to
GOOGLE_MAP_API
, and add your backend host url toBACKEND_URL
(intruction introduced below).
- Please find these two configurations files under
-
Build your project locally.
- expo-cli
npx expo start
- or npm
npm start
- or yarn
yarn start
- expo-cli
-
Open your project on Expo Go (Android/IOS).
-
Set up environment.
- Ubuntu 20.04
- MongoDB 5.0.9
- Nginx 1.18.0
- Redis 5.0.7
-
Installation instructions.
-
Clone the repo.
git clone https://github.com/VictorS67/unitify.git
-
Switch to the backend branch (for the latest version of backend, or you can get the stable version in the main branch).
git checkout backend
-
Install all the necsessary node libraries and dependencies.
npm install
-
Now, you need to set up the necessary environments: Run this code first to copy from the .env template:
cp .env-sample .env
MONGODB_URI=YOUR_MONGODB_CONNECTION_STRING SIGNATURE_CHAR_LIMIT=THE_CHAMPION_SIGNATURE_LENGTH_LIMIT CHECK_CHAMPION_CRON=CRON_FREQUENCY_OF_CHECKING_CHAMPION UPDATE_RANKS_CRON=CRON_FREQUENCY_OF_UPDATING_LEARERBOARDT PORT=PORT_THE_BACKEND_IS_RUNNING
-
-
Run the backend server.
-
Now, after the above steps, you can run the backend:
node unitify-server.js
-
And you can verify by running:
localhost:PORT/hello-world
-
You should be able to see the following output in your browser:
Congratulations, the Unitify backend is now running.
-
-
Production Builds.
-
If you want to run the app in the backend (production), you can run the following command, but make sure that you have PM2 installed in your ubuntu machine (you can use this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps):
-
pm2 start unitify-server.js
-
Here are our team members!
The Unitify source code is made available under the MIT license. Some of the dependencies are licensed differently, please check them on Expo, react-native-maps, react-native-google-places-autocomplete, react-native-paper, react-navigation.