https://github.com/01prathamesh/shopshakti
ShopShakti: Modern, scalable full-stack e-commerce web app with Angular frontend, ASP.NET Core backend, JWT auth, and admin analytics.
https://github.com/01prathamesh/shopshakti
angular asp-net-core-web-api ms-sql-server
Last synced: 7 months ago
JSON representation
ShopShakti: Modern, scalable full-stack e-commerce web app with Angular frontend, ASP.NET Core backend, JWT auth, and admin analytics.
- Host: GitHub
- URL: https://github.com/01prathamesh/shopshakti
- Owner: 01Prathamesh
- License: mit
- Created: 2025-05-22T05:04:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-21T10:11:41.000Z (7 months ago)
- Last Synced: 2025-08-21T12:25:35.016Z (7 months ago)
- Topics: angular, asp-net-core-web-api, ms-sql-server
- Language: TypeScript
- Homepage:
- Size: 1.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ποΈ ShopShakti (Full-Stack E-Commerce Platform)
 Β Β Β
 Β Β Β
 Β Β Β
 Β Β Β

## π Status: Active Development β Stable Core Features
Welcome to the **ShopShakti** project β a modern, full-stack, responsive e-commerce web application built using **Angular (frontend)** and **ASP.NET Core Web API (backend)**. It features a clean, scalable architecture and is designed for performance, maintainability, and an excellent user experience.
## π½οΈ **Project Demo**
Check out the live walkthrough of **ShopShakti** on YouTube:
[](https://youtu.be/rlYTUn8ONFk?si=KnZtb-_hHt2Op6vs)
π Watch here: [https://youtu.be/rlYTUn8ONFk?si=KnZtb-_hHt2Op6vs](https://youtu.be/rlYTUn8ONFk?si=KnZtb-_hHt2Op6vs)
> π§ *Note: This project is a work in progress, but itβs stable enough to demonstrate core features and user flows.*
## π Frontend Features (Angular)
- π **Homepage** with hero banners, trending, deals, and featured categories
- π **Product Listing & Detail Pages** with filtering, dynamic routing
- π€ **Authentication**: Register, Login, Profile management
- π§Ί **Cart System** with quantity control and persistence
- π³ **Checkout** flow with order summary and confirmation
- π¦ **Order Management** for both users and admin
- π§βπΌ **Admin Dashboard** with analytics and protected routes
- π **Toast Notifications** for seamless feedback
- π± **Fully Responsive**: Optimized for desktop, tablet, and mobile
## π§± Frontend Structure
```
ShopShakti_frontend/
βββ src/
β βββ app/
β β βββ components/
β β β βββ admin/
β β β β βββ admin-dashboard/
β β β β βββ order-management/
β β β β βββ product-management/
β β β β βββ user-management/
β β β βββ auth_user_pages/
β β β β βββ login/
β β β β βββ register/
β β β β βββ profile/
β β β βββ core_pages/
β β β β βββ homepage/
β β β β βββ product-list/
β β β β βββ product-detail/
β β β β βββ cart/
β β β βββ orders/
β β β β βββ order-list/
β β β β βββ order-summary/
β β β β βββ order-success/
β β β βββ staff/
β β β β βββ staff-dashboard/
β β β β βββ manage-trending-products/
β β β β βββ manage-benefits/
β β β β βββ manage-top-deals/
β β β β βββ manage-customer-reviews/
β β β β βββ manage-featured-categories/
β β β β βββ manage-newsletter-subscription/
β β β βββ home/
β β β β βββ trending-products/
β β β β βββ featured-categories/
β β β β βββ top-deals/
β β β β βββ benefits/
β β β β βββ customer-reviews/
β β β β βββ newsletter-subscription/
β β β βββ ui_ux/
β β β βββ navbar/
β β β βββ admin-button/
β β β βββ cart-button/
β β β βββ footer/
β β β βββ searchbar/
β β β βββ category-sidebar/
β β β βββ banner-carousel/
β β β βββ toast/
| | βββ models/
| | βββ services/
β βββ assets/
β β βββ images/
β β βββ banners/
| | βββ company/
β β βββ categories/
β β βββ deals/
β β βββ products/
β βββ index.html
```
## π οΈ Tech Stack (Frontend)
- **Angular 19** with standalone component architecture
- **TypeScript**
- **Angular Router** for route management and guards
- **Material Icons**, **FontAwesome** for UI elements
## π Admin Access
Admin routes are protected using an `AuthService` and `canActivateAdmin` guard. Only users with role `admin` can access the dashboard.
```ts
if (auth.isLoggedIn() && auth.isAdmin()) {
return true;
}
```
## π¦ Run Frontend Locally
```
# Install dependencies
npm install
# Run dev server
ng serve
```
Access the app at: http://localhost:4200
## π§ Backend Overview (ASP.NET Core)
The backend is a RESTful API built with **ASP.NET Core Web API**, using **Entity Framework Core** for data persistence and **SQL Server** as the database.
## π§± Backend Structure
```
ShopShakti_backend/
βββ Properties/
| βββ launchSettings.cs/
βββ Controllers/
β βββ AdminController.cs
β βββ CartItemsController.cs
β βββ OrdersController.cs
β βββ ProductsController.cs
β βββ UsersController.cs
βββ Data/
β βββ AppContextDb.cs
β βββ AppDbContextFactory.cs
βββ Models/
β βββ CartItem.cs
β βββ Order.cs
β βββ Product.cs
β βββ User.cs
β βββ AdminMetricsDto.cs
β βββ LoginDto.cs
βββ Migrations/
βββ Program.cs
βββ appsettings.json
βββ ShopShakti_backend.csproj
```
## π§° Tech Stack (Backend)
- **ASP.NET Core 7 Web API**
- **Entity Framework Core**
- **SQL Server / SQLite**
- **CORS Configuration for frontend integration**
- **Swagger (OpenAPI 3.0) for documentation**
## π API Endpoints
**π CartItems**
`GET /api/CartItems`
`GET /api/CartItems/{id}`
`POST /api/CartItems`
`PUT /api/CartItems/{id}`
`DELETE /api/CartItems/{id}`
**π¦ Orders**
`GET /api/Orders`
`GET /api/Orders/{id}`
`POST /api/Orders`
`PUT /api/Orders/{id}`
`DELETE /api/Orders/{id}`
**ποΈ Products**
`GET /api/Products`
`GET /api/Products/{id}`
`POST /api/Products`
`PUT /api/Products/{id}`
`DELETE /api/Products/{id}`
**π€ Users**
`GET /api/Users`
`GET /api/Users/{id}`
`POST /api/Users`
`PUT /api/Users/{id}`
`DELETE /api/Users/{id}`
`POST /api/Users/login`
**π Admin Metrics**
`GET /api/Admin/metrics`
## π Schemas Used
- `Product`
- `CartItem`
- `Order`
- `User`
- `LoginRequest`
- `AdminMetricsDto`
## π§ͺ Run Backend Locally
```
# Navigate to backend folder
cd ShopShakti_backend
# Restore NuGet packages
dotnet restore
# Update database (if using migrations)
dotnet ef database update
# Start the server
dotnet run
```
API Base URL: https://localhost:7171/api
Swagger: https://localhost:7171/swagger
## π Security Architecture
ShopShakti is designed with a strong focus on secure authentication, data protection, and access control. Below are the key security features implemented:
### β
Authentication & Authorization
- **JWT-based Authentication**
Secure login with JSON Web Tokens (JWT), including issuer, audience, and HMAC SHA256 signing.
- **Token Expiration & Validation**
Tokens expire based on a configurable time (`ExpiresInMinutes`), enforced using `ValidateLifetime` and `ClockSkew = 0`.
- **Role-Based Access Control**
Admin and user routes are guarded using Angular route guards (`canActivateAdmin`, `canActivateUser`).
- **Password Hashing**
User passwords are securely hashed using ASP.NET Coreβs `PasswordHasher` before being saved to the database.
### β
API & Backend Security
- **[Authorize] Decorators**
Sensitive API endpoints (e.g. profile, orders, cart) are protected using `[Authorize]`, while public routes like registration and login use `[AllowAnonymous]`.
- **CORS Policy Enforcement**
Backend is configured to allow only trusted frontend origins (e.g., `http://localhost:4200`).
- **Blocked User Handling**
Blocked users are denied access during login and receive a `403 Forbidden` response.
### β
Frontend Safeguards
- **JWT Interceptor**
Angular HTTP interceptor automatically attaches `Authorization: Bearer ` to every protected API request.
- **Secure Token Storage**
JWT and user info (excluding password) are stored safely in `localStorage`. Passwords are never exposed to the client.
- **Route Guards**
Angular guards restrict access to protected routes like `/profile`, `/cart`, `/checkout`, and `/admin`.
> β
All critical flows (login, logout, registration, token validation, admin access, and blocked user control) have been implemented securely and verified.
This setup follows modern best practices for Angular + ASP.NET Core Web API + SQL Server applications.
## β
Future Enhancements
- Wishlist & Payment gateway
- Advanced search, filters, and pagination
- Product ratings and reviews
- Order tracking & invoice downloads
## π€ Contribution
Pull requests and suggestions are welcome! Please fork the repository and submit a PR with clear and descriptive commit messages.
## π License
This project is licensed under the **MIT License**.
You are free to use, modify, and distribute this software with attribution.
See the [LICENSE](./LICENSE) file for full details.
## π¨βπ» Developer Note
This project has been thoughtfully crafted as a full-stack e-commerce solution with a strong emphasis on clean architecture, intuitive UI/UX, and scalable design. Every componentβfrom frontend interactions to backend logicβhas been built with attention to performance, maintainability, and modern best practices.
## π§βπ Developed & Maintained by:
***Prathamesh Kasar***
`Β© 2025 Prathamesh Kasar. All rights reserved.`
Please do not reproduce without proper attribution.