From 6dc723a1f020212e7520bfd752c24569dfeeefe2 Mon Sep 17 00:00:00 2001 From: fatmahgazy <143911324+fatmahgazy@users.noreply.github.com> Date: Fri, 16 May 2025 19:51:39 +0200 Subject: [PATCH 1/3] add readme file --- README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..47ed870 --- /dev/null +++ b/README.md @@ -0,0 +1,91 @@ +# 🧭 PlanMate - Task Management CLI App + +**PlanMate** is a command-line task management application built in **Kotlin**. +It helps teams manage their projects, tasks, and workflows efficiently using a role-based access system and an audit trail. + +The app was built using **Test-Driven Development (TDD)** and follows **SOLID** principles, ensuring high-quality, maintainable code. + +--- + +## Key Features + +### User Roles +- **Admin** + - Can manage users, projects, and workflow states. + - Can view audit logs. +- **Mate** + - Can create, edit, delete, and view tasks within assigned projects. + +### Authentication +- Users log in with a username and password. +- Passwords are stored securely using **MD5 hashing**. + +### Projects & Tasks +- Projects can be created and customized by Admins. +- Tasks belong to projects and can be managed by both Admins and Mates. +- Task states (TODO, In Progress, Done) are fully customizable by Admins. + +### Task Display (Swimlanes UI) +- Tasks are grouped and displayed by state in a clear swimlanes format in the terminal. + +### Audit Logging +- Every change to a project or task is logged with: + - The user who made the change. + - What was changed. + - When the change happened. +- Users can view logs filtered by **project ID** or **task ID**. + +--- + +## Architecture + +- **Layered Architecture**: + - `UI Layer`: Command-line interface. + - `Domain Layer`: Core business logic (clean and testable). + - `Data Layer`: Persistence (originally CSV, now MongoDB). + +- **Uni-directional Dependencies**: + - Data → Domain + - UI → Domain + +> Domain layer is independent from data and UI for better testability and maintainability. + +- **Dependency Injection**: + - Uses **Koin** for clean dependency management. + +--- + +## MongoDB Migration Update + +We are migrating the data source from local CSV files to **MongoDB** for cloud-based shared access. + +- This is a **system-level change**, not UI or domain — your UI code shouldn't be affected. +- You **may need to use coroutines** for async data access → functions may become `suspend`. +- It’s okay to make functions suspendable. + But if you had to change core logic to adapt to Mongo, this might be a **sign of incorrect abstraction** — don’t worry, just learn from it. +- **Peer Reviews** are mandatory and will affect task evaluation. +- Not all squad members are expected to work on Mongo; focus on **cleaning and improving** other areas if not involved. +- Use **exceptions only** for error handling (no `Result` or `Either`). + +--- + +## Testing + +- Developed using **Test-Driven Development (TDD)**. +- Maintains **80%+ test coverage** across: + - Business rules + - Data repositories + - UI interactions + +--- + +## ▶️ How to Run + +> Make sure you have Kotlin and MongoDB installed. + +```bash +# Compile the project +./gradlew build + +# Run the CLI app +./gradlew run From 4fcd4cef5b0c60395aa2770cabdab977e70d36ce Mon Sep 17 00:00:00 2001 From: fatmahgazy <143911324+fatmahgazy@users.noreply.github.com> Date: Fri, 16 May 2025 20:06:16 +0200 Subject: [PATCH 2/3] edit readme file --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 47ed870..3c4f602 100644 --- a/README.md +++ b/README.md @@ -58,15 +58,6 @@ The app was built using **Test-Driven Development (TDD)** and follows **SOLID** ## MongoDB Migration Update We are migrating the data source from local CSV files to **MongoDB** for cloud-based shared access. - -- This is a **system-level change**, not UI or domain — your UI code shouldn't be affected. -- You **may need to use coroutines** for async data access → functions may become `suspend`. -- It’s okay to make functions suspendable. - But if you had to change core logic to adapt to Mongo, this might be a **sign of incorrect abstraction** — don’t worry, just learn from it. -- **Peer Reviews** are mandatory and will affect task evaluation. -- Not all squad members are expected to work on Mongo; focus on **cleaning and improving** other areas if not involved. -- Use **exceptions only** for error handling (no `Result` or `Either`). - --- ## Testing From 597450e70b74097c15c06aef358a312de12ef9d3 Mon Sep 17 00:00:00 2001 From: fatmahgazy <143911324+fatmahgazy@users.noreply.github.com> Date: Fri, 16 May 2025 22:02:39 +0200 Subject: [PATCH 3/3] add demo to readme file --- README.md | 3 +++ csv_files/audit.csv | 9 +++++++++ csv_files/project.csv | 6 +++++- csv_files/state.csv | 2 -- csv_files/task.csv | 3 +++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3c4f602..533bed9 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,10 @@ We are migrating the data source from local CSV files to **MongoDB** for cloud-b - UI interactions --- +## 🎥 Demo Video +[Click here to watch the demo](https://drive.google.com/file/d/1lcma_BLuRiCR-yAugwBVV9GdSYL8YQoW/view?usp=drive_link) +--- ## ▶️ How to Run > Make sure you have Kotlin and MongoDB installed. diff --git a/csv_files/audit.csv b/csv_files/audit.csv index 427f82e..232cb91 100644 --- a/csv_files/audit.csv +++ b/csv_files/audit.csv @@ -13,3 +13,12 @@ "AUDITDDDD_14350","1747065314357","user1234","UPDATE","","TASK","refactorcc_32751" "AUDITDDDD_33128","1747065333128","user1234","DELETE","","TASK","testtaskanddbaftermergedddddd_38667" "AUDITDDDD_468","1747065400468","user1234","UPDATE","","TASK","tasctitlett_91718" +"AUDITDDD_80597","1747419580597","admin_00001","CREATE","","PROJECT","clothestt_80584" +"AUDITDDDD_77118","1747419777118","admin_00001","CREATE","","PROJECT","Taskmkkkk_77109" +"AUDITDD_5241","1747419805241","admin_00001","DELETE","","PROJECT","taskmanageraa_50797" +"AUDITDDDD_10380","1747420210387","admin_00001","UPDATE","","TASK","titlett_29143" +"AUDITD_11426","1747420311426","admin_00001","CREATE","","PROJECT","ttrhrrr_11425" +"AUDITDDDD_50097","1747421150106","admin_00001","UPDATE","","TASK","titlett_29143" +"AUDITDDD_83405","1747421183405","admin_00001","CREATE","","PROJECT","Clothesappeeeee_83404" +"AUDITDDD_28246","1747421328252","admin_00001","UPDATE","","TASK","titlett_29143" +"AUDITDDD_58834","1747421358834","admin_00001","CREATE","","PROJECT","Clothessuggestionappgggg_58833" diff --git a/csv_files/project.csv b/csv_files/project.csv index 77e5f99..39f6aa8 100644 --- a/csv_files/project.csv +++ b/csv_files/project.csv @@ -1,4 +1,8 @@ "Project Id","Project Name","Description","States","Tasks" "taskmangermmmm_97132","task manager","the ultimate project","[]","[]" -"taskmanageraa_50797","task manager","","[]","[]" "newprojctrrr_26090","new projct","","[]","[]" +"clothestt_80584"," clothes","","[]","[]" +"Taskmkkkk_77109","Task m","gjbjff","[]","[]" +"ttrhrrr_11425","ttrhr","","[]","[]" +"Clothesappeeeee_83404","Clothes app","","[]","[]" +"Clothessuggestionappgggg_58833","Clothes suggestion app","","[]","[]" diff --git a/csv_files/state.csv b/csv_files/state.csv index 77a9b62..cb01fde 100644 --- a/csv_files/state.csv +++ b/csv_files/state.csv @@ -1,4 +1,2 @@ "State Id","Name","Project Id" "tododdd_32001","todo","newprojctrrr_26090" -"doingi_58809","doing","newprojctrrr_26090" -"donennn_60752","done","newprojctrrr_26090" diff --git a/csv_files/task.csv b/csv_files/task.csv index c9789ca..6dcce37 100644 --- a/csv_files/task.csv +++ b/csv_files/task.csv @@ -5,3 +5,6 @@ "tasctitlett_91718","taskmangermmmm_97132","tasc title","desc","taskmangermmmm_97132","ahmadmmmm_70365","matetttt_16791" "refactorcc_32751","newprojctrrr_26090","refactor","","tododdd_32001","ahmadmmmm_70365","user1234" "tasctitlett_91718","taskmangermmmm_97132","tasc title","desc","taskmangermmmm_97132","matetttt_16791","matetttt_16791" +"titlett_29143","P1","titletgtrht","riothr","S1","ahmadmmmm_70365","user1234" +"titlett_29143","P1","title is add readme file","description whole app","S1","ahmadmmmm_70365","user1234" +"titlett_29143","P1","title is readme file","description whole app","S1","ahmadmmmm_70365","user1234"