Skip to content

Full-featured e-commerce application built using .NET 8 for the backend and Angular for the frontend

License

Notifications You must be signed in to change notification settings

BernieTv/.NET-Eccomerce-with-Angular

Repository files navigation

🛒 E-Commerce Platform with .NET 8 & Angular 🚀✨

This document provides an overview of our modern, full-featured e-commerce application built using .NET 8 for the backend and Angular for the frontend. It delivers a seamless shopping experience with real-time updates, responsive design, and secure payment integration. 💻📱


🚀 Technology Stack Overview 🛠️

  • ⚙️ Backend: ASP.NET Core 8
  • 🌐 Frontend: Angular
  • 🔄 Real-time Communication: SignalR
  • 🎨 Styling: Tailwind CSS
  • 💳 Payment Integration: Stripe API
  • 🗂️ Caching & Data Storage: Redis

🎯 Key Features Overview 🌟

  • 🛍️ Product Management: Browse, search, and filter products effortlessly.
  • 🔄 Real-time Updates: Instant updates on orders and notifications via SignalR.
  • 💳 Secure Payments: Stripe integration for seamless and secure transactions. Refunds and coupon codes included.
  • 🔐 Authentication & Authorization: Secure user authentication and role-based access.
  • 📊 Order Tracking: Admin dashboard for real-time order status and tracking updates.
  • 🗂️ User Cart Management: Redis is used to store user cart data efficiently.
  • Request Caching: Redis caches frequent requests to improve performance and reduce server load.

🛠️ Setup Instructions 📝

To run this application locally, please follow the steps below:

🧰 Prerequisites

Ensure you have the following installed:

  1. 🐳 Docker
  2. 🛠️ .NET SDK v8
  3. 📦 NodeJS (v20.11.1 or later) (Optional for Angular dev mode)

📥 Step 1: Clone the Repository 🗂️

git clone https://github.com/BernieTv/.NET-Eccomerce-with-Angular
cd .NET-Eccomerce-with-Angular

📦 Step 2: Restore Dependencies 🔄

# From the solution folder
 dotnet restore

# Navigate to the Angular client folder
cd client
npm install

💳 Step 3: Stripe Configuration 🔑

To enable payment functionality, set up your Stripe keys:

  1. Create an appsettings.json file in the API folder:
{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "StripeSettings": {
    "PublishableKey": "pk_test_REPLACEME",
    "SecretKey": "sk_test_REPLACEME",
    "WhSecret": "whsec_REPLACEME"
  },
  "AllowedHosts": "*"
}
  1. Set up Stripe CLI for local webhook forwarding:
stripe login
stripe listen --forward-to https://localhost:5001/api/payments/webhook -e payment_intent.succeeded

🐘 Step 4: Start Database Services 🗄️

The app requires SQL Server and Redis. Start these services using Docker:

docker compose up -d

Ensure no conflicting services are running on port 1433 (SQL Server) or port 6379 (Redis).

🚦 Step 5: Start the Application ▶️

Run the backend API:

cd API
dotnet run

Access the app locally: 🌍 https://localhost:5001

💻 Step 6: Run Angular Frontend in Development Mode 🖥️

To enable development mode with SSL:

cd client/ssl
mkcert localhost

Start Angular Dev Server:

cd client
ng serve

Browse to: 🌐 https://localhost:4200

🛡️ Step 7: Test Payments 💵

Use Stripe test cards available here for payment simulation.


📄 License 📜

This project is licensed under the MIT License. 📝