Architecture - Learnathon-By-Geeky-Solutions/binary-brains GitHub Wiki
AmarTech is built using a modular and maintainable Clean Architecture approach. The solution is organized into clearly defined layers, each with its own responsibility, ensuring separation of concerns and promoting scalability, testability, and ease of maintenance.
Clean Architecture with layers: Domain
, Application
, Infrastructure
, Web
, and Test
.
- Contains all the core business entities (models) such as
Product
,Order
,ApplicationUser
,Company
, etc. - No dependencies on any other project.
- Acts as the heart of the applicationβs logic and data structures.
- Holds the service interfaces (
IService
) and service implementations that define the business logic. - Coordinates between the domain and infrastructure layers.
- Example: ProductService handles logic before delegating to the repository.
- Responsible for data access and database operations using Entity Framework Core.
- Implements repository patterns (
IRepository
,Repository
) and database context (ApplicationDbContext
). - Also includes DbInitializer to seed initial data.
- This is the presentation layer, built using ASP.NET Core MVC with Razor Views (
.cshtml
). - Handles user interaction, routing, and UI rendering.
- Organized into areas:
- Admin β For administrators to manage companies, products, categories, and orders.
- Customer β For regular users to register, log in, browse products, and place orders.
- Also contains:
- Identity configuration
- AppSettings.json
- Startup/Program.cs
- Contains unit tests written using xUnit and Moq.
- Ensures code reliability and validates service logic and repository behaviors.
Controller (Web) β‘ Service Layer (Application) β‘ Repository (Infrastructure) β‘ Database
- Controllers handle HTTP requests and delegate logic to services.
- Services contain business logic and coordinate with repositories.
- Repositories handle data operations through Entity Framework Core.
- ASP.NET Core MVC
- ASP.NET Core Identity
- Entity Framework Core
- SQL Server
- Bootstrap & JavaScript
- Stripe API (for payments)
- xUnit & Moq (for testing)
- Facebook OAuth
You can explore the full project structure and codebase on GitHub:
π GitHub Repository: AmarTech Structure
This layered architecture ensures the application is modular, loosely coupled, and easy to maintain or extend. Itβs ideal for demonstrating professional project structure in academic and production-level software development.