PDF documentation and project overview

UserManagementApp control center

A .NET user management system with an ASP.NET Core API, EF Core SQLite persistence, a WPF desktop client, and NUnit automated tests.

5 Solution projects
2 User roles
32 NUnit tests

Architecture

The solution separates API, contracts, data access, WPF UI, and automated tests.

API

ASP.NET Core controllers expose authentication, database status, and user endpoints.

Core

DTOs, enums, models, and interfaces keep shared contracts independent.

Data

EF Core services use SQLite through AppDbContext and migrations.

Desktop

The WPF client uses simple MVVM-style view models and API clients.

Tests

NUnit tests cover services, API endpoints, and database behavior.

Permissions

Admin create, update, and delete requests use X-User-Id.

Desktop flows

The desktop app is a WPF client. It uses API clients instead of direct database access.

1

Login

Users sign in with username and password. The password can be shown or hidden.

2

Role routing

Admins open the admin dashboard. Regular users open the profile dashboard.

3

Admin CRUD

Admins can refresh, create, edit, and delete users through API calls.

4

Theme

Login, admin, user, and form windows support light and dark theme switching.

API map

Implemented endpoints in the current codebase.

Endpoints

POST/api/auth/login
GET/api/database/status
GET/api/users
GET/api/users/{id}
POST/api/users
PUT/api/users/{id}
DELETE/api/users/{id}
POST /api/users
X-User-Id: <admin-user-id>

{
  "userName": "new-user",
  "email": "new-user@test.com",
  "password": "123456",
  "role": "RegularUser",
  "firstName": "New",
  "lastName": "User"
}

Testing

The implemented test project uses NUnit, FluentAssertions, API clients, and test data helpers.

Unit tests

Service tests cover AuthService and UserService behavior.

API tests

HTTP tests cover login, database status, user CRUD, and permission cases.

Integration tests

Database tests cover EF Core model behavior and persistence rules.

Run locally

Commands used by the current solution.

dotnet restore

dotnet ef database update \
  --project UserManagementApp.Data \
  --startup-project UserManagementApp.Api \
  --context AppDbContext

dotnet run --project UserManagementApp.Api
dotnet run --project UserManagementApp.Desktop
dotnet test

# API base URL
http://localhost:5236

# Swagger in Development
http://localhost:5236/swagger