Skip to content

Repository files navigation

ETicaret API — E-Commerce Backend

A learning project exploring Clean Architecture in .NET end-to-end — built as personal practice to internalise layered design, MediatR-based application services, real-time notifications and JWT authentication.

Overview

ETicaretAPI is the backend for a full e-commerce platform: products, orders, baskets, file uploads, authentication, and real-time notifications when new orders are placed. The codebase strictly follows Clean Architecture with Core / Infrastructure / Presentation layers, each with a single responsibility.

The matching Angular SPA lives at ETicaretClient.

Architecture

Presentation/
  └── ETicaretAPI.API/          # ASP.NET Core Web API — controllers, middleware, DI bootstrap

Core/
  ├── ETicaretAPI.Application/   # Application services: MediatR handlers, DTOs, abstractions
  └── ETicaretAPI.Domain/        # Entities, domain types — no external dependencies

Infrastructure/
  ├── ETicaretAPI.Infrastructure/  # File services, token handlers, external integrations
  ├── ETicaretAPI.Persistence/     # EF Core, DbContext, repositories, configurations
  └── ETicaretAPI.SignalR/         # Real-time hub for order notifications

Client/
  └── ETicaretClient/              # Angular frontend (separate repo)

Tech Stack

Layer Technology
Runtime ASP.NET Core (.NET)
Architecture Clean Architecture (5 layers: Domain / Application / Infrastructure / Persistence / Presentation)
Application pipeline MediatR (CQRS-style handlers)
Persistence Entity Framework Core + repositories
Real-time SignalR (admin order notifications)
Authentication JWT Bearer + ASP.NET Core Identity
Frontend (paired) Angular 19 (see ETicaretClient)

Running Locally

# 1. Restore packages
dotnet restore

# 2. Update connection strings in Presentation/ETicaretAPI.API/appsettings.json

# 3. Apply migrations
dotnet ef database update -p Infrastructure/ETicaretAPI.Persistence -s Presentation/ETicaretAPI.API

# 4. Run the API
dotnet run --project Presentation/ETicaretAPI.API

API runs at https://localhost:7XXX — Swagger UI exposed at root.

What I Practised Building This

  • Strict layer boundaries (Domain → Application → Infrastructure dependency direction)
  • MediatR IRequest<T> + IRequestHandler pattern across the entire write/query surface
  • SignalR hub design + client-server connection lifecycle
  • JWT issuance + refresh-token flow with Identity
  • File upload pipeline with abstracted storage providers

About

Built by Ali Kalantari — Backend Developer specialising in regulated fintech systems (.NET, Python, multi-database, event-driven). This is a learning project alongside production work.

About

E-commerce backend in ASP.NET Core with Clean Architecture, MediatR, SignalR real-time notifications and JWT auth — paired with an Angular client.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages