OpenParable
Skip to content
← Back to skills

Abp App Nolayers

Development
abp-app-nolayers

Abp App Nolayers is an Agent Skill for development published in the abpframework/abp repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects. Use when working with the single-layer web application template or when the project has no layered separation.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/abpframework/abp/blob/HEAD/.claude/skills/abp-app-nolayers/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/abp-app-nolayers, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

ABP Single-Layer Application Template

Docs: https://abp.io/docs/latest/solution-templates/single-layer-web-application

Solution Structure

Single project containing everything:

MyProject/
├── src/
│   └── MyProject/
│       ├── Data/              # DbContext, migrations
│       ├── Entities/          # Domain entities
│       ├── Services/          # Application services + DTOs
│       ├── Pages/             # Razor pages / Blazor components
│       └── MyProjectModule.cs
└── test/
    └── MyProject.Tests/

Key Differences from Layered

Layered TemplateSingle-Layer Template
DTOs in Application.ContractsDTOs in Services folder (same project)
Repository interfaces in DomainUse generic IRepository<T, TKey> directly
Separate Domain.Shared for constantsConstants in same project
Multiple module classesSingle module class

File Organization

Group related files by feature:

Services/
├── Books/
│   ├── BookAppService.cs
│   ├── BookDto.cs
│   ├── CreateBookDto.cs
│   └── IBookAppService.cs
└── Authors/
    ├── AuthorAppService.cs
    └── ...

Simplified Entity (Still keep invariants)

Single-layer templates are structurally simpler, but you may still have real business invariants.

  • For trivial CRUD entities, public setters can be acceptable.
  • For non-trivial business rules, still prefer encapsulation (private setters + methods) to prevent invalid states.
public class Book : AuditedAggregateRoot<Guid>
{
    public string Name { get; set; }  // OK for trivial CRUD only
    public decimal Price { get; set; }
}

No Custom Repository Needed

Use generic repository directly - no need to define custom interfaces:

public class BookAppService : ApplicationService
{
    private readonly IRepository<Book, Guid> _bookRepository;

    // Generic repository is sufficient for single-layer apps
}