Todo App
Running the Project
Running the backend
- Start the database:
docker-compose up
- install dependencies
yarn
- Start the server:
yarn start
Running the frontend
- Install dependencies
yarn
- Start the static server
yarn start
Testing the frontend
- run
yarn test:e2e
to run the e2e tests - run
yarn test:unit
to run the unit tests
Configuration and Environment variables
- Server configurations and secrets can be setup in
.env
file, this file should be added to.gitignore
but is left for demo purposes - postgresql environment vars used by the docker image are setup via
database.env
Future work
Backend
- Better error handling
- implement input validation
- Add some types/interfaces
- Make TODO CRUD operations reusable by moving them into the model class as static/helper methods instead of having the logic in the controllers
- add some seeders and/or use sequelize-cli
Frontned
- Add styles
- show some loading states when data is being loaded and disable buttons when loading
- Implement some Input/Form validation
- Error handling in case of server errors
- With too many todos, rendering might get slow as you fetch more data despite infinite scrolling implemented.. use a virtual scrolling library to only render elements being shown instead of all of them
- Improve usability, no need for confirm/cancel buttons on create and edit, just do inline editing.
- Use icons instead for edit/delete buttons