An app for identifying plants. By taking a picture or uploading a photo of a plant it will suggest the best result from the plant.id API.
This app was a solo project for the CodeWorks coding bootcamp and was built within a week. Presentation of the app is here
This app is built for testing and educational purposes and is not intended to be published. Built using React-Native with Expo and Firebase authentication for the front-end. Node JS, Express, MongoDB with Mongoose for the back-end. I had used Ngrok to publicly service the localhost for testing. Requests from back-end sent to plant.id API to identify plants.
To run this clone the repo and run npm install in both the client and server directories.
-
You will need an API key from plant.id API. API documentation can be found here. Edit the API key in
server/ApiService.js -
You will need to setup a firebase project for the authentication and modify
client/firebase.jswith your own firebase configuration. Head over to firebase for instructions to setup a new project with the environment variables. Create a.envfile at the root project folder with the variables:
EXPO_PUBLIC_API_KEY={Your API key here}
EXPO_PUBLIC_AUTH_DOMAIN={Your Auth Domain here}
EXPO_PUBLIC_PROJECT_ID={Your Project ID here}
EXPO_PUBLIC_STORAGE_BUCKET={Your Storage Bucket here}
EXPO_PUBLIC_MESSAGING_SENDER_ID={Your sender ID here}
EXPO_PUBLIC_APP_ID={Your App ID here}
EXPO_PUBLIC_MEASUREMENT_ID={Your measurement ID here}
-
It is best to setup an NGROK server which is a public server that mimics your localhost for the back-end. Sign up and instructions here. When running an ngrok server you will get the url. Change the url in
client/baseUrl.js -
It is recommended to use the expo-cli to run the app. To download this run
npm install -g expo-cli -
You can download Expo Go from the Google Play or iOS store on your phone. To run the app on your phone, run
expo start --tunnel -
Once started, a QR-code will be displayed in the terminal which your Expo Go app can scan and run the app.
For this solo project the following was used:
- React Native with Expo
- Firebase Authentication
- PlantID API for plant identification
- MongoDB for database with Mongoose ORM
- NGROK for localhost servicing