A Java 17 application for managing tasks, users, and dependencies in a software project team. Includes a console interface, a web dashboard, and a REST API — all with no external dependencies.
src/
├── com/strms/
│ ├── main/ Main.java — entry point, demo walkthrough
│ ├── model/ Task, User, Admin, Manager, Engineer, TaskHistoryEntry
│ ├── controller/ TaskManager — core business logic
│ ├── interfaces/ Assignable, Persistable, Notifiable, Reportable
│ ├── enums/ TaskStatus, PriorityLevel, TaskCategory, NotificationType
│ ├── exceptions/ 7 custom exceptions
│ ├── utils/ FileManager, NotificationManager, ReportGenerator
│ ├── view/ ConsoleView, Dashboard
│ └── web/ WebServer, TaskApiHandler, StaticHandler
└── web/static/ index.html, tasks.html, create.html, admin.html, login.html, style.css, app.js
| Class | Role |
|---|---|
Task |
Core entity. Holds status, priority, category, deadline, dependencies, and history |
User |
Abstract base class with role-based permission methods |
Admin |
Can create, assign, and delete tasks |
Manager |
Can create and assign tasks |
Engineer |
Can start and complete assigned tasks only |
TaskHistoryEntry |
Immutable audit record — who did what and when |
| Enum | Values |
|---|---|
TaskStatus |
TODO → IN_PROGRESS → DONE, or TODO ↔ BLOCKED |
PriorityLevel |
LOW, MEDIUM, HIGH, CRITICAL |
TaskCategory |
FEATURE, BUGFIX, RESEARCH, DOCUMENTATION, TESTING, MAINTENANCE |
TaskManager — all business logic in one place:
addTask(task, requester)— role check, duplicate check, history entrydeleteTask(taskId, requester)— role checkupdateTask(taskId, ...)— update title/description/priority/deadlineassignTask(taskId, engineerId, requester)— role check, notificationstartTask(taskId, requester)— state machine: TODO → IN_PROGRESScompleteTask(taskId, requester)— IN_PROGRESS → DONE, auto-unblocks dependentsaddDependency(taskId, dependencyId)— circular dependency detection (DFS)removeDependency(taskId, dependencyId)— unblocks task if all deps metsaveTasksToFile(path)/loadTasksFromFile(path)— CSV persistencesaveUsersToFile(path)/loadUsersFromFile(path)— user CSV persistencelistTasksByStatus(status)— filter tasks by statuslistTasksByUser(userId)— all tasks assigned to a given engineergetNextTask()— peek the highest-priority ready taskunassignTask(taskId, requester)— remove assignment from a taskremoveUser(userId)— remove a user from the registry
| Interface | Implemented by |
|---|---|
Assignable |
TaskManager |
Persistable |
FileManager |
Notifiable |
NotificationManager |
Reportable |
ReportGenerator |
| Exception | When thrown |
|---|---|
TaskNotFoundException |
Task ID not found |
DuplicateTaskException |
Task ID already exists |
InvalidRoleException |
User lacks permission for the action |
InvalidTaskStateException |
Illegal status transition |
CircularDependencyException |
Dependency would create a cycle |
DependencyNotCompletedException |
Starting a task whose deps are not DONE |
FilePersistenceException |
CSV read/write failure |
isBlocked()— returns true if any dependency is not DONEisOverdue()— returns true if deadline has passed and status is not DONE- Audit history — every state change records who did it and when
- Priority queue — ready tasks are ordered CRITICAL → HIGH → MEDIUM → LOW
- Auto-unblock — completing a task automatically unblocks all tasks waiting on it
- Completion rate — console dashboard shows a
█░░progress bar with percentage
Started automatically on http://localhost:8090 when the app runs.
| URL | Description |
|---|---|
/login |
Sign in with SHA-256 authentication — role enforced from server |
/ |
Dashboard — 6 stat cards, progress bar, task table |
/tasks |
Full task list with filters (status, priority, search) + role-based actions |
/create |
Create task form — Admin and Manager only |
/admin |
Admin only — user list, add/delete users, role permissions table |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tasks |
All tasks as JSON |
| GET | /api/stats |
Counts by status + completion % |
| GET | /api/users |
All users as JSON |
| POST | /api/auth/login |
Authenticate {name, password} → {name, role, id} |
| POST | /api/tasks |
Create task {id, title, description, priority, category, deadline, requesterId} |
| POST | /api/tasks/assign |
Assign task {taskId, userId, requesterId} |
| POST | /api/tasks/start |
Start task {taskId, requesterId} |
| POST | /api/tasks/complete |
Complete task {taskId, requesterId} |
| POST | /api/tasks/delete |
Delete task {taskId, requesterId} |
| POST | /api/tasks/update |
Update task fields {taskId, title?, description?, priority?, category?, deadline?, requesterId} |
| POST | /api/tasks/dependency/add |
Add dependency {taskId, depId, requesterId} |
| POST | /api/tasks/dependency/remove |
Remove dependency {taskId, depId, requesterId} |
| POST | /api/users |
Create user {id, name, email, role, password, requesterId} — Admin only |
| POST | /api/users/delete |
Delete user {id, requesterId} — Admin only |
All endpoints enforce role-based access control via requesterId. No external web framework — uses com.sun.net.httpserver.HttpServer built into the JDK.
| Action | Engineer | Manager | Admin |
|---|---|---|---|
| Start / Complete task | ✅ | ✅ | ✅ |
| Create task | ❌ | ✅ | ✅ |
| Assign task | ❌ | ✅ | ✅ |
| Edit task | ❌ | ✅ | ✅ |
| Delete task | ❌ | ❌ | ✅ |
| Manage users | ❌ | ❌ | ✅ |
Passwords are hashed with SHA-256 (java.security.MessageDigest) before storage. The hash is persisted in strms_users.csv and verified on each login. Users without a stored hash accept any password (backwards compatibility).
| Workflow | Trigger | What it does |
|---|---|---|
ci.yml |
Every push / PR to main | Compile → test-compile → JUnit → upload report → build JAR |
pr-check.yml |
PR to main only | Code quality check + full test suite + final build (3 sequential jobs) |
tag-release.yml |
Push a v* tag |
Run tests → build JAR → create GitHub Release with JAR attached |
Branch protection on main: requires passing CI before merge.
42 tests in TaskManagerTest.java covering:
- Dependency management: add, remove, cycle detection, transitive cycles
- Blocking/unblocking: task becomes BLOCKED on dep add, auto-promoted after dep completion
- Role enforcement: Engineer cannot create/delete/assign, Admin has full privileges
- State machine: start, complete, illegal transitions (start DONE, complete TODO, etc.)
- Task assignment: assign to non-engineer throws
- Audit history recording
- Exception messages
- Priority ordering (CRITICAL before HIGH, LOW after MEDIUM)
Run tests:
mvn test- Right-click
Main.java→ Run As → Java Application - The demo walkthrough runs in the console
- Open
http://localhost:8090/loginin the browser - Default credentials: any registered user with password
admin
mvn package -DskipTests
java -jar target/strms.jar| Library | Version | Scope |
|---|---|---|
| JUnit Jupiter | 5.10.2 | Test only |
No runtime dependencies — pure Java 17 standard library.