This repo holds the APIs that powers the front end of Leto Car pooling E-hailing application
- Install
XAMPPor its equivalent - clone this repo in the
htdocsfolder or its equivalent - Install php composer for dependency management
- run
composer installin the root folder to download all dependencies - Set up your
.envfile following the.env-exampleprovided. Only change the variable values. This is because theUtility::getEnv()function will return an Object with properties, for example,dbNameforDB_NAME, in the.envfile; and these are already used somewhere. I am sure you don't want things to crash. - Set up your
/api/includes/passwords.inc.phpfollowing the/api/includes/example-passwords.inc.php. You will notice that you need the password for Leto's email and your own twilio account SID and auth token. Also, the firebase and google maps credentials too. - create a MySQL database with the name in your
.envfile to hold the information from the API. Put the database credentials in the.envfile. - Turn on your servers and from the root directory, run
php ./api/database/migration.phpto create the database. Each time you run this command, the database is dropped and recreated. - You can install the VS Code extension called
Thunder Clientfor making API requests and testing. Also, you can usePostman.Postmanwill be used for general testing of the API.
- phpmailer/phpmailer: For handling Emails
- yidas/google-maps-services: For google maps api services from PHP.
- kreait/firebase-php: For firebase interaction from the server
- rmccue/requests: For wrapping http requests. Staying away from raw cUrl
This was my first IS project in the 3rd year of University (Strathmore University) when I pursued a BSc in Informatics and Computer Science. Notice I am using vanilla PHP