0% found this document useful (0 votes)
20 views3 pages

Mobile Store Inventory Management System

The document outlines a project for creating a Mobile Store Inventory Management System using .NET 8 Web API, ASP MVC, SQL Server, EF Core, and JWT Security. It includes requirements for database design, API endpoints, authentication, and user roles, specifying that Managers can perform CRUD operations while SalesPersons have read-only access. Additionally, it emphasizes the need for a frontend with role-based UI and testing for the Web API endpoints.

Uploaded by

Siva Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Mobile Store Inventory Management System

The document outlines a project for creating a Mobile Store Inventory Management System using .NET 8 Web API, ASP MVC, SQL Server, EF Core, and JWT Security. It includes requirements for database design, API endpoints, authentication, and user roles, specifying that Managers can perform CRUD operations while SalesPersons have read-only access. Additionally, it emphasizes the need for a frontend with role-based UI and testing for the Web API endpoints.

Uploaded by

Siva Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Mobile Store Inventory Management

System
Project Using .NET 8 Web API, ASP MVC, SQL Server, EF Core, and JWT Security

Project Overview:

The learners are required to build an application that simulates a Mobile Store management system.
The store will track mobile model details and distributor details, with two types of users: Manager
and SalesPerson. The application will enforce user roles with JWT-based authentication to control
access to certain functionalities.

1. Database Design (SQL Server with EF Core):

Entities:

1. MobileModelDetails:

o Id (Primary Key)

o ModelName (string, required)

o Brand (string, required)

o Price (decimal, required)

o DistributorId (Foreign Key to DistributorDetails)

2. DistributorDetails:

o Id (Primary Key)

o DistributorName (string, required)

o Location (string, required)

o Phone (string)

Relationships:

● One-to-many relationship: A Distributor can distribute many Mobile Models, but each
Mobile Model has only one Distributor.

2. API Endpoints (Web API):

Endpoints for MobileModelDetails:

1. GET /api/mobilemodels – Get all mobile models (accessible to both Manager and
SalesPerson).

2. GET /api/mobilemodels/{id} – Get a single mobile model by id (accessible to both Manager


and SalesPerson).
3. POST /api/mobilemodels – Add a new mobile model (Manager only).

4. PUT /api/mobilemodels/{id} – Update an existing mobile model (Manager only).

5. DELETE /api/mobilemodels/{id} – Delete a mobile model by id (Manager only).

Endpoints for DistributorDetails:

1. GET /api/distributors – Get all distributors (accessible to both Manager and SalesPerson).

2. GET /api/distributors/{id} – Get a single distributor by id (accessible to both Manager and


SalesPerson).

3. POST /api/distributors – Add a new distributor (Manager only).

4. PUT /api/distributors/{id} – Update an existing distributor (Manager only).

5. DELETE /api/distributors/{id} – Delete a distributor by id (Manager only).

3. Authentication and Authorization (JWT Security):

● Implement JWT token-based authentication.

● There will be two user roles:

o Manager: Can perform CRUD operations on both Mobile Models and Distributors.

o SalesPerson: Can only view data.

● Protect the endpoints with role-based authorization:

o Manager role has access to all endpoints.

o SalesPerson role has read-only access (GET operations).

4. ASP.NET MVC (Frontend):

Web Pages (Views):

1. Login Page:

o Allow both Manager and SalesPerson to log in and generate a JWT token.

2. Mobile Models Pages:

o Mobile Models List: Display all mobile models.

o Add/Edit Mobile Model: Form for adding or editing mobile models (visible only for
Manager).

o Mobile Model Details: Display details of a selected mobile model.

o Delete Confirmation: Show a delete confirmation dialog before removing a mobile


model (Manager only).

3. Distributors Pages:
o Distributors List: Display all distributors.

o Filter : Display distributors who distribute more than the given number of mobile
model .

o Add/Edit Distributor: Form for adding or editing distributors (visible only for
Manager).

o Distributor Details: Display details of a selected distributor.

o Delete Confirmation: Show a delete confirmation dialog before removing a


distributor (Manager only).

Routing and Navigation:

● A navbar with links to Mobile Models and Distributors should be visible after login.

● Based on the role, show/hide buttons for adding, editing, and deleting.

5. Role-based UI:

● Manager should have full access to all CRUD operations from the UI.

● SalesPerson can only view data but cannot access the add, edit, or delete buttons.

6. Testing:

● Learners should write unit tests for the Web API endpoints using tools like xUnit and Moq
for service layers.

● Integration tests can be written to verify role-based access control.

Expected Deliverables:

● Working Web API project with secured endpoints.

● ASP.NET MVC frontend project with role-based access.

● Proper JWT-based authentication and role-based authorization.

● A SQL Server database that is connected to the application using EF Core.

● Unit and integration tests for key features and role-based security.

You might also like