What You Will Build
A production-ready ASP.NET Core codebase for an enterprise B2B application, generated from a paragraph. The generated app includes:
- ASP.NET Core controllers (or minimal API) with
[Authorize] - Entity Framework Core entities and
DbContext - EF Core global query filters for organisation-scoped multi-tenancy
- JWT authentication
- EF Core migrations and
appsettings.json - A working
docker-compose.yml
.NET is the right pick for Microsoft-stack shops, Windows enterprises, and teams deploying to Azure.
Prerequisites
- An Archiet account (free at archiet.com/register)
- Docker installed locally
- 10 minutes
Step 1: Write a Minimal PRD
Assets is an enterprise B2B app for IT teams. Organisations onboard admins.
Admins track assets (tag, type, status, assigned-to) and assignments to
employees. Only admins in an organisation see that organisation's assets. We
need login and password reset, and an audit of asset reassignments.
Archiet extracts Organisation, User, Asset, and Assignment, plus the audit requirement.
Step 2: Open the Blueprint Wizard
Log in at archiet.com/login, click New Blueprint, paste the PRD, click Analyse, review the model.
Step 3: Choose .NET
On the Generate screen, select .NET and click Generate.
Step 4: What You Get
Assets/
├── src/Assets.Api/
│ ├── Program.cs
│ ├── Controllers/
│ │ ├── AssetsController.cs
│ │ └── AssignmentsController.cs
│ ├── Data/
│ │ └── AppDbContext.cs # global query filters
│ ├── Entities/
│ │ ├── Asset.cs
│ │ └── Assignment.cs
│ └── appsettings.json
├── docker-compose.yml
└── Assets.sln
The entity and controller are idiomatic ASP.NET Core, and the tenant filter is enforced once in the DbContext:
// Entities/Asset.cs
public class Asset
{
public Guid Id { get; set; }
public Guid OrgId { get; set; }
public string Tag { get; set; } = default!;
public AssetStatus Status { get; set; }
}
// Data/AppDbContext.cs
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<Asset>()
.HasQueryFilter(a => a.OrgId == _tenant.OrgId);
}
// Controllers/AssetsController.cs
[Authorize]
[HttpGet]
public async Task<IEnumerable<AssetDto>> List() =>
// global query filter already scopes to the tenant
await _db.Assets.Select(a => a.ToDto()).ToListAsync();
The EF Core HasQueryFilter applies the organisation filter to every query against Asset automatically — a developer cannot forget it.
Step 5: Run It Locally
cd Assets
cp .env.example .env
docker compose up -d
# or locally:
dotnet run --project src/Assets.Api
The API is at http://localhost:5000/, with Swagger at /swagger. JWT auth protects every [Authorize] endpoint.
What to Do Next
Deploy to Azure: the generated structure deploys cleanly to Azure App Service or Container Apps.
Use the ecosystem: standard ASP.NET Core means Identity, SignalR, and the full .NET library set apply.
Other enterprise stacks: Java Spring Boot offers an equivalent structure on the JVM; Go for a smaller, faster binary.
The generated ARCHITECTURE.md documents the multi-tenancy approach (global query filters), the auth model, and the persistence decisions.