Skip to content

MuhammadAusajaHussain/Task-Management-System

Repository files navigation

Task Management System

A modern, robust enterprise-grade Task Management System built with ASP.NET Core 8 Web API and React 19. Designed following clean architecture principles, adhering to rigorous software engineering standards including xUnit testing, SonarQube static analysis, and structured logging via Serilog.

Technology Stack

Backend

  • Framework: ASP.NET Core 8.0 Web API (net8.0)
  • ORM: Entity Framework Core 8.0
  • Database: SQL Server / LocalDB ((localdb)\MSSQLLocalDB)
  • Security: JWT Authentication & Role-Based Access Control (RBAC) + BCrypt Password Hashing
  • Logging: Serilog (Console & Daily Rolling File logs/log.txt)

Frontend

  • Library: React 19 + Vite
  • Styling: Tailwind CSS v4 + Google Fonts (Inter, Outfit)
  • Routing: React Router v7
  • State & HTTP: Axios + React Hot Toast

Quality & Testing

  • Unit Testing: xUnit + Moq + EF Core InMemory Database (17 comprehensive test cases)
  • Static Analysis: SonarQube (SonarAnalyzer.CSharp for local IDE linting + dotnet-sonarscanner template for CI/CD)

Key Features

  • Role-Based Access Control (RBAC): Distinct permissions for Admin (system-wide view, user management, global deletion) and User (restricted profile access, assigned task tracking).
  • Task Lifecycle Management: Create, assign, categorize, update, and track tasks with status updates (Pending, InProgress, Completed) and priority flags.
  • Completion Notifications: Simulated real-time notification dispatching (ConsoleNotificationService) alerting administrators immediately when a user marks a task as complete.
  • Dashboard & Analytics: Live task completion statistics and metric aggregations tailored to user permissions.
  • Audit & Activity Logging: Comprehensive system activity tracking storing timestamped events (e.g. registrations, updates, deadline triggers) into dedicated database logs.
  • Automated Background Workers: Built-in background worker (DeadlineCheckService) actively monitoring and flagging overdue tasks automatically.

Use Case Diagram

Use Case Diagram

Project Structure

Task Management System/
  docs/                           # Engineering documentation
  sonar-scanner-example.ps1       # CI/CD SonarQube CLI integration script
  database/
    Database Schema.sql           # SQL Server database schema
  frontend/
    taskmanagement-frontend/      # React Frontend SPA
  backend/
    TaskManagement.API/           # Main ASP.NET Core Web API Project
      Controllers/                # Used for Routing and contains API Endpoints
      DTOs/                       # Strongly typed data transfer objects with strict nullability
      Models/                     # Entity Framework Domain Models
      Services/                   # Core Business Logic
      Program.cs                  # DI container, Serilog setup, and Middleware pipeline
      TaskManagement.API.Tests/   # xUnit Unit Testing Suite (17 passing tests)

Project Setup

1. Database Configuration

  1. Ensure SQL Server (or SQL Server LocalDB) is installed.
  2. Open SQL Server Management Studio (SSMS) or Azure Data Studio and run the SQL script located in database/Database Schema.sql to initialize the myDB schema and default roles/categories.
  3. Verify the connection string in backend/TaskManagement.API/TaskManagement.API/appsettings.json:
"ConnectionStrings": {
  "DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=myDB;Trusted_Connection=True;"
}

2. Running the Backend (API)

cd backend/TaskManagement.API/TaskManagement.API
dotnet run
  • The API will launch on standard HTTPS/HTTP ports with Swagger API explorer available at /swagger.

3. Running the Frontend (React SPA)

cd frontend/taskmanagement-frontend
npm install
npm run dev
  • Open your browser and navigate to http://localhost:5173.

🧪 Running Unit Tests

The backend includes an exhaustive xUnit test suite verifying business logic across all core services without relying on a live SQL database (using InMemory EF Core).

To run all 17 automated tests from your terminal:

cd backend/TaskManagement.API
dotnet test

Output: Unit Test Output

🔍 SonarQube Code Quality

The project actively enforces SonarQube static code analysis rules:

  1. Local IDE Linting: The SonarAnalyzer.CSharp package is embedded in the API project. Any code smells or vulnerabilities will automatically appear as warnings in Visual Studio / VS Code error windows during development and inside dotnet build logs.
  2. CI Server Integration: For automated pipeline builds (such as GitHub Actions), run the included script:
./sonar-scanner-example.ps1

🖥 UI Screenshots

Shared Pages

1. Login Screen Login Screen

2. Register Screen Register Screen

Admin Pages

1. Admin Dashboard Screen Admin Dashboard Screen

2. Admin Tasks Screen Admin Tasks Screen

3. Admin Create Task Screen Admin Create Task Screen

4. Admin Users Screen Admin Users Screen

5. Admin Create User Screen Admin Create User Screen

6. Admin Profile Screen Admin Profile Screen

User Pages

1. User Dashboard Screen User Dashboard Screen

2. User Tasks Screen User Tasks Screen

3. User Create Task Screen User Create Task Screen

4. User Profile Screen User Profile Screen

About

Task Management System built with ASP.NET and ReactJS, which implements Role-Based Access Control, incorporates Task Lifecycle Management, and provides system activity tracking & logging.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages