An online self-publishing portal to let users read the content. Theyare meant tohelp readers be consistent inreading and develop a regular userbase.Chapters are unlocked daily per series for new users.New User and New Content are managed to make sure free 4 chapters for everyone(every chapter added is made available to everyone).Independent Micro-Services made to inter-connect Services.MetaData is uploaded in bulk and stored in Relational Database. This also has the function of unlocking a chapter everyday for the user(regular signing means one chapter unlocked daily).
This application contains three services,
- Service description : Contains user details like name, email etc
- Apis :
- Fetch users
- Create a new user
- Service description : Contains meta of readable content that we serve to the users
- Each content is structured as a series which can contain multiple chapters.
- Example: consider a series called “Harry Potter” which has 7 chapters
- Apis required :
- Fetch content for a user
- Input : userid , multiple series ids
- Output : content meta with only unlocked chapters per series
- Api for bulk upload of the content
-
Service description : Contains the details of how many chapters per series is unlocked for a particular user
- When a user installs the Pratilipi Application (i.e. day1 of user creation) , 4 chapters are unlocked by default on the day of installation
- Rest of the chapters are released on a daily basis; that is one chapter per day
- Any new content that is uploaded, again by default has 4 unlocked chapters for all the users
-
So if a series is uploaded after user creation then the existing users should also see that series with only 4 chapters unlocked
-
Apis
- Api to unlock one chapters for the given user and series
- For testing purpose : this api should not be idempotent, if I hit the api twice, it should unlock two episodes for the requested user and series
- Number of unlocked chapters = 4 + no. of times unlock api is hit
- Fetch daily pass data by user
- Import Postman Requests Curl (Import using JSON link)
- Get Username
- Input:Username
- Output:userId,firstName,lastName,penName,userEmail,bio,number
- Sample URL:- https://userserviceshivam.herokuapp.com/api/v0/getUser/:username
- Create User
- Input:userId,firstName,lastName,penName,userEmail,bio,number,password
- Output:token
- Sample URL:- https://userserviceshivam.herokuapp.com/api/v0/createUser
- Login User
- Input:penName,password
- Output:token
- Sample URL:- https://userserviceshivam.herokuapp.com/api/v0/loginUser
- Fetch Unlocked Chapters
- Input:UserID,SeriesID
- Output:[]{seriesId,title,story}
- Sample URL:-https://contentserviceshivam.herokuapp.com/api/v0/content/fetchContent/:userID/:seriesID
- Bulk Upload Chapters
- Input:[]{seriesId,title,story}
- Output:Success Response
- Ssample URL:-https://contentserviceshivam.herokuapp.com/api/v0/content/uploadContent
- Get Series
- Input:seriesId
- Output:seriesId,author,name,chapters
- Sample URL:-https://contentserviceshivam.herokuapp.com/api/v0/content/getSeries/:seriesID
- Create Series
- Input:author,name,chapters
- Output:Success Response
- Sample URL:-https://contentserviceshivam.herokuapp.com/api/v0/content/uploadSeries
- Unlock Chapters
- Input:UserID,SeriesID
- Output:Success Response
- Sample URL:-https://dailypassserviceshivam.herokuapp.com/api/v0/dailypass/unlockContent
- Get Unlock Chapters
- Input:UserID
- Output:Chapter and Unlocked List for given user
- Sample URL:-https://dailypassserviceshivam.herokuapp.com/api/v0/dailypass/getUnlockedContent/:userID
- CreateUser
- New User is created and userID is sent to get all available chapter.
- UserSeries
- All available chapters with userID is stored in DailyPass Service Database.
- SeriesContent
- New Series is added,it's added to all existing users.
- Go(lang)
- SQL
- RabbitMQ(to connect microservices)
- JWT(for unlocking chapters)