Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 3.21 KB

README.md

File metadata and controls

94 lines (65 loc) · 3.21 KB

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. Runs on Koyeb. Serverless PostgreSQL database supported by CockroachDB. Tested via Minitest - GitHub repo
  • React with GraphQL + Apollo Client for frontend. Deployed on Netlify - GitHub repo

Rails Server

ruby Rails GraphQL PostgreSQL

Ruby gems (non exhaustive)

graphql graphiql-rails bcrypt rack-cors ar-lazy-preload dotenv-rails graphql-query-resolver

Run Locally

Clone the project

  git clone [email protected]:maricalmer/maricalmer.github.io.git my-project-frontend
  git clone [email protected]: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

Visit the page!

plant-clinic

License

MIT