Architecture - Learnathon-By-Geeky-Solutions/binary-brains GitHub Wiki

πŸ“„ Architecture Of AmarTech

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.


🧱 Architectural Layers

Clean Architecture Diagram

Clean Architecture with layers: Domain, Application, Infrastructure, Web, and Test.


1. AmarTech.Domain

  • 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.

2. AmarTech.Application

  • 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.

3. AmarTech.Infrastructure

  • 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.

4. AmarTech.Web

  • 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

5. AmarTech.Test

  • Contains unit tests written using xUnit and Moq.
  • Ensures code reliability and validates service logic and repository behaviors.

πŸ” Data Flow

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.

βš™οΈ Tools & Technologies Used

  • 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

πŸš€ Live Demo (Code)

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.

⚠️ **GitHub.com Fallback** ⚠️