Documentation Index
Fetch the complete documentation index at: https://docs.aspfox.com/llms.txt
Use this file to discover all available pages before exploring further.
Folder tree
After scaffolding withdotnet new aspfox -n Acme, you get this structure:
Backend projects
Acme.Domain
The innermost layer. Contains entities, value objects, enums, domain constants, and domain exceptions. Has no dependencies on any other project or NuGet package exceptMicrosoft.Extensions.Logging.Abstractions.
What it contains: User, Tenant, Subscription, Invitation, RefreshToken, Notification, and all other domain entities. Permission constants in Permissions.cs. Email enum values in EmailTemplate.cs.
What it cannot reference: Entity Framework Core, ASP.NET Core, MediatR, or anything else from the infrastructure or presentation layer. If it needs to reference it, it belongs somewhere else.
Acme.Application
The use-case layer. Contains all CQRS commands, queries, their handlers, validators, and DTOs. Defines interfaces that the Infrastructure layer implements (IApplicationDbContext, IEmailService, IStripeService, INotificationService, etc.).
What it contains: One folder per feature (Auth/, Tenants/, Billing/, Notifications/, Admin/). Each feature folder has subfolders for commands and queries. MediatR pipeline behaviours for logging and validation.
What it cannot reference: Entity Framework Core directly (only through IApplicationDbContext), ASP.NET Core, Stripe SDK, Resend SDK. The Application layer defines what it needs through interfaces; Infrastructure provides the implementations.
Acme.Infrastructure
Implements the interfaces defined in Application. This is where EF Core, Redis, Stripe, Resend, and Hangfire live. What it contains:ApplicationDbContext with entity configurations and global query filters, StripeService, ResendEmailService, RedisCache, Hangfire job implementations, TenantContext scoped service, EF Core migrations.
What it cannot reference: Acme.Api directly. Infrastructure knows nothing about HTTP or controllers.
Acme.Api
The host project. Contains controllers, middleware, program startup, and the dependency injection wiring that connects all layers. What it contains: Controllers (thin — they delegate to MediatR immediately),TenantResolutionMiddleware, SubscriptionMiddleware, HasPermissionAttribute and the dynamic policy provider, Swagger configuration, CORS policy, program startup.
What it cannot reference: Entity Framework Core directly (only through the Application layer), domain logic. Controllers should contain no business logic.
Clean Architecture dependency rule
The layers depend strictly inward. Nothing in an inner layer knows anything about an outer layer.IApplicationDbContext interface, Infrastructure provides ApplicationDbContext that implements it.
Frontend structure
features/billing/ contains the billing page, the billing hooks, billing types, and the billing API functions. You do not have to hunt across multiple top-level folders when working on a single feature.