🍵 Tea Service is a subscription app designed to let a customer subscribe to regular shipments of tea for a period of their choosing - monthly, quarterly or annually. A customer can suscribe, cancel a subscription, and view all of their previous subscriptions whether they are active, pending or cancelled. A customer can also view all teas currently stored in the database. Future feature may involve consuming Tea API for data.
Database was designed with intention of using the Subscription model as a join table between the customer and a specified tea that the customer intends to subscribe to. This was designed with the intention of making the customer primarily make differne subscriptions to different teas as each tea would have an individual frequency plan. Future potential refactors could include making it possible to subscribe to multiple teas with one subscription, like creating a Bulk Subscription model possibly or just changing the current Subscription model.
The current endpoints in tea service are:
GET /teas
GET /customers/:customer_id/subscriptions
POST /subscriptions
GET /subscriptions/:subscription_id/cancel
DELETE /subscriptions/:id
Gems used in the creation of this project: