Skip to content

book-worm-2010/book-worm-be

Repository files navigation

Contributors Issues book-worm-2010

book-worm-be

About this App

book-worm-be is the server-side application of BookWorm. It stores some information on users and the books they are reading as well as their 'bookmarks'. This app consumes the Google Books API and exposes relevant information for the front-end side of BookWorm.

Goals accomplished

Consumed Google Books API Robust unit and integration testing to ensure data quality
Navigate working together with a larger application base with many moving parts
Learned application design from the perspective of users' needs
Setup continuous integration and deployment with CircleCI
Deployed on Heroku(see endpoints)

Versions

  • Ruby 2.7.1

  • Rails 6.1.3.1

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgements

Built With

Getting Started

Installation

  1. Fork and Clone the repo
    git clone [email protected]:book-worm/book-worm-be.git
    
  2. Install gems
    bundle install
    
  3. Setup the database:
    rails db:setup
    

Endpoints

Student Info

GET https://book-worm-be.herokuapp.com/api/v1/students/login
{"email": "[email protected]", "name": "Example Student"}

Student's Books

GET https://book-worm-be.herokuapp.com/api/v1/students/books {"id": "123", "status": "reading"} status options - 'reading', 'finished', 'abandoned' no status defaults to all books

Search Books

GET https://book-worm-be.herokuapp.com/api/v1/books {"title": "Harry Potter and the Sorcerer's Stone", "author": "J. K. Rowling"}

Add Book to Student

POST https://book-worm-be.herokuapp.com/api/v1/student_books {"student_id": 1, "prediction": "This is my prediction", "book": { "title": "Harry Potter and the Goblet of Fire", "author": "J.K. Rowling", "pages": 345, "isbn": "233872373", "image": "https://..."} }

Create Bookmark

POST https://book-worm-be.herokuapp.com/api/v1/bookmarks {"student_id": 1, "book_id": 1, "date": "this is a date", "minutes": 30, "page_number": 45, "notes": "these are notes", "reaction": "this is a reaction"}

Find Bookmarks for a Specific Book

GET https://book-worm-be.herokuapp.com/api/v1/students/bookmarks {"student_id": 1, "book_id": 1}

Finish/Abandon a Book

PATCH https://book-worm-be.herokuapp.com/api/v1/student_books/:id {"student_id": 123, "book_id": 4, "status": "finished", "review": "4", "review_comment": "A pretty good book, but I didn't like the ending."}

Database Schema

Screen Shot 2021-04-19 at 3 02 03 PM

Future Iterations

Web push notifications when a friend starts and finishes a book.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published