Below are some important steps to consider before launching your Transport Tracker system to a production environment.
Secure your Google Maps API keys
During development and testing, you can use a single, unrestricted API key for all the APIs in your Transport Tracker. When you are ready to move your application into production, you must create separate API keys for each type of API, so that you can secure the keys by HTTP referrer or IP address.
Follow these guides to create and secure your API keys, and add the new keys to each application in your project:
- For the Google Maps Roads API and the Google Maps Directions API, you need a server API key restricted by IP address. You can use the same API key for both these APIs, or a separate API key for each. See the guides to API keys for the Google Maps Roads API and for the Google Maps Directions API.
- For the Google Static Maps API, you need an API key restricted by HTTP referrer, and preferably secured by digital signature. See the guide to API keys for the Google Static Maps API.
Secure your Firebase Realtime Database
The Transport Tracker backend uses the Firebase Admin SDK for Node.js, which provides service accounts to write to the Firebase Realtime Database. This allows you to configure your Firebase Realtime Database such that only authenticated users are able to write to it. For more information on securing the database, see Firebase Realtime Database security rules, along with a recorded Google I/O talk from 2016.
Finalise user authentication in Firebase for the vehicle locator
Open your project in the Firebase console and go to the Authentication screen. Add an email address and password for each person who will use the Transport Tracker's vehicle locator app.
Allocate IDs to all vehicles or other assets
Install the Transport Tracker's vehicle locator app onto the relevant Android devices, and put a device into each vehicle that you're tracking. Allocate IDs to all the vehicles, and ensure that you or the drivers enter the applicable ID into the startup screen for the vehicle locator app. The IDs are useful for tracking the vehicles in the Transport Tracker's administrator's overview. For example, use the license plate number of each vehicle as the transport ID.