Skip to main content

SAPFIAI API Documentation

Build secure, scalable enterprise applications with Clean Architecture, CQRS, and advanced security features powered by ASP.NET Core 8.0

Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddApplicationServices();
builder.Services.AddInfrastructureServices(builder.Configuration);
builder.Services.AddWebServices();

var app = builder.Build();

app.UseAuthentication();
app.UseAuthorization();
app.MapEndpoints();

app.Run();

Quick Start

Get your SAPFIAI API up and running in minutes

1

Clone and restore dependencies

Clone the repository and restore all NuGet packages
git clone https://github.com/JonathanArroyaveGonzalez/SistemaFinancieroUcaldas_Backend.git
cd SAPFIAI
dotnet restore
2

Configure database connection

Update your connection string in src/Web/appsettings.json
appsettings.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SAPFIAIDb;Trusted_Connection=true;MultipleActiveResultSets=true"
  }
}
3

Apply database migrations

Run Entity Framework migrations to set up your database
dotnet ef database update --project src/Infrastructure --startup-project src/Web
4

Run the API

Start the development server and access the Swagger UI
dotnet run --project src/Web
The API will be available at https://localhost:5001/api with interactive Swagger documentation

Explore by Topic

Deep dive into SAPFIAI’s core features and architecture

Clean Architecture

Understand the layered architecture separating Domain, Application, Infrastructure, and Web concerns

CQRS Pattern

Learn how commands and queries are separated using MediatR for scalable operations

Authentication

Implement JWT authentication with refresh tokens and two-factor authentication

Authorization

Build granular role-based access control with custom permissions

Security Features

Explore IP blocking, audit logs, and advanced security mechanisms

Testing

Write unit, functional, and integration tests with NUnit and Moq

API Reference

Complete documentation for all API endpoints

Authentication Endpoints

Register, login, logout, refresh tokens, and two-factor authentication

Roles & Permissions

Create and manage roles, assign permissions, and control access

Security Management

Monitor audit logs, manage IP blacklists, and health checks

Health Checks

Monitor API health and database connectivity

Key Features

What makes SAPFIAI the ideal foundation for enterprise APIs

Clean Architecture

Clear separation of concerns with Domain, Application, Infrastructure, and Web layers for maintainable and testable code

CQRS with MediatR

Command Query Responsibility Segregation pattern for scalable operations with clean handler separation

Advanced Security

JWT authentication, refresh tokens, 2FA, IP blocking, login attempt tracking, and comprehensive audit logging

Entity Framework Core 8

Modern ORM with SQL Server support, migrations, and optimized query patterns

FluentValidation

Centralized validation logic with clear, reusable validation rules for all commands and queries

Comprehensive Testing

Unit, functional, and integration tests with NUnit, FluentAssertions, and Moq for reliable code

Ready to get started?

Follow our quickstart guide to build your first secure API endpoint with SAPFIAI in minutes

Start Building Now