Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 🧭 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.
---

## Testing

- Developed using **Test-Driven Development (TDD)**.
- Maintains **80%+ test coverage** across:
- Business rules
- Data repositories
- 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.

```bash
# Compile the project
./gradlew build

# Run the CLI app
./gradlew run
9 changes: 9 additions & 0 deletions csv_files/audit.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 5 additions & 1 deletion csv_files/project.csv
Original file line number Diff line number Diff line change
@@ -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","","[]","[]"
2 changes: 0 additions & 2 deletions csv_files/state.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
"State Id","Name","Project Id"
"tododdd_32001","todo","newprojctrrr_26090"
"doingi_58809","doing","newprojctrrr_26090"
"donennn_60752","done","newprojctrrr_26090"
3 changes: 3 additions & 0 deletions csv_files/task.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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"