PlantPal is a user-friendly platform designed to help plant lovers, whether they are beginners or seasoned enthusiasts, provide the best care for their plants. Our website offers personalized plant care tips that are tailored to the specific needs of each plant species.
With PlantPal, you can easily manage your plants' watering schedules, understand their sunlight requirements, and follow expert guidance to ensure they thrive. Our goal is to make plant care simple, intuitive, and accessible for everyone, so you can keep your plants healthy and happy with minimal effort.
- React
- Express
- Node.js
- MySQL
- Redux
- Material UI
You need to create a .env file and add variables for the following:
- MYSQL_HOST
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_DATABASE
- PERENUA_API_KEY
- Install mysql
brew install mysql
- Start mysql services with with
brew services start mysql
- run installation with
mysql_secure_installation
You have to create a user and database that matches the .env
file configuration so that the website can connect.
- Install npm dependenicies with
npm install
- Build the application with
npm run build:dev
- Run server and client
npm run dev
- Access the website at https://localhost:3000
Method | Endpoint | Description | Required Queries/Body Parameters |
---|---|---|---|
GET | /auth/isAuthenticated | Checks if a user is authenticated | None |
POST | /auth/register | Creates a new user account. Checks if the email is already in use | email , password |
POST | /auth/login | Logs in a user. Checks if the email and password are correct | email , password |
POST | /auth/logout | Logs out a user |
Middleware | Description |
---|---|
requireAuth | Middleware for checking if a user is authenticated |
Method | Endpoint | Description | Required Queries/Body Parameters |
---|---|---|---|
POST | /plants/add | Adds a plant to the user's profile | id , plantName , wateringFrequency , lastWatered , imageURL , imageFile |
POST | /plants/delete | Deletes a plant from the user's profile | plantName |
POST | /plants/update | Updates a plant in the user's profile | plantName , lastWatered |
GET | /plants/get | Retrieves all plants associated with the user | None |
GET | /plants/search | Searches for plant species | query |
GET | /plants/care_advice | Retrieves care advice for a specific plant | query |