A Client-Server To-Do List project for the Modern Java Technologies course, FMI, 2023
A console Client-Server application which servers the purpose of task scheduling & management on a daily basis (inspired by Todoist).
Each task consists of the following attributes:
- name - the name of the task
- date (optional) - the date we would like to complete the task on
- due date (optional) - the date by which we should complete the task for sure
- description (optional) - a description of the task
To use the services of the application, the User needs to create an accout or log into an existing one.
Note: The password is not being stored into the memory as plain text, it is first being encoded through the use of the PBKDF2-HMAC-SHA256 Password Storage Scheme which provides a mechanism for encoding user passwords using the PBKDF2-HMAC-SHA256 message digest algorithm.
- Create a new account
$ register --username=<username> --password=<password>
- log into an account
$ login --username=<username> --password=<password>
Note: All the data that is created within an account is being stored in a data storage (using JSON files and the Gson library), so all the data is being saved and available throughout different user sessions. The database files are being created for the current file system in case they do not exist after the server has started running.
- quit the current session
$ quit
The User can create tasks and perform a variety of operations with them, described bellow:
-
create a task
If a task has no date attribute, it is put into a separate task storage called Inbox
$ add-task --name=<name> --date=<date> --due-date=<due-date> --description=<description>
-
update a task
Every attribute can be changed except for the name (We use a name to reference tasks from the Inbox and a name and a date to reference all other tasks)
$ update-task --name=<name> --date=<date> --due-date=<due-date> --description=<description>
- delete a task
$ delete-task --name=<task name>
$ delete-task --name=<task name> --date=<date>
- print task information in human-readable format
$ get-task --name=<task name>
$ get-task --name=<task name> --date=<date>
-
list tasks
An additional optional parameter can be used, in order to filter out only the completed tasks
$ list-tasks
$ list-tasks --completed=true
$ list-tasks --date=<date>
- list all tasks scheduled for the current date
$ list-dashboard
- mark a task as completed
$ finish-task --name=<task name>
$ finish-task --name=<task name> --date=<date>
A collaboration is a shared project which can contain tasks that are visible for all members of the project. This type of tasks have one more optional attribute - an assignee (the User that is assigned to complete the task).
- add a collaboration
$ add-collaboration --name=<name>
-
delete a collaboration
Can only be done by the owner of the collaboration, deletes all tasks within it
$ delete-collaboration --name=<name>
- list all collaborations that the current User is a member of
$ list-collaborations --name=<name>
-
add a new member to a collaboration
Can only be done by the owner of the collaboration
$ add-user --collaboration=<name> --user=<username>
- assign a task to a member of the collaboration
$ assign-task --collaboration=<name> --user=<username> --task=<name>
- list all tasks within a collaboration
$ list-tasks --collaboration=<name>
- list all members of a collaboration
$ list-users --collaboration=<name>
This project is a Client-Server application, which allows the Server to work with multiple clients concurrently. The implementation is based on the non-blocking Client-Server architecture, using Java NIO.
When an error (such as an I/O exception) occurs during the usage of the Server, it is logged into a text file, which is being created for the current file system in case it does not exist. The logging information contains the type of the error, the error message, and the stack trace. The logging operations are performed through the use of java.util.logging.
All of the application logic is being tested (except for the Server and Client implementations) through the use of JUnit 5.8.1.