C++ console application that simulates an internal organization with authentication, role-based workflows, task delegation, secure messaging, notifications, performance scoring, and auditing. The entry point is main.cpp; headers live in include/ and implementations in src/, with text-based storage in data/.
- Authentication & recovery (include/Auth.h, src/Auth.cpp): username/password with custom hash, OTP verification, and favorite-movie recovery flow.
- Role-based access (include/Roles.h, src/Roles.cpp): Junior, Employee, Manager, Director, Executive menus with tailored capabilities.
- Policy engine (include/PolicyEngine.h, src/PolicyEngine.cpp): enforces who can create/assign/delegate/execute tasks and send message types.
- Task lifecycle (include/TaskSystem.h, src/TaskSystem.cpp): create, assign, delegate, mark in-progress, and view tasks ordered by priority; tasks carry TTL and expiry checks.
- Messaging (include/Messaging.h, src/Messaging.cpp): info/private/alert messages encrypted with XOR+hex using recipient password hash; per-user inbox files.
- Notifications (include/Notifications.h, src/Notifications.cpp): warning/emergency notices persisted to file.
- Performance scoring (include/Performance.h, src/Performance.cpp): scores users for completed/expired tasks and messages sent.
- Audit logging (include/AuditLogger.h, src/AuditLogger.cpp): timestamps every login/logout, password reset, task, and message action.
- Utilities & UI (include/Utils.h): validated input, ASCII art banners, time formatting, and split helpers.
- Junior: view own tasks, mark in-progress, send info/private messages, read inbox.
- Employee: Junior abilities plus create tasks (policy-gated), delegate tasks, send info/private messages.
- Manager: Employee abilities plus assign tasks, send alerts, richer message menu, stronger task creation controls.
- Director: Manager abilities plus view team performance and audit logs.
- Executive: create tasks, view inbox, send alerts, view performance, view audits, publish notifications.
- Users: data/users.txt (username|hashedPass|role|securityHash) and user.txt
- Tasks: data/tasks.txt (id|title|status|creator|assignee|priority|created|ttl)
- Notifications: data/notifications.txt
- Messages: data/inbox/ (one file per username)
- Audit trail: data/audit.txt
- Performance: data/performance_report.txt
Requires a C++17 compiler (e.g., MinGW g++ on Windows). From the project root:
g++ -std=c++17 -Iinclude main.cpp src/*.cpp -o app
./app # Windows PowerShell: .\app.exe- Launch the app, then Register or Login (OTP required on login).
- Navigate the role-specific menu to create/assign/delegate/mark tasks, send messages, or view reports.
- View notifications and audit/performance reports (Director/Executive access), or publish new notifications (Executive).
- Data persists in the
data/text files; clearing a file resets that subsystem’s state.
main.cpp
include/ # Public headers
src/ # Implementations
data/ # Text storage (tasks, users, inbox, notifications, audits, performance)
- Messages encrypt with XOR using the recipient’s stored password hash; keep user data private.
- The console UI uses ANSI colors; if colors do not render on Windows, enable VT processing in your terminal.
- Keep role values, task status codes, and scoring constants in include/constants.h in sync with any data you edit manually.