- Manually create the webpack setup instead of using CRA template
- Coding style / folder structure cleanups
- Realized those useState() in a single component isn't too easy to maintain & read, extract all those out from the component level and use other state management tool (choose Redux)
- Clean up src/shared/utils.ts for better TS Typing
- Provided a better basic looking, also takes some reference from ProtonMail & Design System that's hosted on GitHub
- Add more rich content in defaultNotes.json
- Provide some cypress e2e tests, automatic those QA process
- The project isn't hosted on GitHub pages anymore (need to manually clone it)
The user can:
- view a list of notes (left pane).
- view the title and markdown rendered text of a note (right pane - view mode).
- write a title and plaintext markdown text and save it as a note (right pane - edit mode).
The user can:
- open an existing note and view the markdown rendered note (the composer is not visible).
- click on the
Edit
button to be taken to the edit mode. - click on the
New note
button to be taken to the edit mode and create a new note in the list of notes.
The user can:
- not click on the
New note
button. - not click on another note.
- click on the
Cancel
button to be taken to the view mode. - click on the
Delete
button to delete the note. - click on the
Save
button to save the note and be taken to the view mode.
- The title of each note is not encrypted (stored in clear text).
- The content of each note is encrypted when saving it. Take into consideration the loading state.
- The content of each note is decrypted when opening it. Take into consideration the loading state.
- Since real encryption/decryption are out of scope, mock the encrypt and decrypt operations with the following functions that do not alter any data.
const wait = async (delay) => {
return new Promise((resolve, reject) => {
setTimeout(resolve, 500);
});
};
const encrypt = async (data) => {
await wait(500);
return data;
}
const decrypt = async (data) => {
await wait(500);
return data;
}