Forager is a plant identification and map-making tool created with Leaflet and the PlantID API. Take pictures of plants you see on your favorite hiking trail and learn about them, including history, original, edibal parts, and how to propogate them!
Link to live project https://forager-thsx.onrender.com/
Forager is made with HTML, CSS, JavaScript, MongoDB, and Leafletjs. Deployed to Render.io.
Leaflet.js is populated with custom icons generated by DALLEmini. When the user encounters an unfamiliar plant, they can use their phone's camera to take a photo, which is uploaded using the middleware Multer, encoded into base 64, and sent to the PlantID API, a wonderful machine learning/api resource that identifies the plant and returns information about the plant. The plant's scientific name is then sent to the Wikipedia API to obtain more information and a link to the full Wikipedia page.
Users can grow their map and keep track of how many plants they have discovered and learned about.
Obtaining a user's coordinates (with permission) is easy using the Geolocation API. However, passing the user's coordinates from the client to the database and back was a bit confusing at first. Eventually I settled on storing the coordinates into localStorage, then making a call to my backend/API through client-side JavaScript, running the localStorage coords through a validator on the backend, then saving them to MongoDB.