Track books is a full-stack application that lets users track the books they're reading. This repo hosts the code for the backend of the application. To view the code for the frontend, go to Track Books (frontend).
- A user can signup and login.
- Logged in user can add books with title, total chapters and completed chapters as parameters.
- Logged in user can track books and increase the completed chapters.
- Logged in user can view the progress of each book in a circular progress bar.
https://track-books.herokuapp.com/api/v1
HTTP method | Endpoint | What it does |
---|---|---|
POST | /users | Create a user (Signup) |
POST | /sessions | Create a new user session (Login) |
GET | /books | Get all books |
POST | /books | Create a new book |
GET | /books/:id | Get a single book |
PATCH | /books/:id | Update a single book |
DELETE | /books/:id | Delete a single book |
- Rails
- RSpec
- PostgreSQL
To get a local copy up and running follow these simple example steps.
- Ruby 3.0.0
- PostgreSQL
# Clone the repo
git clone https://github.com/meronokbay/track-books-api/
# cd into the cloned repo
cd track-books-api
bundle install
# Create the database
rails db:create
# Run the migrations
rails db:migrate
# Seed the database with a test account (username: 'test_user', password: '123456)
rails db:seed
# Start the server
rails server
bundle exec rspec
👤 Meron Ogbai
- Github: @meronokbay
- Twitter: @MeronDev
- Linkedin: Meron Ogbai
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.