Loading...
Loading...
Generates .NET Clean Architecture backend structure from entity definitions
npx skill4agent add levnikolaevich/claude-code-skills ln-722-backend-generator| Aspect | Description |
|---|---|
| Input | Project name, entity list, configuration options |
| Output | Complete .NET solution with layered architecture |
| Target | .NET 10+, ASP.NET Core |
| Phase | Name | Actions | Output |
|---|---|---|---|
| 1 | Receive Context | Get project name, entities, options from coordinator | Configuration |
| 2 | Create Solution | Create .sln and .csproj files | Empty solution structure |
| 3 | Generate Domain | Create entities, enums, base classes | Domain project files |
| 4 | Generate API | Create controllers, DTOs, middleware | API project files |
| 5 | Verify | Build solution, check references | Build success |
| Input | Type | Required | Description |
|---|---|---|---|
| string | Yes | Solution and project name prefix |
| string | Yes | Directory for generated solution |
| string | Yes | .NET version (e.g., net10.0) |
| list | Yes | Entity names to generate |
| list | Yes | Feature groupings for MockData |
| Option | Default | Effect |
|---|---|---|
| true | Add Swashbuckle for API docs |
| true | Add structured logging |
| true | Add health endpoints |
| true | Generate mock data classes |
| Step | Action | Reference |
|---|---|---|
| 2.1 | Create solution directory | — |
| 2.2 | Generate .sln file | — |
| 2.3 | Create project directories | |
| 2.4 | Generate .csproj files per layer | |
| 2.5 | Add project references | |
| Project | Purpose |
|---|---|
| HTTP endpoints, middleware |
| Entities, enums |
| Business logic interfaces |
| Data access interfaces |
| Cross-cutting utilities |
| Step | Action | Reference |
|---|---|---|
| 3.1 | Create | |
| 3.2 | Generate entity classes per input | |
| 3.3 | Generate status enums | |
| 3.4 | Create folder structure | |
| Entity Property | Generated As |
|---|---|
| Primary key | |
| String field | |
| Status field | |
| Timestamps | |
| Step | Action | Reference |
|---|---|---|
| 4.1 | Generate Program.cs | |
| 4.2 | Generate controllers per entity | |
| 4.3 | Generate DTOs per entity | |
| 4.4 | Generate middleware classes | |
| 4.5 | Generate extension methods | |
| 4.6 | Generate MockData classes (if enabled) | |
| 4.7 | Add NuGet packages | |
| Endpoint | Method | Route |
|---|---|---|
| GetAll | GET | |
| GetById | GET | |
| Create | POST | |
| Update | PUT | |
| Delete | DELETE | |
| Check | Command | Expected |
|---|---|---|
| Solution builds | | Success, no errors |
| Project references | Check .csproj | All references valid |
| Files created | Directory listing | All expected files present |
| Layer | Folders | Files per Entity |
|---|---|---|
| Api | Controllers/, DTOs/, Middleware/, MockData/, Extensions/ | Controller, DTO |
| Domain | Entities/, Enums/, Common/ | Entity, Status enum |
| Services | Interfaces/ | Interface (stub) |
| Repositories | Interfaces/ | Interface (stub) |
| Shared | — | Utility classes |
dotnet builddotnet build| Risk | Detection | Mitigation |
|---|---|---|
| Build failure | | Check .csproj references, verify SDK version |
| Missing references | CS0246 errors | Add missing project references |
| Invalid entity names | Build or runtime errors | Validate entity names before generation |
| Path conflicts | File exists errors | Check target path, prompt before overwrite |
| Package restore failure | NuGet errors | Verify network, check package names |
| File | Purpose |
|---|---|
| Project organization, folder structure, dependencies |
| Entity generation rules, property patterns |
| Controller and DTO generation rules |
| Program.cs structure and service registration |
| Required and optional NuGet packages |