Full-Stack E-Commerce

berryfy

Modern Full-Stack E-Commerce Platform

A production-grade e-commerce solution built with .NET 9 and Next.js 15, featuring a comprehensive admin dashboard, full payment processing, inventory management, and modern UI/UX.

.NET 9 Next.js 15 TypeScript Layered Architecture Docker SQL Server
demo.berryfy.org
berryfy
0
+

API Endpoints

0

API Controllers

0
+

Frontend Routes

0
+

Technologies

Project Overview

Berryfy is a comprehensive e-commerce platform built with .NET 9 and Next.js 15.1, demonstrating end-to-end shopping flows, a powerful admin dashboard, simulated payment processing, and full inventory management — all containerized with Docker.

Layered Architecture

SOLID principles with strict separation across Domain, Application, Infrastructure, and API layers — making every piece independently testable.

Modern Tech Stack

Built on .NET 9, Next.js 15 App Router, TypeScript, Entity Framework Core 9, Bootstrap 5, and Docker — the latest and greatest across the stack.

Enterprise Security

JWT authentication with refresh tokens, role-based authorization, email confirmation, input validation, and CORS policies baked in from day one.

Key Features

Every feature a production e-commerce store needs — from storefront to admin.

E-Commerce Core

  • Product catalog with categories, images & search
  • Shopping cart — user-based & session-based
  • Full checkout flow with address & shipping info
  • Order management, tracking & status updates
  • Wishlist with sharing & duplicate support
  • Coupon & discount system with code validation
  • Real-time inventory tracking & low-stock alerts

Admin Dashboard

  • Sales analytics, revenue charts & reports
  • Customer management with order history
  • Product & category CRUD with image uploads
  • Order processing, cancellation & refunds
  • Coupon lifecycle management & bulk assignment
  • User & role management with bulk operations
  • Inventory adjustments, stock history & notifications

Authentication & Security

  • JWT access tokens with refresh token rotation
  • Role-based authorization (SuperAdmin, Admin, User)
  • Email confirmation & resend confirmation flow
  • Forgot password & secure reset via email token
  • User profile management & existence checks
  • Input validation with fluent validators
  • CORS policies & HTTPS enforcement

Payments & Operations

  • Payment processing with verify & refund flows
  • Payment stats, filtering & search for admins
  • PDF receipt download per payment
  • Inventory reserve, release & confirm on checkout
  • Shop settings management
  • Server-Side Rendering (SSR) with Next.js App Router
  • Docker Compose for one-command local setup

Architecture

Strict layer separation keeps concerns isolated and dependencies pointing inward — the domain knows nothing about infrastructure, the UI knows nothing about the database.

Backend (.NET 9)

API Layer Controllers · Middleware · OpenAPI/Scalar · Health checks
Application Layer Services · DTOs · AutoMapper · FluentValidation
Infrastructure Layer EF Core · Repositories · Migrations · Email (SMTP)
Domain Layer Entities · Business rules · Repository interfaces · Constants

Frontend (Next.js 15)

Pages & Layouts App Router · SSR · Middleware · Auth-guarded routes
Components Admin · Cart · Checkout · Product · Auth · Shared UI
Services & Actions Server Actions · API client services · Cookie management
Types & Utils TypeScript definitions · Helper utilities · Constants

Infrastructure & Deployment

Docker Compose API, Next.js frontend, and SQL Server wired with health checks and a shared network
SQL Server 2022 EF Core 9.0.4 Code-First — migrations applied automatically at startup
Zoho SMTP Transactional email for OTP confirmation codes and password-reset links
Health Checks /health endpoint on the API — dependent services wait for healthy state

Technology Stack

Modern, enterprise-grade technologies for optimal performance and developer experience.

Backend Technologies

.NET
.NET 9 + ASP.NET Core Controller-based REST API with OpenAPI 9.0.2 & Scalar 1.2.61 docs
EF
Entity Framework Core 9.0.4 Code-First ORM with SQL Server — migrations auto-applied at startup
JWT
JWT Bearer 9.0.4 + Refresh Tokens Access token (2 h) + rotating refresh token (7 d) with revocation
FV
FluentValidation 11.3.1 Declarative, testable validation rules for all request DTOs
AM
AutoMapper 16.1.1 Zero-boilerplate entity → DTO mapping across all layers
SL
Serilog 10.0.0 Structured logging across Application and API layers
ZH
Zoho SMTP Transactional email — OTP codes, password resets & order notifications

Frontend Technologies

Next.js 15.1.8 + React 19 App Router, SSR, Server Actions, React Server Components
TS
TypeScript 5 End-to-end type safety from API response to UI component
BS
Bootstrap 5.3.6 + Bootstrap Icons 1.13 Responsive layout with React Bootstrap 2.10 components
MW
Next.js Middleware Token refresh, auth-guarded routes & session cookie management at the edge
🐳
Docker + Docker Compose All services containerized — one command to run locally
DF
date-fns 4.1 · uuid 11.1 Date formatting and unique ID generation across the storefront

API Endpoints

12 resource controllers, 100+ endpoints, standardized response envelopes, and role-based authorization across every resource.

Authentication

22+ endpoints
POST/api/auth/register
POST/api/auth/login
POST/api/auth/logout
GET/api/auth/me
PUT/api/auth/me
POST/api/auth/refresh-token
POST/api/auth/forgot-password
POST/api/auth/reset-password
POST/api/auth/confirm-email
POST/api/auth/resend-confirmation
GET/api/auth/users
GET/api/auth/exists/email-address/{email}

Products

9 endpoints
GET/api/products
GET/api/products/all
GET/api/products/{id}
GET/api/products/name/{name}
POST/api/products
PUT/api/products/{id}
DEL/api/products/{id}
GET/api/products/exists-by-id/{id}
GET/api/products/exists-by-name/{name}

Categories

7 endpoints
GET/api/categories
GET/api/categories/{id}
GET/api/categories/name/{name}
POST/api/categories
PUT/api/categories/{id}
DEL/api/categories/{id}

Shopping Cart

15 endpoints
GET/api/shopping-carts/current
GET/api/shopping-carts/{id}
POST/api/shopping-carts/create
POST/api/shopping-carts/add-item
PUT/api/shopping-carts/{cartId}/update
DEL/api/shopping-carts/{cartId}/remove/{productId}
POST/api/shopping-carts/{cartId}/apply-coupon
DEL/api/shopping-carts/{cartId}/remove-coupon/{couponId}
POST/api/shopping-carts/{cartId}/checkout
POST/api/shopping-carts/{cartId}/complete
DEL/api/shopping-carts/{cartId}/clear

Orders

12 endpoints
POST/api/orders
GET/api/orders/{id}
GET/api/orders/user/{userId}
GET/api/orders/reference/{referenceNumber}
GET/api/orders/status/{status}
GET/api/orders/admin/all
PUT/api/orders/{orderId}/update-status
PUT/api/orders/{orderId}/cancel
PUT/api/orders/{orderId}/refund
PUT/api/orders/{orderId}/process
GET/api/orders/calculate-totals

Payments

15+ endpoints
POST/api/payments/process
POST/api/payments/{transactionId}/verify
POST/api/payments/{id}/refund
GET/api/payments/{id}
GET/api/payments/user/{userId}
GET/api/payments/my-payments
GET/api/payments/paginated
GET/api/payments/stats/count
GET/api/payments/stats/amount/total
GET/api/payments/search
PUT/api/payments/{id}/status

Coupons

12+ endpoints
GET/api/coupons
GET/api/coupons/{id}
GET/api/coupons/code/{code}
GET/api/coupons/users/{userId}/coupons
POST/api/coupons
POST/api/coupons/add-coupon-to-all-users/{couponId}
POST/api/coupons/add-coupon-to-specific-users/{couponId}
POST/api/coupons/add-coupon-to-new-users/{couponId}
PUT/api/coupons/{id}
DEL/api/coupons/{id}

Wishlists

20+ endpoints
GET/api/wishlists
GET/api/wishlists/{id}
GET/api/wishlists/default
GET/api/wishlists/check-product/{productId}
POST/api/wishlists
POST/api/wishlists/items/add
POST/api/wishlists/{id}/duplicate
PUT/api/wishlists/{id}/share
DEL/api/wishlists/{wishlistId}/items/{productId}
DEL/api/wishlists/{id}/clear
GET/api/wishlists/admin/stats

Inventories

11 endpoints
GET/api/inventories/product/{productId}
GET/api/inventories/check-stock/{productId}
GET/api/inventories/low-stock
GET/api/inventories/history/{productId}
POST/api/inventories/reserve-stock
POST/api/inventories/release-reserved-stock
POST/api/inventories/confirm-deduction
POST/api/inventories/add-stock
POST/api/inventories/process-notifications
PUT/api/inventories/adjust-stock

Role Management

14 endpoints
GET/api/role-managements/roles
POST/api/role-managements/roles
PUT/api/role-managements/roles/{oldRoleName}
DEL/api/role-managements/roles/{roleName}
POST/api/role-managements/users/{userId}/roles/{roleName}
DEL/api/role-managements/users/{userId}/roles/{roleName}
POST/api/role-managements/bulk-assign
POST/api/role-managements/initialize-default-roles
GET/api/role-managements/stats
GET/api/role-managements/users

Shops & Checkout Info

6 endpoints
GET/api/shops/{id}
PUT/api/shops/{id}
GET/api/UserCheckoutInfo
POST/api/UserCheckoutInfo/checkout
POST/api/UserCheckoutInfo/billing
DEL/api/UserCheckoutInfo

Health & Utilities

Live
GET/health
GET/api/receipts/{id}/download
GET/api/auth/exists/email-address/{email}
GET/api/auth/exists/username/{username}
GET/api/products/exists-by-name/{name}
GET/api/categories/exists-by-name/{name}
Source Code

Live Demo

The demo runs with pre-seeded products and categories. Sign in to explore the full shopping or admin experience.

Customer Experience

Test the full shopping flow end-to-end:

  • Browse products & categories with search & filters
  • Add to cart (session-based for guests, user-based when logged in)
  • Add to wishlist, share & duplicate wishlists
  • Apply coupon codes at checkout
  • Complete checkout with saved shipping info
  • Simulated payment processing & PDF receipt download
  • View order history, track status & request refunds
  • Manage profile, change password, saved checkout info

Admin Dashboard

Full back-office control panel:

  • Analytics dashboard — sales, revenue & traffic charts
  • Product & category CRUD with image management
  • Order processing — update status, cancel & refund
  • Inventory management — adjust stock, view history, low-stock alerts
  • Coupon lifecycle — create, assign to all / specific / new users
  • User management — view, lock/unlock, assign roles
  • Payment records with search, filtering & totals
  • Shop settings & admin wishlist overview
Sign In to Demo GitHub

Pre-seeded with products, categories & coupons. Payment processing is simulated — no real card is charged.

Run Locally in Seconds

Everything is containerized. One command spins up SQL Server, the API, and the Next.js frontend:

git clone https://github.com/abdulhamidshahade/berryfy.git cd berryfy docker compose up --build