Skip to main content

Backend Training Task

Project Summary

One of the most common tools used by professionals all over the world to capture tasks is a To Do list. They come in all shapes, forms, and features. In this project you will build Backend of a SAAS application that allows its users to build and maintain a To Do list. Please note you are not required to build the Frontend unless absolutely required (e.g. in case of OAuth 2).

One user can only have one To Do list. Each list can have up to 50 tasks. A task consist of following properties: creation date time, title, description, file attachments (e.g. an image), due date time, completion status (true/false), completion date time. A user should not be allowed to access tasks created by any other user.

Database

Use a RDBMS such as Postgres or Mysql. For each feature define tables, columns, relationships, etc

REST

Unless absolutely required, all the communication between a client (user) and the server (website) must be based on REST and JSON.

Modules

User

User Registration

Build a sign up module that enables a user with a valid email address to create an account on the website. During signup, user must provide an email address and a password. Before enabling user to Login, the ownership of the email address user provided during the sign up process must be verified.

OAuth2

Let a user Login into the website using an existing Facebook account. Ensure that the email address associated with the Facebook account doesn't already exist in the system.

User Login

Let a user login using an email address and password. The login should be done using token based authentication. In order to perform any operation on the website (except for user registration), a user must Login first.

Forgot Password

Let user reset password through the registered email address (please note password can't be reset if user is using OAuth 2 based account)

TODOs

Core Operations

Allow a user to perform following operations

  • Create a new task
  • Edit a task
  • Delete a task
  • View list of tasks
  • Attach file(s) with an existing task
  • Download files attached with a task

Reports

Allow a user to generate following reports (each report should be served from a separate endpoint)

  • Count of total tasks, completed tasks, and remaining tasks
  • Average number of tasks completed per day since creation of account
  • Count of tasks which could not be completed on time
  • Since time of account creation, on what date, maximum number of tasks were completed in a single day
  • Since time of account creation, how many tasks are opened on every day of the week (mon, tue, wed, ....)

Algorithms

Return user a list of similar tasks. Two tasks A and B are considered similar if all the words in the task A exist in task B or vice versa.

Other Tasks

Background Tasks

At beginning of every day (12 AM UTC), send user reminder about tasks due on that day, via email.

Logging

All the REST API endpoint calls should be logged in a log file. Winston logger would be preferred.

Credentials Management

Do not ever store any credentials such as API keys, database passwords, in the code.

API Documentation

Generate documentation of API that can be consumed by front end developers. Contact your mentor regarding which tools to be used.

Testing

Write positive and negative test cases for the API. Consult your mentor regarding the tools to use for testing.