Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.
/ track-books-api Public archive

A tracker application that lets users track the books they're reading. Built with React and Rails.

License

Notifications You must be signed in to change notification settings

meronogbai/track-books-api

Repository files navigation

Track Books API

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).

Features

  • 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.

API Endpoint

https://track-books.herokuapp.com/api/v1

Routes

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

Entity Relationship Diagram

ERD

Built With

  • Rails
  • RSpec
  • PostgreSQL

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Ruby 3.0.0
  • PostgreSQL

Setup

# Clone the repo
git clone https://github.com/meronokbay/track-books-api/

# cd into the cloned repo
cd track-books-api

Install

bundle install

Usage

# 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

Run tests

bundle exec rspec

Author

👤 Meron Ogbai

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

A tracker application that lets users track the books they're reading. Built with React and Rails.

Topics

Resources

License

Stars

Watchers

Forks