SyncroArch.ERP.Template
1.0.0
dotnet new install SyncroArch.ERP.Template::1.0.0
SyncroArch ERP — Enterprise Clean Architecture Starter
SyncroArch ERP is a state-of-the-art, enterprise-grade multi-project starter solution designed with Clean Architecture principles. It serves as a robust, highly performant, and secure foundation for building modern Enterprise Resource Planning (ERP) applications, SaaS platforms, or complex business systems.
Featuring a hybrid data-access layer (combining Entity Framework Core and Dapper), structured enterprise security, global observability, and a fully automated Visual Studio solution template, SyncroArch ERP gets your business software from idea to production in minutes.
🏗️ Architecture Blueprint
The solution is divided into three distinct projects representing clean layers, enforcing strict separation of concerns and ensuring long-term maintainability:
graph TD
classDef project fill:#1f2937,stroke:#3b82f6,stroke-width:2px,color:#f3f4f6;
classDef framework fill:#111827,stroke:#10b981,stroke-width:1px,color:#d1d5db;
Web["SyncroArch.Web<br/>(Presentation & Application)"]:::project
Data["SyncroArch.Data<br/>(Data Services & micro-ORM)"]:::project
Entities["SyncroArch.Entities<br/>(Core Domain Models)"]:::project
Web --> Data
Web --> Entities
Data --> Entities
EF["EF Core<br/>(Identity, Schema & Migrations)"]:::framework
Dapper["Dapper<br/>(High-Performance Reads)"]:::framework
Serilog["Serilog<br/>(Observability & Seq)"]:::framework
Web -.-> EF
Data -.-> Dapper
Web -.-> Serilog
Data -.-> Serilog
1. 🛡️ Core Domain Layer (SyncroArch.Entities)
This is the core of the application, representing the purest layer which has no external dependencies except basic system libraries and ASP.NET Core Identity primitives.
- Domain Models: Holds core domain objects, database entity mapping structures, and constant blueprints.
- Identity Extension: Houses custom implementations of
ApplicationUserandApplicationRole(extended to support company-level isolation, system roles, audit flags, and custom tracking). - Enterprise Dictionary: Multi-lingual resource dictionaries (
en.resx) and localized designers.
2. ⚡ Repository & Data Services Layer (SyncroArch.Data)
This layer implements all business database interactions, focusing on raw performance, data access contracts, and loose dependency injection.
- Dapper Micro-ORM: Leverages Dapper for lightning-fast database read operations, complex stored procedures, and high-velocity reporting.
- Generic Repository Pattern: Implements the
IBaseRepository<T>/BaseRepository<T>pattern for rapid entity query and persistence operations. - Dependency Injection Hub: Self-contained application service registration hub (
RegisterAPPServices) ensuring that the presentation layer stays decoupled from infrastructure details.
3. 🚀 Presentation & Orchestration Layer (SyncroArch.Web)
The entry point of the application, built on ASP.NET Core MVC and Razor Pages.
- Entity Framework Core: Powers secure schema migrations, database seeding (
ContextSeed), and transaction-safe modifications. - Advanced Claims-Based Security: Provides a granular, hierarchal permission dashboard allowing administrator control over Modules, Permissions, Controls, and APIs.
- Observability (Serilog): Features a structured bootstrap logger writing structured diagnostics directly to the Console, Microsoft SQL Server, and Seq.
- Request Pipeline Middleware: Custom middlewares (
UserMiddelware,UserLogContextMiddleware) that inject transaction audits and user contexts dynamically into every log message. - Enterprise UX Features: Dynamic navigation panel menus (
NavigationService), automated breadcrumbs filter pipelines (BreadcrumbFilter), and custom layouts.
✨ What You Get in This Starter
By using this template, you start with a fully-configured enterprise pipeline out of the box:
- Hybrid ORM Performance: EF Core for transactional writes, relational safety, and database schema migrations; Dapper for high-speed query execution and reporting.
- Granular Role & Claim Management: Multi-tier authorization matrix that restricts page elements (Controls), controllers, and endpoints (APIs) based on administrative role configurations.
- Observability & Traceability: Automated logger enriching logs with active
UserIdandCompanyIdcontexts so you can trace individual tenant operations instantly. - Production-Ready Seeding: Pre-configured root role claim sets and default administrative accounts that seed database structures automatically on first run.
- Pristine Project Generator: Package your solution into a template in one command. When generated, all directories, C# namespaces, razor files, references, and project files are instantly renamed to match your new target namespace.
💎 Major Architectural Benefits
| Feature | The SyncroArch Way | Generic Starters | Benefit |
|---|---|---|---|
| Data Access | Hybrid (Dapper + EF Core) | EF Core Only | Ultimate read speed while keeping strict schema migration safety. |
| Authorization | Dynamic Claim Hierarchy | Static Role Strings | Change user and page-level permissions live without compiling code. |
| Dependency Injection | Decoupled Module Registry | Monolithic Program.cs |
Superb modularity; adding new repositories doesn't clutter entry points. |
| Audit & Logs | Context-Enriched Serilog | Standard Console Logs | High observability; locate errors in Seq or SQL tables instantly. |
| Architecture | Domain-Driven Onion Layout | Spaghetti MVC | Maintainable codebase that stays clean as your team grows. |
🚀 Quick Start Guide
1. Generating a New Solution from the Template
If you installed the NuGet template package:
dotnet new install SyncroArch.ERP.Template
Generate your customized ERP codebase in a single command:
dotnet new syncroarch-erp -n "MyCompany.SalesManager"
This will create a MyCompany.SalesManager folder with a fully compiled, renamed, and connected solution!
2. Running Locally
- Configure your SQL Server database connection string inside
appsettings.jsonunderConnectionStrings:SqlConnection. - Ensure you have Serilog targets set up (Console logging is enabled by default).
- Open the solution in Visual Studio 2022 or run via command line:
dotnet run --project MyCompany.SalesManager.Web - On first startup, the database migrations will run automatically, seed the system roles, and establish the default administrator account.
📜 License
This starter template is private and proprietary. All rights reserved. Created and maintained by Wahaj Khan.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 83 | 5/30/2026 |