Task Management Application

Brief explanation

Create the back-end (REST API) part of the task management application (like Trello) with no authentication and authorization required.

The main entity is a Project (or Board) that always has its name and contains multiple Columns. A Column always has a name, contains Tasks and represents their status.

When a Project is created at least one "default" Column must be created in it as well.

A Task can be created only inside the Column and can be moved within the Column (change priority) or across the Columns (change status).

A Task can have Comments that could contain questions or Task clarification information.

Technical Requirements

The development could be divided into 3 layers: Services, Handlers, DB. Please, prefix each comment with the appropriate phase title like "Services: Add basic routes".

It is not required to develop the application layer by layer, but keep in mind that you have to add all these parts to the application. Think about the architecture and build the basement for a future application extension.

Phase 1 (Services layer)

Create the core functionality of the application. Define the service level of the architecture that takes care of business logic. Keep in mind that you'll need to add handlers and DB layer.

Phase 2 (Handlers layer)

Extend your existing Core functionality with the HTTP server and handlers to be able to handle HTTP requests. Add the documentation for it.

Phase 3 (DB layer)

Extend your application with the database layer: save and fetch the application data from the database.

Technical Limitations

  1. Any external dependency/tool/library/framework that is not specified in this document or is not compatible with the requirements must be discussed with the mentor in the school chat. After approval, it will be added to this document and them can be used in the project.
  2. Any dependency management tool is allowed (go modules are preferable).
  3. Handlers must accept requests and send responses in JSON format.
  4. Any external router compatible with standard with net/http server and handlers is allowed (e.g. gorilla/mux, go-chi/chi).
  5. Documentation for the HTTP API must be present as a swagger.yaml.
  6. All errors must be logged on ERROR level. Any other information could be logged on DEBUG level.
  7. Any external logger is allowed (use uber/zap, sirupsen/logrus or rs/zerolog).
  8. You may use database/sql or any ORM (e.g. gorm) with any DB driver to work with RDBMS (PostgreSQL is preferable, but is not required).
  9. Tests must be present: unit tests and request tests (see net/http/httptest package).
  10. Any dependencies for testing purposes are allowed.
  11. Instruction on how to build, test and run the application must be presented in the README.
  12. Repository on any platform (GitHub, GitLab, ...) must be private and closed for all except the mentor(s). The code must be added via Pool/Merge Requests only.
  13. The application must be deployed to any cloud provider: AWS, GCP, Azure, Heroku, etc. (Heroku is free and suits well for small projects). Please, attach the corresponding link in README file.

Suggestions

You can use go-playground/validator (https://github.com/go-playground/validator) to validate an HTTP request or anything else if needed.

Allowed/recommended libraries

  • godotenv
  • github.com/Yalantis/go-config
  • github.com/spf13/viper
  • github.com/golang-migrate/migrate
  • github.com/pressly/goose
  • github.com/rs/cors

Business Rules

User must be able to manage (create, read, update, delete) Projects:

  • Projects in a list are sorted by name.

Project must contain at least one column:

  • the first column created by default when a Project created;
  • the last column cannot be deleted.

User must be able to manage (create, read, update, delete) Columns:

  • Columns in a list are sorted by their position specified by User;
  • Column name must be unique;
  • when a Column is deleted its tasks are moved to the Column to the left of the current.

User must be able to move a Column left or right.

User must be able to rename a Column

User must be able to manage (create, read, update, delete) Tasks:

  • Task can be created only within a Column;
  • User can view Tasks in all Columns of a Project;
  • User can update the name and the description of the Task;
  • User can delete the Task, with all Comments related to this Task.

User must be able to move a Task across the Columns (left or right) to change its status.

User must be able to move a Task within the Column (up and down) to prioritize it.

User must be able to manage (create, read, update, delete) Comments:

  • Comment can be created only within a Task;
  • Comments in a list are sorted by their creation date (from newest to oldest);
  • User can view Comments related to a Task;
  • User can update the Comment text;
  • User can delete the Comment.

Fields and validation rules

Project

  • Name (1-500 characters)
  • Description (0-1000 characters)

Column

  • Name/Status (1-255 characters, unique )

Task

  • Name (1-500 characters)
  • Description (0-5000 characters)

Comment

  • Text (1-5000 characters)