Skip to content

Application for browsing database entites. React Frontend, Backend ASP.NET Core projects, Uniyt Tests and Benchmark projects

License

Notifications You must be signed in to change notification settings

zizul/audit-app

Repository files navigation

Audit App

The application consists of two projects:

  • Frontend: audit-history-frontend in React, used to pass parameters to the API and display paginated results.
  • Backend: AuditHistoryApp in ASP.NET Core, providing an API based on a layered architecture (Controller → Service → Repository → Database).

Applied Solutions

Backend Architecture

  • Repository Layer: Reads data from the database and maps it to models.
  • Service Layer: Transforms models into DTOs returned by the API.
  • Design Patterns:
    • Repository: Isolates data access logic.
    • Strategy: Different interface implementations registered via KeyedServices (e.g., IAuditService, IAuditRepository).
    • Dependency Injection: Registers services and injects dependencies.
    • DTO: Transfers data between layers.
    • Decorator: Implements pagination via the PaginatedResponse<T> class.
  • Async Programming (async/await) for non-blocking operations.
  • Optimized SQL queries in EF Core (e.g., reduced joins).
  • EF Core with AsNoTracking() for read-only queries and protection against SQL injection.
  • Transactions to ensure data consistency between database queries.
  • Two services fetching data with different EF Core query variants. Default service: AuditService.

Frontend

  • API interaction via browser HTTP.
  • Paginated result display.

API Documentation

Unit Tests

  • Available in the AuditHistoryApp.Tests project.

Benchmarking

  • BenchmarkAuditHistoryApp project to test processing times of EF Core query variants.
  • Average times: AuditService (98.59 ms) vs. SecondAuditService (297.12 ms).

Launch Instructions

To run the application, use the following commands:

Backend StartBackend.bat

Frontend StartFrontend.bat

Benchmark StartBenchmark.bat

The application requires .NET 9.0.

About

Application for browsing database entites. React Frontend, Backend ASP.NET Core projects, Uniyt Tests and Benchmark projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published