barebones setup for JavaScript / Node projects replace this with a one-liner phrase describing this project or app
Transafe is an app built with ionic+angular+firebase both in web and android that helps to mitigate road accidents in Ghana
The project is split into 3 parts:
-
The Front end web
-
Capacitor Android
-
The Firebase backend
According to the article http://africanreality.over-blog.net/2019/11/road-accidents-the-case-of-ghana.causes-solutions-and-lessons-for-africa.html, the number one cause of death and injuries on the road is due to human error (80% of accidents) and the number one cause of death on the road is driver over speeding according to the article .Therefore a solution to check, alert and report overspeeding will go a long way in preventing and reducing road accident injuries and deaths on our roads.
The APP seeks to be checking and alerting user of over speeding in real time. Add over speeding record to the vehicle profile and rating on the app with details including date and time, location of over speeding, actual speed, actual speed limit, duration of over speeding. Make over speeding report to the law enforcement agency.
The APP seeks to address the problem statement 2 of Goal 3 of the SDG's.
The APP need have to be installed on user's phone. Currently is a web app and the link is https://transafe-a15f3.web.app/. Opening the APP for the first time will take user through profile setup and phone verification. User can then click on the TRACK button just below lower right side of the ]
]speedometer, complete dialogue form and start tracking. The APP will require user to grant access to turn user's phone location on which is require for accurate monitoring of over speeding. The APP when installed will do among others the following
- Monitor and notify user of over speeding during travel
- Compute the percentage risk level of the user to road accidents based on the user's history of over speeding.
- Show graphical trend of user's over speeding history
- Discover other user's and vehicles's risk level due to over speeding.
This project depends on Nodejs and Node Package Manager (NPM). Before continuing, you must download and install Node (NPM is included) from https://nodejs.com/en/download.
The Ionic Command Line Interface is required to serve and build the frontend. Instructions for installing the CLI can be found in the Ionic Framework Docs.
This project uses NPM to manage software dependencies. NPM Relies on the package.json file located in the root of this repository. After cloning, open your terminal and run:
npm install
npm i is shorthand for npm install
Copy the firebase credentials from the firebase platform and past the values in the environment.ts files. You can store each secret keys in the environment variable in windows or a use a profile in macos and then reference it in the envirnoment.ts file in the project. You can check it out here 'How to Set Environment Variables in windows 10'
Sometimes you may need to restart your pc before the changes to the environment variable take effect Be sure not to commit the secret keys to github!!!!!!
// if in your environment variable you set apiKey reference to be API_KEY, then the reference would be process.env.API_KEY
export const environment = {
production: false,
firebase: {
apiKey: process.env.Transafe_api_key,
authDomain: process.env.Transafe_authdomain,
databaseURL: process.env.Transafe_database_url,
projectId: process.env.Transafe_project_id,
storageBucket: process.env.Transafe_storage_bucket,
messagingSenderId: process.env.Transafe_messaging_sender_id,
appId: process.env.Transafe_app_id,
measurementId: process.env.Transafe_measurement_id
}
}
Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, and the web. We call these apps "Native Progressive Web Apps" and they represent the next evolution beyond Hybrid apps Documentation on capacitor can be found at Capacitor Documentation and Ionic android and ios configuration for capacitor
open your terminal and run:
cd TranSafe
ionic integrations enable capacitor
Before You can open android studio with capacitor, you need to build the ionic project at least once. You must build your Ionic project at least once before adding any native platforms open your terminal and run:
ionic build
Every time you perform a build (e.g. ionic build) that changes your web directory (default: www), you'll need to copy those changes down to your native project(android): open your terminal and run:
cd TranSafe
npx cap copy
open your terminal and run:
cd TranSafe
ionic serve
Below are the team members who contributed to the project
-
FullName: Christian Bosso Github: penbosso Role: Front-Ened Developer Email:Chris-bchristiankelein@gmail.com Phone:0248470214
-
FullName: Pius Gyamenah Linnaeus Github:linhobs Role: Back-End Developer Email:Pius-gyamenahyawpius@gmail.com Phone:0546888899
-
FullName: Michael Hammond Github: mickeymond Role: Back-End Developer Email:mickymond@gmail.com Phone:0248470214
-
FullName: Diana Kerubo Github: Deekerubo Role: Mentor Email:dianakerubo24@gmail.com
-
FullName: Ernestina Tawiah Github: ErnestinaTawiah Role: Front-End Developer Email:tawiah.ernestina.l@gmail.com
-
FullName: Anold Anyor Github: Quame-Magma Role: Front-End Developer Email: anoldanyor@gmail.
-
FullName: Ian Cecil Mawuli Akoto Github: iancecilakoto@gmail.com Role:Full stack developer Email:iancecilakoto@gmail.com
-
FullName: Fareed Mohammed Github: Arshir Role:Technical Team Lead(TTL) Email:send2fareed@gmail.com
If this project sounds interesting to you and you'd like to contribute, thank you! First, you can send a mail to buildforsdg@andela.com to indicate your interest, why you'd like to support and what forms of support you can bring to the table, but here are areas we think we'd need the most help in this project :
- area one (This APP is about avoiding,reducing,reporting,monitoring road accidents and injuriy on our roads and we will be extremely grateful if you share with us any useful feature not available in the APP that can be added to make the APP more suitable to achieving its purpose))
- area two (This APP can be made better and more aligned to its purpose through numerous testing and continuous testing. We will be grateful if you can volunteer to be one of the users who will like to test the APP in the staging phase.)
- area three (To join our end-of sprint webinar, and provide feedback as a stakeholder, kindly an email to the TTL (send2fareed@gmail.com) and the zoom link will be shared with you.)
Did you use someone else’s code? Do you want to thank someone explicitly? Did someone’s blog post spark off a wonderful idea or give you a solution to nagging problem?
It's powerful to always give credit.
MIT