Giter Club home page Giter Club logo

readify-backend's Introduction

readify-backend

CI

readify-backend's People

Contributors

manuel-pancorbo avatar

Watchers

 avatar

Forkers

cruzcivieta

readify-backend's Issues

Add price to a chapter

Some buisness considerations that applies for chapter price:

  • It could be free (i.e. an introduction chapter)

Delete book endpoint

Only a book in a In progress but no visible status could be deleted, since in other statutes a book could be already bought by readers

Create an endpoint for logging in users

Create an endpoint (using spring security) for logging in users. Furthermore I need to add all the boilerplate code for springboot to create and configure spring security

Add status concept in a book

A book could be in some of following statuses:

  • Finished: author finished this book and it is ready for a whole reading
  • Visible in progress: author is currently writing the book and set a percentage of completion
  • In progress but not visible: same as visible in progress but author does not want to users see this book yet. So its chapters are not buyable.

When a book is completed or finished? When author has no draft chapters and sets the percentage of completion to 100%

When a book is created always begin with a 0% of completion percentage and has no chapters and the status is In progress but not visible

Decode access token when present

In order to be able of identifying authenticated users we need to decode and validate JWT on every request that enter in application with the token.

GET endpoint for book resource

The response should include information about the book and the chapters (excluding chapter content).

A book should only be returned if it is visible, otherwise requester must be the book author in order to see the book.

Furthermore, only chapters published will be visible unless requester is the book author

Add endpoint for updating the completion percentage of a book

Add an endpoint for updating completion percentage of a book:

  • the completion percentage can increase or decrease but never be greater than 100 or smaller than 0.
  • if completion percentage is updated to 100, then the book is finished

Furthermore, we need to split concept of status into status and visibility. A book could be finished but in a restricted (or even null) visibility.

Book statuses: IN PROGRESS - FINISHED
Visibility: NULL - RESTRICTED - VISIBLE

Finally, this new endpoint should follow REST standard with a PATCH request for partially update the book resource

Create endpoint for creating a book

As an author
I want to create an empty book with some basic information (title, excerpt, and tags)
in order to be able of add some chapters later

Allow to update more book info

Currently an user just could update the completion percentage, but may need to update other things like title, summary, cover, or even visibility

Create an endpoint for making a payment

This endpoint should be something like:

POST /readers/{readerId}/payments
{
"book": "id",
"chapter": "id",
}

and should return a payment id (which internally should be the stripe checkout session

Delete chapter endpoint

Same as it happens with the book, a chapter could only be deleted if its status is draft. Otherwise the chapter could be already bought by users.

Add endpoint for updating a chapter

A chapter can be updated regardless its status (draft or published). But all readers that have bought this chapter (or the whole book) will access always to the latest version of the chapter.

A writer only will be able of updating title and content of the chapter.

Add endpoint for creating a chapter for an existent book

Incorporate following concepts to chapter:

Title
Content: with no more than 10000 words
Num of words
Last modification

Furthermore, a chapter could be in a draft status, which would mean that is not buyable in other context, maybe neither it should appear in an index, etc..

A chapter is always created in a draft status at beginning, only when author mark it as ready is "published".

Add an endpoint for changing the status chapter to `published`

A chapter will never change its status from published to draft, but it should change from draft to published in order to be reachable from readers.

This endpoint should be, as all of the application, idempotent, so whenever a chapter is already marked as published, it should return OK.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.