Skip to content

easterjd/gro-city-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gro-city-backend

About

  • gro_city_backend is intended for accessing plant data, board_data for gro_city users.

Description

  • DB has 4 tables.
  • Here the users are allowed to signup and login
  • Create, Read, Update, Delete boards which keeps the information about plants in them.
  • Search for plants
  • Add plants to boards

ERD

erd

Routes

  • Header
    • Authorization is sent as Bearer token
    • Content-Type: application/json
User routes
Purpose Request Type Route body Authorization
user signup post https://gro-city-backend.herokuapp.com/api/users/signup {first_name, last_name, email, password} -
user login post https://gro-city-backend.herokuapp.com/api/users/login {email, password} required
Board routes
Purpose Request Type Route body Authorization
get all boards get https://gro-city-backend.herokuapp.com/api/boards/ - required
get one board get https://gro-city-backend.herokuapp.com/api/boards/:id - required
create one board post https://gro-city-backend.herokuapp.com/api/boards/ {title} required
update one board patch https://gro-city-backend.herokuapp.com/api/boards/:id {title} required
delete one board delete https://gro-city-backend.herokuapp.com/api/boards/:id - required
create one plant for a board post https://gro-city-backend.herokuapp.com/api/boards/:id/plants/:plant_id - required
delete one plant from a board delete https://gro-city-backend.herokuapp.com/api/boards/:id/plants/:plant_id - required
Plant routes
Purpose Request Type Route body Authorization
get all plants get https://gro-city-backend.herokuapp.com/api/plants/ - required
get all plants in a page get https://gro-city-backend.herokuapp.com/api/plants/:page - required

Plant data

Individual plant data

Installation

  1. Fork and/or Clone this repository

  2. npm install

  3. mv .env.sample .env

  4. createdb gro_city_backend_dev && createdb gro_city_backend_test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors