Skip to content

Repository files navigation

HelpDeskManagement — Enterprise Help Desk Ticket System

Framework Web API MVC Client EF Core Database Testing License

An enterprise-grade, decoupled Help Desk Ticket Management System architected using ASP.NET Core Web API, ASP.NET Core MVC, Entity Framework Core, SQL Server, and xUnit with Moq. Built strictly adhering to SOLID design principles, Async/Await patterns, and Dependency Injection.


📈 System Metrics & Key Specifications

Specification Metric Implementation Details
Solution Architecture N-Tier / Decoupled Repository Pattern & Typed HTTP Service
Target Framework .NET 10.0 (C# 13 Language Features)
Persistence / ORM Entity Framework Core 10 (DbContext, Code-First Migrations)
Database Server Microsoft SQL Server LocalDB ((localdb)\mssqllocaldb)
API Architecture RESTful HTTP/JSON Service ([ApiController])
Front-End Stack ASP.NET Core MVC + Razor Engine + Bootstrap 5
HTTP Client Client Typed HttpClient via AddHttpClient<ITicketApiService, TicketApiService>
Quality Assurance 21 Automated xUnit Unit Tests (Moq + EF Core InMemory)
Code Coverage 100% Core Repository & API Controller Execution Paths

🏗️ System Architecture

graph TD
    subgraph Presentation Layer [HelpDesk.Mvc]
        UI[Razor Views / Bootstrap 5] --> MVC[TicketsController MVC]
        MVC --> HTTP[TicketApiService Typed HttpClient]
    end

    subgraph API & Domain Layer [HelpDesk.Api]
        HTTP -- REST / HTTP JSON --> API[TicketsController Web API]
        API --> REPO[TicketRepository]
        REPO --> DBCTX[AppDbContext]
    end

    subgraph Data Storage [SQL Server]
        DBCTX --> SQL[(SQL Server LocalDB / HelpDeskDb)]
    end

    subgraph Testing Suite [HelpDesk.Tests]
        XT1[TicketRepositoryTests - EF Core InMemory]
        XT2[TicketsControllerTests - Moq Mocks]
        XT1 -. Validates .-> REPO
        XT2 -. Validates .-> API
    end
Loading

📸 User Interface Showcase

Interface Screen Description & Key UI Features
Tickets Dashboard
Dashboard
Overview & Filter Matrix
Interactive grid presenting all support tickets with dynamic status badges, priority severity tags, and a status dropdown filter.
Ticket Creation Form
Create Form
Input Validation & Form Controls
Clean card interface providing input fields for ticket title, description, priority selection, status initialization, and raised-by identity.
Ticket Details View
Details View
Detailed Metadata & Audit View
Full ticket inspector displaying ticket ID, creation timestamp, status badge, priority indicator, and full description log.

🗄️ Database Schema & Data Dictionary

Entity: Tickets Table (HelpDeskDb)

Column Name Data Type Nullable Constraints & Domain Constraints Technical Description
Id INT No PRIMARY KEY IDENTITY(1,1) Auto-incrementing surrogate identifier
Title NVARCHAR(200) No MAXLENGTH(200), REQUIRED Concise summary title of the ticket
Description NVARCHAR(MAX) No REQUIRED Detailed description of issue or request
Priority NVARCHAR(20) No Domain: 'Low', 'Medium', 'High' Ticket priority / severity level
Status NVARCHAR(20) No Domain: 'Open', 'In Progress', 'Closed' Current ticket lifecycle status
RaisedBy NVARCHAR(100) No MAXLENGTH(100), REQUIRED User or entity who logged the ticket
CreatedDate DATETIME2 No UTC TIMESTAMP Date and time when the ticket was logged

🌐 REST API Endpoints Specification

All endpoints communicate via application/json payload structures.

HTTP Method Resource Endpoint Path Request Payload Response Codes Endpoint Functionality
GET /api/tickets None 200 OK, 500 Error Fetches all tickets ordered by CreatedDate DESC.
GET /api/tickets/{id} None 200 OK, 400 Bad, 404 Not Found Retrieves a single ticket by its primary key Id.
GET /api/tickets/status/{status} None 200 OK, 400 Bad Request Filters tickets matching valid status (Open, In Progress, Closed).
POST /api/tickets Ticket JSON 201 Created, 400 Bad Request Validates payload, persists ticket, returns CreatedAtAction route.
PUT /api/tickets/{id} Ticket JSON 200 OK, 400 Bad, 404 Not Found Updates ticket details following validation and ID check.
DELETE /api/tickets/{id} None 204 No Content, 404 Not Found Removes the target ticket from the database.

🧪 Test Suite & Quality Metrics

The test suite in HelpDesk.Tests achieves high code coverage across the core business logic and REST endpoints.

Test Module Testing Strategy Tools / Frameworks Test Count Status
TicketRepositoryTests Database integration testing via in-memory provider xUnit + EF Core InMemory 9 PASSED
TicketsControllerTests Isolated REST API controller unit testing xUnit + Moq 4.20 12 PASSED
Total Test Suite Comprehensive Automated Verification xUnit + Moq + EF Core 21 100% PASS

Execution Command

dotnet test HelpDeskManagement.sln --logger "console;verbosity=normal"

💻 Installation & Local Execution

1. Prerequisites

  • .NET 10.0 / 9.0 SDK
  • Microsoft SQL Server LocalDB ((localdb)\mssqllocaldb)
  • dotnet-ef global tool (dotnet tool install --global dotnet-ef)

2. Project Setup & Dependency Restoration

git clone https://github.com/RaunakSachdeva2004/HelpDeskManagement.git
cd HelpDeskManagement
dotnet restore HelpDeskManagement.sln

3. Database Creation & EF Core Migrations

Ensure LocalDB is active and run migrations:

sqllocaldb start MSSQLLocalDB
dotnet ef database update --project HelpDesk.Api/HelpDesk.Api.csproj

4. Running Web API & MVC App

Start Web API Service:

dotnet run --project HelpDesk.Api/HelpDesk.Api.csproj

API Base URL: https://localhost:7198

Start MVC Web Client (in a separate terminal):

dotnet run --project HelpDesk.Mvc/HelpDesk.Mvc.csproj

MVC Client URL: https://localhost:7112


📜 License

Distributed under the MIT License. See LICENSE for more information.

About

This repository contains the HelpDeskManagement project that I have successfully completed during my MPOnline Internship.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages