Skip to content

Full-stack E-Commerce learning project built using ASP.NET Core Web API, MVC and Entity Framework Core. Includes JWT authentication, clean architecture structure and modular API /Data/UI layers

Notifications You must be signed in to change notification settings

nithadeepak-cmd/EcomProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EcomProject

A modular E-Commerce learning project built using ASP.NET Core Web API, ASP.NET Core MVC, and Entity Framework Core with SQL Server. This solution is structured into independent API, Data, and MVC layers following clean, maintainable practices.

πŸš€ Tech Stack

ASP.NET Core 10 (Web API + MVC)

Entity Framework Core + SQL Server

EF Core Migrations (Category & Product tables)

Repository Pattern

Swagger / OpenAPI

JWT Authentication (Implemented inside Ecom.API only)

πŸ“‚ Solution Structure EcomProject β”‚ β”œβ”€β”€ Ecom.API β†’ REST API (Category & Product CRUD + JWT Auth) β”‚ β”œβ”€β”€ Controllers β”‚ β”œβ”€β”€ JWT authentication (local to this project) β”‚ β”œβ”€β”€ Swagger documentation β”‚ β”œβ”€β”€ Ecom.Data β†’ Data Access Layer β”‚ β”œβ”€β”€ DbContext (EcomDbContext) β”‚ β”œβ”€β”€ Entities (Category, Product) β”‚ β”œβ”€β”€ Repositories (Interface + Implementation) β”‚ β”œβ”€β”€ Migrations (EF Core) β”‚ └── Ecom.MVC β†’ MVC Frontend (to consume API later) β”œβ”€β”€ Controllers β”œβ”€β”€ Views β”œβ”€β”€ Models

πŸ” Authentication

JWT Authentication is implemented only inside Ecom.API

Login endpoint returns a JWT token

API endpoints validate the token

AuthService.API is NOT integrated yet (planned future step)

πŸ—„οΈ Database

Using SQL Server

EF Core migrations executed successfully

Tables created:

Categories

Products

Products have a foreign key referencing Categories

πŸ“˜ Current Features βœ… Category API

Get all categories

Get category by ID

Create category

Update category

Delete category

βœ… Product API

Get all products

CRUD operations

Category relationship included

βœ… Database Layer

Fully implemented repository pattern

EF Core migrations applied

SQL Server connection configured

⚠️ MVC Project

MVC created

API integration (calling Ecom.API) coming soon

πŸ“Œ Upcoming Features

Full integration of MVC UI ↔ Ecom.API

Move Authentication to AuthService.API (external microservice)

Add custom JWT middleware

Product image upload

Pagination / filtering / sorting

Admin & user roles

Deployment

πŸ§ͺ Testing the API (Swagger)

Run API and open:

https://localhost:/swagger

▢️ How to Run Locally 1️⃣ Update DB Connection

In appsettings.json of Ecom.API:

"ConnectionStrings": { "DefaultConnection": "your SQL Server connection string" }

2️⃣ Apply Migration (already done but for future updates) dotnet ef database update --project Ecom.Data

3️⃣ Run API dotnet run --project Ecom.API

4️⃣ Run MVC (UI) dotnet run --project Ecom.MVC

🀝 Contributions

This is a learning project β€” improvements and suggestions are welcome.

⭐ Support

If this project helps you in interviews or learning, please ⭐ the repository!

About

Full-stack E-Commerce learning project built using ASP.NET Core Web API, MVC and Entity Framework Core. Includes JWT authentication, clean architecture structure and modular API /Data/UI layers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published