Overview: Task Management
In this example, we create a simple application for task management. The application allows creating tasks and completing tasks, as well as adding work entries to the tasks. Work entries can be finished, and the user can see the amount of time a task has taken.
The application will use a 3-tier architecture (client, server, database) and a layered architecture with four layers (views, controllers, services, database).
The final file structure for the project will be as follows.
tree --dirsfirst
.
├── controllers
│ ├── taskController.js
│ └── workEntryController.js
├── database
│ └── database.js
├── services
│ ├── taskService.js
│ └── workEntryService.js
├── utils
│ └── requestUtils.js
├── views
│ ├── layouts
│ │ └── layout.eta
│ ├── task.eta
│ └── tasks.eta
└── app.js
6 directories, 10 files
Let's start with the database schema and basic database functionality.