Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chanda-abdul/bloom-api
https://github.com/chanda-abdul/bloom-api
express heroku knex nodejs postgresql
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chanda-abdul/bloom-api
- Owner: Chanda-Abdul
- Created: 2020-07-07T07:38:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T03:17:38.000Z (almost 2 years ago)
- Last Synced: 2023-03-04T21:31:36.218Z (over 1 year ago)
- Topics: express, heroku, knex, nodejs, postgresql
- Language: JavaScript
- Homepage:
- Size: 1.46 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Thinkful Full Stack Capstone - Bloom App API Server
## Programmer
Chanda Abdul## Summary
While enrolled in Thinkful's Web Development bootcamp I created this Full-stack Capstone project. Bloom is an interactive web application that was created to view and manage your plant collection. This app was created so that you can view all of your plants, and keep track of thier care and maintenance.
## Bloom Client
Link to the [Client Repo](https://github.com/ChandaHubbard/bloom-client)## Technology Used
#### Front-end
- React
- Router
- Context
- Axios
- Libraries
- Sweet Alerts
- HTML
- CSS
- Vercel(Zeit)#### Back-end
- Node.js
- Express
- Knex
- Mocha, Chai & Supertest
- Morgan, CORS, Helmet
- PostgreSQL
- Elephant SQL
- Heroku#
# Bloom API
- Bloom's back-end consists of an API server that was created with Node.js, Express, Knex, and PostgreSQL
- Bloom's API service consists of `/GET` `/DELETE` `/POST` and `/PATCH` endpoints- The API was created locally and deployed to heroku. The deployed API can be accessed through heroku
[here](https://polar-sierra-05851.herokuapp.com).### /GET at `/plants`
The user can access the `/GET` endpoint through the client by visiting the `/view` page and all plants will be displayed. The `/GET` endpoint can also be accessed at `/plants` on the back-end through the heroku server at [https://polar-sierra-05851.herokuapp.com/plants](https://polar-sierra-05851.herokuapp.com/plants).### /GET at `/plants/:id`
The `/GET/:id` endpoint can be accessed at `/plants/:id` on the back-end through the heroku server at [https://polar-sierra-05851.herokuapp.com/plants/:id](https://polar-sierra-05851.herokuapp.com/plants/85).### /DELETE at `/plants/:id`
The `/DELETE` endpoint is used to delete specific plants by id. The user can access the `/DELETE` endpoint through the client by visiting the `/view` page and selecting the Delete button next to the plant that they would like to delete. The `/DELETE` endpoint can also be accessed at `/plants` on the back-end through the heroku server at [https://polar-sierra-05851.herokuapp.com/plants](https://polar-sierra-05851.herokuapp.com/plants).### /POST at `/plants`
The user can access the `/POST` endpoint through the client by visiting the `/add` page and filling out the form then selecting the Add plant! button. The `/POST` endpoint can also be accessed at `/plants` on the back-end through the heroku server at [https://polar-sierra-05851.herokuapp.com/plants](https://polar-sierra-05851.herokuapp.com/plants).### /PATCH at `/plants/:id`
The `/PATCH/:id` is used to update specifc plants by id and the endpoint can be accessed at `/plants/:id` on the back-end through the heroku server at [https://polar-sierra-05851.herokuapp.com/plants/:id](https://polar-sierra-05851.herokuapp.com/plants/75). -->#
### Bloom's API service consists of data that is stored in a PostgreSQL database
#- The database creation scripts can be found at `/migrations`
- The database is initially seeded with data that can be found at `/scripts/seeds`
- All tables are hosted remotely on ElephantSQL and can be accessed
[here]( postgres://xobyklgi:[email protected]:5432/xobyklgi)- The PostgreSQL database consists of four tables
- light_conditions
- maintenance
- water_level
- plant_information
- The tables share relations and can be joined with the PostgreSQL query of
````
SELECT pi.plant_name, pi.scientific_name, pi.plant_type, pi.details, ma.maintenance, wl.water, lc.light, pi.image_url
FROM plant_information AS pi
INNER JOIN maintenance AS ma ON pi.maintenance_level = ma.id
INNER JOIN water_level AS wl ON pi.water_requirements = wl.id
INNER JOIN light_conditions AS lc ON pi.light_conditions = lc.id;
````
#
## Other features to implement in future versions
- [ ] Incorporate the `/PATCH` endpoint into the client.