A full-stack web application for managing products with role-based access control, built with ASP.NET Core and Angular.
This is a comprehensive product management system that demonstrates modern web development practices with a clean architecture, secure authentication, and responsive user interface.
The application follows a layered architecture with clear separation of concerns:
┌─────────────────┐ ┌─────────────────┐
│ Frontend │ │ Backend │
│ (Angular) │◄──►│ (ASP.NET Core) │
│ │ │ │
│ - UI Components │ │ - Web API │
│ - Services │ │ - Business Logic│
│ - Routing │ │ - Data Access │
└─────────────────┘ └─────────────────┘
│
┌─────────────────┐
│ Database │
│ (SQL Server) │
└─────────────────┘
- Angular 21 - Modern TypeScript-based framework
- Tailwind CSS - Utility-first CSS framework
- RxJS - Reactive programming library
- SweetAlert2 - Beautiful alert dialogs
- ngx-toastr - Toast notifications
- ASP.NET Core 8 - Web API framework
- Entity Framework Core - ORM for data access
- ASP.NET Core Identity - Authentication & authorization
- JWT Authentication - Secure token-based auth
- MediatR - CQRS pattern implementation
- AutoMapper - Object mapping
- FluentValidation - Input validation
- Swagger/OpenAPI - API documentation
- SQL Server - Relational database
- Code-first migrations - Schema management
- JWT-based authentication with refresh tokens
- Role-based access control (RBAC)
- Permission-based authorization policies
- Secure password handling with ASP.NET Core Identity
- Create, read, update, delete products
- Product status tracking with history
- Soft delete functionality
- Advanced filtering and pagination
- User registration and management
- Role assignment (ProjectManager, Supervisor, WarehouseManager)
- Granular permission control
- Product statistics dashboard
- User activity tracking
- Status change history
- .NET 8 SDK or later
- Node.js 18+ and npm
- SQL Server (local or remote)
- Angular CLI (
npm install -g @angular/cli)
-
Clone the repository
git clone <repository-url> cd DBS_Task
-
Backend Setup
cd Backend dotnet restore dotnet run -
Frontend Setup
cd FrontEnd/product-app npm install ng serve -
Database Configuration
- Update connection string in
Backend/appsettings.json - Run migrations:
dotnet ef database update
- Update connection string in
- Frontend:
http://localhost:4200 - Backend API:
http://localhost:5119 - API Documentation:
http://localhost:5119/swagger
DBS_Task/
├── Backend/ # ASP.NET Core Web API
│ ├── API/ # Controllers and endpoints
│ ├── Application/ # Business logic (CQRS)
│ ├── Domain/ # Core entities
│ ├── Infrastructure/ # Data access and services
│ └── Contracts/ # Request/response contracts
├── FrontEnd/
│ └── product-app/ # Angular application
│ ├── src/
│ │ ├── app/ # Application components
│ │ ├── components/ # Reusable UI components
│ │ ├── services/ # API services
│ │ └── models/ # TypeScript interfaces
│ └── public/ # Static assets
└── README.md # This file
Update Backend/appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=DBS_Task_Db;Trusted_Connection=True;"
},
"JwtSettings": {
"SecretKey": "your-super-secret-key-min-32-chars",
"Issuer": "ProductManagement",
"Audience": "ProductManagementUsers",
"ExpirationMinutes": 60
}
}Update API base URL in FrontEnd/product-app/src/environments/environment.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:5119/api'
};- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is for educational and internship purposes. Please add your preferred license before using in production.
For questions and support, please open an issue in the repository.
Built with ❤️ for the DBS Internship Program