About the App
hopOn is flutter based application for car sharing and rental services.
The two main functions that app includes are -
- Rent a nearby car
- Give your car on rent
The app uses 3 Google Maps API
- Geocoding API (provides geocoding and reverse geocoding of addresses)
- Places API (returns information about places using HTTP requests)
- Directions API (returns JSON or XML-formatted directions between locations)
If user wants to rent a car he/she has to search for a dropOff location, after selecting a location(from suggestions) user gets the cost of ride with options to select pickup and dropOff dates.
After this information user gets a list of cars which are available in his/her nearby area. On the selection of any of the cars it shows all the information about car- owner's name, car's rent etc. After this you can pay and your ride will be booked.
For payments app uses Razorpay Demo platform (package in flutter)
Once the payment is done, it saves the data in Firebase Realtime Database. Along with saving ride history on user's end who has booked this ride, information about the rented car also gets saved on the owner side where he can see who has rented his/her car with some information about the ride. A User can cancel a ride anytime.
You can give your car on rent by just providing some information about the car your're registering like image, model name etc. It gets save in Firebase Firestore. After registerting your car you have an option to give your car on rent or to remove it from rent anytime you want.
1. Rent a car
2. Give your car on rent
3. Rented car's details
Some important things to note
- If you're trying to make changes or to contribute in this project, please make sure you have a brand new Firebase project and connect that with Google Cloud Platform to access maps features.
- Follow these steps if you're new to Firebase.
- GCP gives you $200 free on your first project, you just have to link your project with a billing account. Please follow official docs for more details.
- In GCP under API & SERVICES make sure you have enabled these 3 APIs along with API FOR Android/iOS.
- Test if your API key if working perfectly else restricts the keys with a particular API service.
- !!THE MOST IMPORATNT POINT!!
- Make sure your project is under Google Maps Platform services otherwise you can't have access to these APIs even if you have enabled it successfully. It will not grant permission to use the API and you'll get errors afterwards.
- If you have your project under GMP service(either you can use GCP or GMP for a project) your firebase project won't work here, so here is the solution we followed:
- We made a firebase project named as 'hopOnFirebase', we connected that with GCP(because firebase project only connects to GCP) and flutter app.
- We made another project "mapsProject" which follows GMP because it is a GMP project, now you can enable and use these 3 APIs.
- Generate your API key(restrict them to these 3 API services only).
- Your flutter app is connected to Firebase project "hopOnFirebase". Now you can use this API key(Key of "mapsProject" ) into you flutter app(connected with "hopOnFirebase")
- That's all!
- Feel free to ask your doubts and contribute to this project.
⭐the repo if you like the work! 🙌