Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_BACK/llms.txt

Use this file to discover all available pages before exploring further.

Dragon Guard WMS is a .NET 8 ASP.NET Core REST API purpose-built for warehouse operations driven by handheld devices. It provides the back-end for scanning, receiving, shipping, and inventory workflows that field workers execute on the warehouse floor, while simultaneously exposing integration endpoints that keep your ERP system in sync. Every resource is scoped to a tenant (company), so a single deployment safely serves multiple independent warehouse clients with complete data isolation.

Architecture Overview

Dragon Guard follows a layered architecture within a single deployable ASP.NET Core Web API project. The runtime entry point is Program.cs, which wires up all middleware, dependency-injection registrations, and the EF Core auto-migration that runs on every startup.
LayerDirectoryResponsibility
HTTP surfaceControllers/Route definitions and request/response mapping. Most controllers inherit BaseController → ApiControllerBase, which applies [Authorize] and surfaces the authenticated user’s claims.
Business logicServices/Scoped service classes that own domain rules, validation, and orchestration.
Data contractsDTOs/Request and response types grouped by feature namespace — never directly exposing entity objects.
Domain modelEntities/EF Core-mapped classes that represent database tables.
Data accessData/WmsDbContext (EF Core) for most WMS modules; IDbConnectionFactory (Dapper) for authentication stored procedures.
Auth plumbingRepository/IAuthRepository for credential lookups and IJwtService for token generation.
Shared utilitiesCommon/Pagination request/response types and cross-cutting helpers.
SQL Server is the only supported database engine. The API uses EF Core 8 for general persistence and Dapper 2 for high-performance or stored-procedure-based authentication queries, giving you the best of both worlds without introducing a second database engine.

Key Capabilities

Receiving & Inbound

Manage inbound document flows, goods receipt confirmations, and bin put-away for handheld devices. Receiving workflows are tenant-scoped and feed directly into stock and inventory movement records.

Shipments & Outbound

Create, confirm, and track outbound shipments and pick operations. Pick headers, pick lines, and document sequences are all first-class API resources.

RFID Tag Management

Full RFID lifecycle: tag registration, issuance, assignment, scan auditing, duplicate-read policy enforcement, unknown-tag handling, ZPL label printing, and batch tag ordering — all surfaced as REST endpoints.

ERP Integration

Native connectors for Grupo MAS (with durable retry and released-work polling) and Microsoft Business Central. An API-key-authenticated /api/v1/integration/* surface lets ERP systems push catalog sync and document acknowledgments without a user JWT.

Supreme Admin

A privileged supreme role accessed via /api/supreme/* manages tenants, subscription plans, plan-suspension enforcement, and cross-tenant reporting — all protected behind super-admin claims.

Audit Logging

Operational execution logs capture every significant workflow event per tenant. A dedicated IOperationalExecutionLogService writes structured records that can be queried for compliance and debugging.

Project Structure

Wms.Api/
├── Controllers/          # HTTP endpoints (BaseController → ApiControllerBase)
├── Services/             # Domain service interfaces and implementations
├── Entities/             # EF Core entity classes
├── DTOs/                 # Feature-grouped request/response contracts
├── Data/                 # WmsDbContext, DbConnectionFactory, migrations
├── Repository/           # AuthRepository, JwtService
├── Common/               # Pagination helpers and shared types
├── Native/               # ZPL_SDK.dll (copied to output on build)
├── DataProtectionKeys/   # ASP.NET Data Protection key ring (runtime-generated)
├── appsettings.json
└── Program.cs

External Dependencies

The project references the following NuGet packages (see Wms.Api.csproj):
PackageVersionPurpose
BCrypt.Net-Next4.1.0Password hashing and verification
ClosedXML0.105.0Excel report generation
Dapper2.1.72Lightweight SQL queries and stored-procedure calls
Microsoft.AspNetCore.Authentication.JwtBearer8.0.0JWT Bearer middleware and token validation
Microsoft.Data.SqlClient7.0.0Low-level SQL Server connectivity
Microsoft.EntityFrameworkCore.SqlServer8.0.23ORM for WMS domain entities
Swashbuckle.AspNetCore6.6.2Swagger / OpenAPI documentation UI

Next Steps

Quickstart

Configure the API, run it locally, and make your first authenticated warehouse call in under 5 minutes.

Authentication

Learn how JWT login, handheld device login, API-key integration auth, and multi-tenant company resolution work together.

Build docs developers (and LLMs) love