https://github.com/haseebahmed49/ecart
this is a full-stack eCommerce application built using .NET Core for the backend and Angular for the frontend. The application allows users to browse products, add items to the cart, and make purchases.
https://github.com/haseebahmed49/ecart
angular angular-material asp-net-core clean-architecture csharp docker docker-compose entity-framework-core full-stack-web-development redis web
Last synced: about 1 month ago
JSON representation
this is a full-stack eCommerce application built using .NET Core for the backend and Angular for the frontend. The application allows users to browse products, add items to the cart, and make purchases.
- Host: GitHub
- URL: https://github.com/haseebahmed49/ecart
- Owner: HaseebAhmed49
- Created: 2023-04-06T17:33:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-04T01:17:08.000Z (over 1 year ago)
- Last Synced: 2025-02-28T06:16:26.030Z (over 1 year ago)
- Topics: angular, angular-material, asp-net-core, clean-architecture, csharp, docker, docker-compose, entity-framework-core, full-stack-web-development, redis, web
- Language: C#
- Homepage:
- Size: 28 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eCart Discount Shop: An eCommerce .NET and Angular Project
This is a full-stack eCommerce application built using **.NET Core** for the backend and **Angular** for the frontend. The application allows users to browse products, add items to the cart, and make purchases.
## Table of Contents
- [Project Overview](#project-overview)
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Installation](#installation)
- [Backend Setup](#backend-setup)
- [Frontend Setup](#frontend-setup)
- [Usage](#usage)
- [API Documentation](#api-documentation)
- [Contributing](#contributing)
- [License](#license)
## Project Overview
This eCommerce platform allows customers to browse products, add them to the shopping cart, and proceed to checkout. The application is split into two parts:
- **Backend**: A RESTful API built using **.NET 9.0** that handles product management, user authentication, and order processing.
- **Frontend**: A single-page application built with **Angular** that communicates with the backend API to display products, manage the cart, and handle user interactions.
## Features
- User registration and login
- Product listing and search functionality
- Add products to the shopping cart
- Checkout and order management
- Admin panel to manage products and orders (upcoming by 15th Jan, 2025)
## Tech Stack
- **Backend**:
- .NET 9.0 (ASP.NET Core Web API)
- Entity Framework Core
- Redis for Caching as Performance Optimization
- SQLite (for database storage)
- Stripe for Payment Processing
- Package Categorization
| **Category** | **Packages** |
|---------------------|---------------------------------------------------------------------------------------------|
| **Frameworks** | 1. Microsoft.AspNetCore.Identity
2. Microsoft.AspNetCore.Identity.EntityFrameworkCore
3. Microsoft.EntityFrameworkCore.Design
4. Microsoft.EntityFrameworkCore.Sqlite
5. Npgsql.EntityFrameworkCore.PostgreSQL
6. Microsoft.AspNetCore.Authentication.JwtBearer |
| **Tools** | 1. Swashbuckle.AspNetCore
2. AutoMapper.Extensions.Microsoft.DependencyInjection |
| **Libraries** | 1. AutoMapper
2. EPPlus
3. Microsoft.IdentityModel.Tokens
4. System.IdentityModel.Tokens.Jwt
5. StackExchange.Redis
6. SendGrid
7. SendWithBrevo
8. sib_api_v3_sdk
9. Stripe.net |
| **Hybrid** | 1. Microsoft.AspNetCore.OpenApi |
- **Frontend**:
- Angular 19
- Angular Material for UI components
- RxJS for reactive programming
- Package Categorization
| **Category** | **Packages** |
|---------------------|---------------------------------------------------------------------------------------------|
| **Frameworks** | 1. @angular/animations
2. @angular/cdk
3. @angular/cli
4. @angular/common
5. @angular/compiler
6. @angular/compiler-cli
7. @angular/core
8. @angular/forms
9. @angular/platform-browser
10. @angular/platform-browser-dynamic
11. @angular/router |
| **Tools** | 1. @angular-devkit/build-angular
2. @types/jasmine
3. jasmine-core
4. karma
5. karma-chrome-launcher
6. karma-coverage
7. karma-jasmine
8. karma-jasmine-html-reporter
9. typescript
10. zone.js |
| **Libraries** | 1. @stripe/stripe-js
2. bootstrap
3. bootswatch
4. cuid
5. font-awesome
6. ngx-bootstrap
7. ngx-spinner
8. ngx-toastr
9. rxjs
10. tslib
11. xlsx
12. xng-breadcrumb |
- **Authentication**:
- JWT (JSON Web Tokens) for user authentication
## Installation
### Backend Setup
1. Clone the repository:
```bash
git clone https://github.com/HaseebAhmed49/eCart
cd eCart
2. Navigate to the backend folder and restore the dependencies:
```
cd eCart.API/eCart.API
dotnet restore
```
3. Set up the database and secret Keys for Email Notification and Stripe Payment in appsettings.json
**(SQLite path "eCart.API/eCart.API/Data/Database"):**

**Secret Keys**

5. Configure **Redis** for caching on your local machine as localhost as shown in the above image
6. Run the backend:
```
dotnet run
```
7. The backend will be available at https://localhost:7167.
Swagger Link: https://localhost:7167/swagger.html
### Front Setup
1. Navigate to the frontend folder:
```
cd eCart.SPA
```
2. Install the dependencies:
```
npm install
```
3. Run the frontend:
```
ng serve -o
```
The frontend will be available at https://localhost:4200.
## Usage
Once both the backend and frontend are running, you can:
1. Open the frontend application in your browser (http://localhost:4200).
2. Register a new account or log in with an existing account.
3. Browse the product catalog, add items to the shopping cart, and proceed to checkout.
4. Admin users can log in to manage products and orders.
## API Documentation
### Controller: Account
1. | GET | paths['/api/Account']
2. | GET | paths['/api/Account/email']
3. | POST | paths['/api/Account/login']
4. | POST | paths['/api/Account/register']
5. | GET | paths['/api/Account/ConfirmEmail']
6. | GET | paths['/api/Account/address']
7. | PUT | paths['/api/Account/address']
8. | GET | paths['/api/Account/GetAllUsers']
### Controller: Basket
1. | GET | paths['/api/Basket']
2. | POST | paths['/api/Basket']
3. | DELETE | paths['/api/Basket']
### Controller: Excel
1. | POST | paths['/api/Excel/export']
### Controller: Orders
1. | POST | paths['/api/Orders']
2. | GET | paths['/api/Orders']
3. | GET | paths['/api/Orders/{id}']
4. | GET | paths['/api/Orders/delivery']
### Controller: Payments
1. | POST | paths['/api/Payments/{basketId}']
2. | POST | paths['/api/Payments/webHook']
### Controller: Products
1. | GET | paths['/api/Products/get-products-without-pagination']
2. | GET | paths['/api/Products']
3. | GET | paths['/api/Products/{id}']
4. | GET | paths['/api/Products/brands']
5. | GET | paths['/api/Products/types']
## Contributing
We welcome contributions! If you would like to contribute to the project, please fork the repository and submit a pull request. Make sure to follow the code style and add documentation for any new features or bug fixes.
## License
This project is free to use for learning purposes.