plant-clinic, a copycat of the subreddit r/plantclinic powered by GraphQL API
Description
The core function of plant-clinic is to diagnose sick plants. If a user wonders "what's wrong with my plant?", the community helps diagnose and treat it! A registered user can:
- create a post including picture of the plant
- comment on a post
- scroll through posts list
- search for posts within posts list
Web App
plant-clinic is developed using:
- Rails API with GraphQL for backend. Supported by PostgreSQL database and running on Heroku. Tested via Minitest - GitHub repo
- React with GraphQL + Apollo Client for frontend. Deployed on Netlify - GitHub repo
React Client
JS Packages (non exhaustive)
APIs
Run Locally
Clone the project
git clone git@github.com:maricalmer/maricalmer.github.io.git my-project-frontend
git clone git@github.com:maricalmer/maricalmer.github.io.git my-project-backend
Go to the project directory and remove git logs
cd my-project-frontend
rm -rf .git
cd ..
cd my-project-backend
rm -rf .git
Install dependencies
bundle install
yarn install
cd ..
cd my-project-frontend
yarn install
Make sure you have ./node_modules/.bin in your $PATH:
echo $PATH
# You should see `./node_modules/.bin` in the list
If it's not the case, add it:
cd ~/code/dotfiles/<your_github_nickname>
echo 'export PATH="./bin:./node_modules/.bin:${PATH}"' >> zshrc
cd ~/code/<your_github_nickname>/my-project
source ~/.zshrc
Start the server
cd ..
cd my-project-backend
rails s
In a new terminal
cd ..
cd my-project-frontend
yarn start