/tea_shop

A Rails API for a Tea Subscription Service

Primary LanguageRuby

Tea Shop


The Tea Shop app is an API-based platform that allows users to subscribe to various tea subscriptions. Customers can sign up, choose their preferred teas, and set the frequency of their deliveries. The app provides endpoints for subscribing, canceling, and retrieving subscriptions, enabling users to manage their tea subscriptions conveniently.


Report Bug · Request Feature
Table of Contents
  1. About The Project
  2. Getting Started
  3. Available Endpoints
  4. Goals

About The Project

(back to top)

Built With:

Ruby 3.1.1 Rails 7.0.4 Postgresql 1.1

(Also jsonapi-serializer)

Testing:

Faker Factory Bot RSpec Shoulda-Matchers SimpleCov

(back to top)

Getting Started


Installation

  1. Clone the repo:

    git clone git@github.com:GreenGogh47/tea_shop.git
  2. Install gems:

    bundle install
  3. To establish the database and create seed data run:

    bundle exec rails db:{drop,create,migrate,seed}

Inspect the /db/schema.rb and compare to the 'Schema' section below to ensure this migration has been done successfully.

(back to top)


Testing with RSpec

Once tea_shop is correctly installed, run tests locally to ensure the repository works as intended.


To test the entire RSpec suite, run:

bundle exec rspec

All tests should be passing if the installation was successful.

If any tests are not passing, please report which tests are not passing Here. We will issue an update/fix as soon as possible.

(back to top)


Available Endpoints

Current endpoint documentation exists on Postman here.

(back to top)

Goals

tea_shop was crafted to satisfy the requirements for The Turing Mod 4 Take-Home Project. See the official project requirements here.

MVP

At a minimum, you must create:

  • An endpoint to subscribe a customer to a tea subscription
  • An endpoint to cancel a customer’s tea subscription
  • An endpoint to see all of a customer’s subsciptions (active and cancelled)

(back to top)

Future Goals

  • Sad path testing and error handling
  • More CRUD functionality
  • Additional endpoints for tea and subscription management

(back to top)

Database Schema

image


Acknowledgments

(back to top)