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.
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.
- 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)
-
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.JwtBearerTools 1. Swashbuckle.AspNetCore
2. AutoMapper.Extensions.Microsoft.DependencyInjectionLibraries 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.netHybrid 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/routerTools 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.jsLibraries 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
-
Clone the repository:
git clone /~https://github.com/HaseebAhmed49/eCart cd eCart
-
Navigate to the backend folder and restore the dependencies:
cd eCart.API/eCart.API dotnet restore
-
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
-
Configure Redis for caching on your local machine as localhost as shown in the above image
-
Run the backend:
dotnet run
-
The backend will be available at https://localhost:7167. Swagger Link: https://localhost:7167/swagger.html
-
Navigate to the frontend folder:
cd eCart.SPA
-
Install the dependencies:
npm install
-
Run the frontend:
ng serve -o
The frontend will be available at https://localhost:4200.
Once both the backend and frontend are running, you can:
- Open the frontend application in your browser (http://localhost:4200).
- Register a new account or log in with an existing account.
- Browse the product catalog, add items to the shopping cart, and proceed to checkout.
- Admin users can log in to manage products and orders.
- | GET | paths['/api/Account']
- | GET | paths['/api/Account/email']
- | POST | paths['/api/Account/login']
- | POST | paths['/api/Account/register']
- | GET | paths['/api/Account/ConfirmEmail']
- | GET | paths['/api/Account/address']
- | PUT | paths['/api/Account/address']
- | GET | paths['/api/Account/GetAllUsers']
- | GET | paths['/api/Basket']
- | POST | paths['/api/Basket']
- | DELETE | paths['/api/Basket']
- | POST | paths['/api/Excel/export']
- | POST | paths['/api/Orders']
- | GET | paths['/api/Orders']
- | GET | paths['/api/Orders/{id}']
- | GET | paths['/api/Orders/delivery']
- | POST | paths['/api/Payments/{basketId}']
- | POST | paths['/api/Payments/webHook']
- | GET | paths['/api/Products/get-products-without-pagination']
- | GET | paths['/api/Products']
- | GET | paths['/api/Products/{id}']
- | GET | paths['/api/Products/brands']
- | GET | paths['/api/Products/types']
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.
This project is free to use for learning purposes.