Skip to content

Instantly share code, notes, and snippets.

@saibs
Last active January 17, 2020 15:12
Show Gist options
  • Save saibs/1691f9111ebe74f19e11ab04e8d78f7b to your computer and use it in GitHub Desktop.
Save saibs/1691f9111ebe74f19e11ab04e8d78f7b to your computer and use it in GitHub Desktop.
Proposal: Favourite books

Favourite books

A user will be able to manage favourite books.

Lifecycle

I propose to approach the feature development with the following steps. The steps also correspond to the feature lifecycle.

  • Design mockups
  • Discussion about the designs by frontend, design and product team
  • Design signoff
  • Planning and estimations
  • Feature development
  • Testing signoff
  • Product signoff
  • Deployment

Assumptions

  • API Service for CRUD operations of bookmarks.
  • Framework established for A/B testing this feature.
  • Design system for the reusable components or extension of component library.

Architecture

  • Since this page has no effect on SEO, hence client side rehydration is sufficient.
  • Following contract for the list API can be considered for better use experience to support lazy loading. ex:
{
   "data":{
      "totalCount":2,
      "favouriteBooks":[
         {
            "node":{
               "id":1
            },
            "cursor":"Y3Vyc29yMg=="
         },
         {
            "node":{
               "id":2
            },
            "cursor":"Y3Vyc29yMw=="
         }
      ],
      "pageInfo":{
         "endCursor":"Y3Vyc29yMw==",
         "hasNextPage":false
      }
   }
}

Further considerations

  • If the user mostly uses single device, We can intially roll out this feature with "Favourites on this device" and implement with client side only functionality storing the bookmarks in local storage.
  • We can do a phased roll out of this feature by enabling/disabling favourite button on the book page.
  • We can support offline reading of favourite books downloaded on the device.
  • Sync of favourite list across multiple devices using subscriptions, so that no refresh is required to update the list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment