/sticky-notes

Primary LanguageTypeScript

Try online

Requirements

Time limit: 4-6 hours of work. Without external libraries. Support only desktop.

Task is to implement a single-page web application for sticky notes. You are required to implement at least 3 of the following 4 features:

  • Create a new note of the specified size at the specified position.
  • Change note size by dragging.
  • Move a note by dragging.
  • Remove a note by dragging it over a predefined "trash".

Bonus:

  • Entering/editing note text.
  • Moving notes to front (in case of overlapping notes).
  • Saving notes to local storage (restoring them on page load).
  • Different note colors.
  • Saving notes to REST API. Note: you're not required to implement the API, you can mock it, but the mocks should.

Architecture

Main component of application is <Board />, it manages state of notes and interaction with user, all other components are stateless.

Primary states of <Board /> is notes (position, dimension, and color of each note, stored as map id->note) and action (data, required for current, if any, interaction with user. For example, while user creates note by pressing-moving-releasing mouse, it stores position of initial mouse press and current mouse position).

Build

yarn install
yarn start