PHARMACY MANAGEMENT SYSTEM
A Project Report submitted in complete fulfillment of the requirements
for the award of the degree of
Bachelor of Technology
in
Computer Science and
Engineering
by
Sujal sharma
Roll No: 2115001013
Under the Guidance of
Mrs. Rashmi Darshan
Pawaskar
Department of Computer Engineering
& Applications
Institute of Engineering & Technology
GLA University
Mathura- 281406, INDIA
April, 2025
Department of Computer Engineering and
Applications
GLA University, 17 km Stone, NH#2, Mathura-Delhi
Road, P.O. Chaumuhan, Mathura-281406 (U.P.)
I hereby declare that the work which is being presented in the
B.Tech. Project “Pharmacy Management System”, in partial
fulfillment of the requirements for the award of the Bachelor of
Technology in Computer Science and Engineering and submitted
to the Department of Computer Engineering and Applications of
GLA University, Mathura, is an authentic record of my own work
carried under the supervision of Rashmi Darshan Pawaskar,
Manager, Capgemini.
The contents of this project report, in full or in parts,
have not been submitted to any other Institute or University
for the award of any degree.
Sign ______________________
Name of Student: Sujal Sharma
University Roll No.: 2115001013
Certificate
This is to certify that the above statements made by the
candidate are correct to the best of my/our knowledge and
belief.
_______________________
Supervisor
(Name of Supervisor)
Designation of Supervisor
Dept. of Computer Engg, & App.
______________________
______________________
Project Co-ordinator Program Co-
ordinator
(Dr. Mayank Srivastava) (Dr. Nikhil Govil)
Associate Professor Associate Professor
Dept. of Computer Engg, & App. Dept. of Computer
Engg, & App.
Date:
ACKNOWLEDGEMENT
I would like to express my heartfelt gratitude to my supervisor,
Mrs. Rashmi Darshan Pawaskar, for her invaluable guidance,
support, and encouragement throughout the duration of this project.
Her insights and expertise helped me shape this project from an
idea into a working system.
I also wish to thank the faculty and staff of the Department of
Computer Engineering and Applications at GLA University for
providing the resources and academic environment necessary for
this project.
Lastly, I am extremely thankful to my family and friends for their
continuous motivation and moral support during this academic
journey.
Sign: _____________________
Name of Candidate: Sujal Sharma
University Roll No: 2115001013
ABSTRACT
The Crop Deal Management System is a web-based platform
developed using Angular and ASP.NET Core 8 to facilitate direct
communication and transactions between farmers and dealers. The
system eliminates the role of middlemen and aims to empower
farmers with better pricing and transparency.
It adopts a monolithic based architecture comprising five main
services: User Service, Crop Service, Dealer Service, and Admin
Service. Each service is responsible for a specific domain and
follows modern design principles such as CQRS (Command Query
Responsibility Segregation), Event Sourcing, Federated Identity,
and Externalized Configuration.
The application ensures secure authentication, efficient crop
publishing and subscription, streamlined payment handling, and
real-time notifications. It leverages SQL Server as the relational
database for persistent storage.
The report discusses the entire lifecycle of the project including
requirement analysis, software architecture, low-level and high-
level design, user interface development, testing strategies, and
deployment plans. The aim is to provide a transparent, scalable,
and efficient crop trading system for Indian farmers and dealers.
CONTENTS
Declaration
ii
Certificate
ii
Acknowledge
iii
Abstract
iv
CHAPTER 1 Introduction
1
1.1 Overview and Motivation
2
1.2 Objective
3
1.3 Summary of Similar Application
4
1.4 Organization of the Project
6
CHAPTER 2 Software Requirement Analysis
10
2.1 Technical Feasibility
11
2.2
CHAPTER 3 Software Design
35
3.1 This is the Section
3.1.1 This is a subsection
40
CHAPTER 4 Implementation and User Interface
48
CHAPTER 5 Software Testing
58
CHAPTER 6 Conclusion
60
CHAPTER 7 Summary
62
CHAPTER 1
Introduction
1.1 Overview and Motivation
Agriculture is the backbone of India’s economy, with over 60% of the
population involved in farming. Despite technological advancements in
various sectors, the agricultural marketplace remains highly traditional
and fragmented. Farmers often rely on middlemen to sell their crops,
which leads to reduced profits, lack of price transparency, delayed
payments, and limited market reach.
The Crop Deal Management System (CDMS) is a web-based platform
designed to eliminate intermediaries and empower farmers by enabling
them to directly connect with verified dealers. This platform ensures that
farmers get fair prices for their crops while dealers gain timely access to
produce at competitive rates. The system offers features such as crop
publishing, subscription by dealers, secure payments, invoice generation,
real-time notifications, and centralized role-based access control.
Motivated by the need to improve the agricultural supply chain and
provide farmers with modern digital tools, this project utilizes cutting-
edge web technologies like Angular and ASP.NET Core 8. The
microservices-based design allows for modular development and
scalability, ensuring that each service can grow independently.
Key Problems with Traditional Crop Selling Systems:
Reliance on middlemen resulting in profit cuts
Lack of price transparency and traceability
Delayed payments and poor communication
No real-time alerting for crop listings or payments
Limited digital presence in rural markets
Motivation Highlights:
To empower farmers by enabling direct market access.
To create a secure and transparent platform for crop transactions.
To support real-time notifications, digital payments, and detailed
reports.
To implement a modern, scalable architecture using Angular
and .NET Core.
To deliver a user-friendly and role-specific experience for
Farmers, Dealers, and Admins.
1.2 Objective
The primary objective of the Crop Deal Management System is to
build a digital marketplace that streamlines agricultural trading through
automation, secure user access, and modular service separation. The
system leverages microservices and REST APIs to provide users with
fast, scalable, and customizable crop transaction functionalities.
Specific Objectives:
To implement a secure authentication system using JWT and
ASP.NET Identity.
To allow farmers to publish crop listings with necessary metadata
like type, quantity, price, and location.
To enable dealers to browse and subscribe to crops based on
filters such as region and crop type.
To facilitate safe and transparent payments, including digital
invoice generation.
To provide an intuitive UI with role-based dashboards for all
users.
To incorporate admin-level tools for report generation, user
activation, and system monitoring.
To build a responsive frontend using Angular and Angular
Material.
To apply modern design principles such as CQRS and Event
Sourcing for service reliability.
To ensure modularity so new services (e.g., logistics,
warehousing) can be added easily.
With these goals in mind, the CDMS aims to serve as a digital backbone
for the future of agricultural commerce.
1.3 Summary of Similar Applications
A number of agriculture and crop trading applications exist in the Indian
market, but many have limitations such as limited role-based access,
outdated tech stacks, or high costs for small farmers. The CDMS stands
out by offering open-source development, clean UI/UX, modern
architecture, and dedicated services for all roles.
Notable Existing Platforms:
1. eNAM (National Agriculture Market)
o Government-backed platform linking physical markets
o Requires APMC integration, limiting individual farmer
access
o Not designed as a full web marketplace
2. AgriBazaar
o Commercialized crop platform with dealer services
o Lacks granular control for small-scale farmers
o No microservices or modular dashboard features
3. Kisan Network
o Mobile app-focused platform
o Offers crop posting and shipping services
o Limited to basic features and hard to scale
Key Differences of CDMS:
Feature Existing Platforms Crop Deal Management System
Role-based Access Limited Full (Farmer, Dealer, Admin)
Microservices Architecture No Yes
Federated Identity Not Common Supported
Feature Existing Platforms Crop Deal Management System
Real-time Notifications Limited Yes
Secure Online Payments Partial Fully Integrated
Free & Open Source No Yes
Invoice Generation Basic or Missing Advanced with Auto Calculation
Thus, CDMS is a highly customizable and affordable platform that
addresses the core limitations of existing systems using modern tools and
a farmer-first approach.
1.4 Organization of the Project
This project report is structured into well-defined chapters, each covering
a specific aspect of the system’s development lifecycle — from planning
and analysis to testing and conclusion.
Chapter 1 – Introduction: Describes the background,
motivation, objectives, and limitations of existing systems. It also
introduces the project's proposed solution and features.
Chapter 2 – Software Requirement Analysis: Details the
system’s hardware and software prerequisites, feasibility analysis,
and both functional and non-functional requirements.
Chapter 3 – Software Design: Presents the design of the system
including architectural diagrams, ER models, data flow diagrams,
and class diagrams.
Chapter 4 – Implementation and User Interface: Outlines the
development approach, UI snapshots, Restful service
architecture, and core features of each module.
Chapter 5 – Software Testing: Describes the test cases applied,
testing techniques used, and the outcome of those tests for system
validation.
Chapter 6 – Conclusion: Highlights the achievements,
limitations faced, and how the final product aligns with the initial
objectives.
Chapter 7 – Summary: Recaps the project development journey
and lays out potential directions for future improvements such as
AI crop recommendation and marketplace expansion.
CHAPTER 2
Software Requirement Analysis
Software requirement analysis is the process of identifying, analyzing,
and documenting the functional and non-functional expectations of users,
stakeholders, and system environments. This chapter outlines the
complete requirement analysis for the Crop Deal Management System
(CDMS). It includes the feasibility studies, system expectations, and
technical choices that justify the selection of tools, technologies, and
architectural decisions made during the development process.
2.1 Technical Feasibility
Technical feasibility assesses whether the system can be successfully
developed, deployed, and maintained with the available technology stack
and infrastructure.
a. Hardware Feasibility
As a web-based application, CDMS runs efficiently on common
hardware setups for both development and deployment environments.
Client-side (Farmers/Dealers/Admins)
o Device: Desktop, Laptop, or Mobile
o RAM: Minimum 4 GB
o Processor: Dual Core Intel i3 or equivalent
o Browser: Chrome, Firefox, Edge (latest versions)
Server-side (Backend Hosting)
o RAM: Minimum 8 GB
o Processor: Intel i5 or higher
o Storage: SSD (100 GB minimum recommended)
o OS: Windows Server 2022 or Ubuntu 22.04 LTS
b. Software Feasibility
Frontend: Developed using Angular 18, offering a modular,
component-driven UI.
Backend: ASP.NET Core 8.0 Web API, providing a scalable and
secure service layer.
Database: Microsoft SQL Server used for reliable, relational data
persistence.
Authentication: Federated Identity integrated with JWT-based
authentication using ASP.NET Identity.
Testing Tools: Swagger for API documentation/testing and
NUnit for automated backend unit tests.
All selected tools are stable, enterprise-ready, and cost-effective
(community/free editions available), making the project technically
viable and future-proof.
2.2 Operational Feasibility
Operational feasibility evaluates whether the system will operate as
expected in the intended environment and user base.
The platform provides a clean, responsive interface for farmers,
dealers, and admins, reducing learning curves.
Role-specific dashboards allow users to perform only the
operations permitted by their access level.
The real-time crop listing, notifications, and secure payments
make crop transactions faster and more efficient.
Admins can monitor activity, manage roles, and generate reports
with ease.
Notifications ensure that no opportunity or transaction is missed,
increasing operational trust and satisfaction.
Due to its straightforward UI/UX and tailored workflows, the system is
expected to be well adopted by its users.
2.3 Economic Feasibility
As a student-developed, open-architecture solution, CDMS involves
minimal direct costs.
Estimated Cost Analysis
Resource Estimated Cost
Development Tools Free / Open-source
Hosting (Local/Cloud) Free for testing
Developer Time NA (Student Contribution)
Miscellaneous Minimal
There are no high-cost licenses or subscriptions involved, and all
services can be deployed on free-tier cloud platforms like Azure, making
it a highly economical system to build and maintain.
2.4 Legal Feasibility
Legal feasibility verifies whether the system complies with regulations
and guidelines relevant to its operation.
No proprietary data or third-party tools are used without
appropriate licensing or attribution.
User data is handled securely using encrypted storage and JWT
tokens.
Since this is an academic project, it currently holds no legal risks.
In future production use, it would comply with data protection
laws like India’s Digital Personal Data Protection Act (DPDPA)
and IT Act (2000).
As of now, the system is legally sound for both academic and pilot real-
world use cases.
2.5 Functional Requirements
Functional requirements describe the core capabilities and workflows the
system must support.
a. Authentication and Role Management
Users (Farmer, Dealer, Admin) must be able to register and log in
securely.
JWT-based login system with federated identity support.
Role-based access controls restrict access to features based on
user roles.
b. Farmer Functionalities
Publish crop listings with name, type, quantity, price, and
location.
View subscribed dealers.
View invoice history and ratings received.
c. Dealer Functionalities
Subscribe to crop listings based on filters like crop type and
location.
Rate and review farmers post-transaction.
Download invoices and track payment status.
d. Admin Functionalities
View, update, and manage all users.
Generate transaction, subscription, and crop listing reports.
Activate/deactivate user accounts.
e. Payment Functionalities
Farmers and dealers can add bank details securely.
Dealers initiate payments, which are processed and recorded.
Generate unique invoice per transaction with digital receipt.
f. Notification Functionalities
Dealers receive notifications when crops matching their
subscription are listed.
All users receive payment status updates, registration success
alerts, and admin notifications.
2.6 Non-Functional Requirements
These define the system’s quality attributes beyond core functionality.
a. Performance
REST APIs respond within 500–800ms on average.
UI renders under 2 seconds on modern devices.
b. Security
Passwords hashed and stored securely.
All API calls secured using JWT authentication.
Role-based access and service-to-service authorization.
c. Usability
Fully responsive design across devices (Angular + Material UI).
Intuitive role-specific dashboards and interfaces.
d. Scalability
Microservices architecture allows independent scaling.
New modules (e.g., logistics) can be added without major code
restructuring.
e. Maintainability
Separation of concerns: Controllers → Services → Repositories.
Code follows SOLID principles with modular and testable
components.
f. Availability
Can be deployed on Azure, AWS, or GCP.
Minimal downtime (expected <1% with cloud redundancy).
2.7 Technology Stack Used
Layer Technology
Frontend Angular 18, Angular Material
Layer Technology
Backend ASP.NET Core 8.0 Web API
Authentication ASP.NET Identity + JWT + OAuth
Database Microsoft SQL Server
Testing Swagger (API Testing), NUnit (Unit)
Tools Visual Studio 2022, Postman, Git
Version Control GitHub
2.8 System Models
The system is modeled using a set of standard diagrams. Detailed
versions are presented in Chapter 3, but a quick overview is provided
here.
Use Case Diagrams: Show how Farmers, Dealers, and Admins
interact with the application.
ER Diagram: Models the relationships between tables such as
User, Crop, Bank, Rating, and Invoice.
DFDs: Illustrate the flow of data between modules and databases.
Class Diagram: Represents backend structure — including
services, models, and controllers.
2.9 Summary
This chapter outlined the hardware, software, operational, and legal
requirements for the Crop Deal Management System. It confirmed the
technical and economic feasibility of the project, justified the technology
stack, and described the required functionality in detail. Both functional
and non-functional requirements were identified, ensuring that the
system is scalable, secure, and fit for both academic and real-world
deployment scenarios.
CHAPTER 3
Software Design
Software Design is a crucial phase in the software development lifecycle.
It serves as the bridge between requirements and implementation,
outlining how the system will be constructed to meet functional and non-
functional needs. In the case of the Crop Deal Management System
(CDMS), design plays a central role in ensuring scalability, modularity,
and maintainability, especially given the project’s microservices-based
architecture.
This chapter presents the system’s architectural blueprint, including
module decomposition, database schema, UI considerations, and
structural diagrams that demonstrate the behavior and interaction of the
system components.
3.1 System Architecture
The Crop Deal Management System adopts a microservices-based
architecture, which divides responsibilities across multiple services.
Each service is independently deployable and communicates via
RESTful APIs.
3.1.1 Presentation Layer (Frontend)
Developed using Angular 18 with Angular Material for UI
components.
Tailored UI for each role (Farmer, Dealer, Admin).
Fully responsive and compatible across desktop and mobile
devices.
Communicates with backend services via HTTP and secured
REST endpoints.
3.1.2 Business Logic Layer (Service Layer)
Implemented using ASP.NET Core 8.0 Web API.
Contains services such as User Service, Crop Service, Dealer
Service, etc.
Enforces business rules, authentication, and authorization.
Applies CQRS, Federated Identity, and Event Sourcing
patterns where applicable.
3.1.3 Data Access Layer (Repository Layer)
Uses Entity Framework Core with Code-First approach.
Manages communication between services and SQL Server
databases.
Organized using Repository and Unit of Work patterns to
promote maintainability.
3.2 Module Decomposition
The system is logically broken down into the following functional
services/modules:
a. Authentication Module
Handles user registration, login, and federated identity
integration.
Manages JWT token generation and validation.
Supports role-based access for Farmers, Dealers, and Admins.
b. Farmer Module
Publish crop listings (name, type, quantity, price, location).
View dealer subscriptions and transaction history.
Manage personal profile and bank account.
c. Dealer Module
Search and subscribe to available crop listings based on filters.
View notifications when subscribed crops are posted.
Rate farmers post-transaction and download invoices.
d. Admin Module
Manage user accounts (activate/deactivate/edit).
Generate system-wide reports (transactions, ratings,
subscriptions).
Monitor platform health and usage statistics.
e. Payment and Notification Module
Collect and store bank details securely.
Facilitate and track payment transactions.
Automatically generate invoices.
Send real-time notifications about crops and payment events.
3.3 Database Design
The database follows a normalized relational model implemented in
Microsoft SQL Server. Key entities are interlinked through foreign key
relationships for integrity.
Table Overview
Table Name Description
Users Stores all user information and role mappings
Roles Defines user roles (Farmer, Dealer, Admin)
Crops Contains crop listings from farmers
Banks Stores bank account details for users
Subscriptions Links dealers to the crops they're interested in
Ratings Stores dealer ratings for farmers
Invoices Captures transactional data
3.3.1 Entity Relationship Diagram (ERD)
Represents relationships between Users, Crops, Subscriptions,
Payments, Ratings, and Invoices.
3.4 Class Design
Class diagrams are based on LLD and include key classes such as User,
Crop, Bank, Invoice, Subscription, and Rating. Each class maps to a
database entity and includes business logic validation methods.
3.5 Use Case Diagrams
3.5.1 Farmer Use Case
Register/Login
Publish crop
View dealer subscriptions
Track payment and ratings
3.5.2 Dealer Use Case
Register/Login
Search/Subscribe to crops
Rate farmers
Make payments and download invoices
3.5.3 Admin Use Case
Manage user accounts
Generate reports
Monitor system status
3.6 Component Diagram
This diagram illustrates the inter-service communication and UI
interaction.
Angular Frontend ↔ REST API Controllers (ASP.NET Core 8)
Controllers ↔ Services ↔ Repositories ↔ SQL Server
Notifications ↔ External messaging service (optional future
scope)
Authentication via JWT + Federated Identity
3.7 Sequence Diagrams
Sequence diagrams show typical scenarios such as:
Farmer publishing a crop
Dealer subscribing and making pay
Admin generating a report
3.8 User Interface Design
The UI is developed in Angular 18 with Angular Material and supports:
Farmer Dashboard (Published crops, profile, ratings)
Dealer Dashboard (Available crops, subscriptions, payments)
Admin Dashboard (User management, reports)
UIs are responsive and support real-time updates using observable
streams and lazy loading.
3.9 Security Design
Authentication: ASP.NET Identity with hashed passwords +
JWT token authentication
Authorization: Middleware-enforced role-based access at
endpoint level
Data Security: Bank details and user data encrypted
Communication: HTTPS enforced for secure client-server
communication
3.10 Summary
This chapter presented the technical and architectural design of the Crop
Deal Management System. It covered a comprehensive view of its
layered architecture, service decomposition, data model, interface design,
and system interactions. Emphasis was given to maintainability,
performance, and security — making the system scalable and ready for
real-world deployment or academic extension.
CHAPTER 4
Implementation and User Interface
The implementation phase of the Crop Deal Management System
transforms the design architecture into a working solution. This chapter
provides a comprehensive explanation of how each component of the
system was implemented, the technologies used, and how the interface
adapts based on user roles: Farmer, Dealer, and Admin. It also describes
key UI/UX design decisions that enhance usability and efficiency.
4.1 Technology Stack
The system is built using a modern and scalable full-stack technology
environment:
Layer Technology
Frontend Angular 18, Angular Material
Backend ASP.NET Core 8.0 Web API
Database SQL Server
ORM Entity Framework Core (Code-First)
Authentication ASP.NET Identity + JWT Tokens
Testing Swagger, NUnit
Version Control Git, GitHub
Tools & Editors Visual Studio 2022, Visual Studio Code
4.2 Implementation Strategy
The system follows a three-layered architectural approach:
Presentation Layer: Angular components structured for each
role (Farmer, Dealer, Admin) and built using Angular Material
for responsive, modern UI.
Business Logic Layer: ASP.NET Core controllers and services
encapsulate all application rules and logic.
Data Access Layer: Repositories using Entity Framework Core
abstract and manage data operations with SQL Server.
4.3 Backend Implementation (ASP.NET Core 8.0)
4.3.1 Entity Models
Example: Crop entity model
csharp
CopyEdit
public class Crop {
public Guid CropId { get; set; }
public Guid FarmerId { get; set; }
public string CropType { get; set; }
public string CropName { get; set; }
public decimal QuantityInKg { get; set; }
public string Location { get; set; }
public bool IsSold { get; set; }
public decimal Price { get; set; }
public DateTime CreatedOn { get; set; }
}
4.3.2 DbContext
csharp
CopyEdit
public class ApplicationDbContext :
IdentityDbContext<ApplicationUser> {
public DbSet<Crop> Crops { get; set; }
public DbSet<Bank> Banks { get; set; }
public DbSet<Invoice> Invoices { get; set; }
public DbSet<Subscription> Subscriptions { get; set; }
public
ApplicationDbContext(DbContextOptions<ApplicationDbContext
> options)
: base(options) { }
}
4.3.3 Controllers
Example: CropController.cs
csharp
CopyEdit
[Authorize(Roles = "Farmer")]
[Route("api/[controller]")]
[ApiController]
public class CropController : ControllerBase {
private readonly ICropService _cropService;
public CropController(ICropService cropService) {
_cropService = cropService;
}
[HttpPost("Publish")]
public async Task<IActionResult> PublishCrop(CropDto
dto) {
var result = await
_cropService.PublishCropAsync(dto);
return Ok(new { success = true, data = result,
message = "Crop published successfully." });
}
}
4.4 Frontend Implementation (Angular 18)
4.4.1 Folder Structure
pgsql
CopyEdit
src/
└── app/
├── auth/
│ ├── login/
│ └── register/
├── farmer/
│ ├── publish-crop/
│ ├── view-crops/
├── dealer/
│ ├── subscribe-crops/
│ └── transactions/
├── admin/
│ ├── manage-users/
│ ├── reports/
└── services/
4.5 Admin Dashboard UI
4.5.1 Admin Navigation Sidebar
Allows navigation to:
Manage Users
View Reports
Activate/Deactivate Accounts
4.5.2 User Management
Admin can:
View all users by role
Deactivate/reactivate accounts
Edit user profiles
4.5.3 Report Management
Admin can generate:
Subscription Reports
Crop Listing Logs
Payment Summaries
4.6 Farmer Dashboard UI
4.6.1 Crop Publishing Form
Farmers enter:
Crop Type, Name, Quantity, Location, and Price
4.6.2 View My Listings
Displays list of crops uploaded by the farmer and their current status
(sold/available)
4.7 Dealer Dashboard UI
4.7.1 Subscribed Crop Listings
Displays real-time updates from crops matching dealer’s preferences.
4.7.2 Transactions and Ratings
Allows dealer to:
Rate farmer post-purchase
View and download invoices
Track payment status
4.8 Authentication UI (Login & Register)
4.8.1 Login Page
Email and password-based login
On success, JWT token stored and role-based redirection applied
4.8.2 Registration Page
New users can register as either Farmer or Dealer
Admin role is manually assigned through backend control
4.9 Role-Based Routing and Guards
Routing is protected using Angular guards based on user role:
ts
CopyEdit
{
path: 'admin',
component: AdminDashboardComponent,
canActivate: [RoleGuard],
data: { expectedRole: 'Admin' }
}
4.10 API Integration
All Angular components connect with backend APIs using HttpClient
service:
ts
CopyEdit
publishCrop(data: any): Observable<any> {
return this.http.post(`${this.baseUrl}/Crop/Publish`,
data);
}
4.11 UI/UX Design Considerations
Clean and minimal design using Angular Material
Forms include client-side and server-side validation
Confirmation dialogs on sensitive actions (delete/update)
Toasts and alerts for asynchronous actions (success/error)
Responsive layouts for mobile and desktop users
4.12 Summary
This chapter outlined the implementation of both the frontend and
backend layers of the Crop Deal Management System. It described the
Angular-based role-specific UI for Farmers, Dealers, and Admins, and
detailed the RESTful service integrations developed with ASP.NET Core
8. The architecture promotes scalability, while the responsive UI ensures
usability across devices. The implementation strictly adheres to modular
practices and modern web development standards, ensuring long-term
maintainability and performance.
CHAPTER 5
Software Testing
Software testing is a critical step in the Software Development Life
Cycle (SDLC) that ensures the application functions as intended, satisfies
all system requirements, and performs efficiently under different
scenarios. This chapter explains the testing approach, tools used, and
detailed test cases applied during the development of the Crop Deal
Management System (CDMS). Both manual and automated testing
strategies were applied to verify correctness, security, performance, and
user satisfaction.
5.1 Purpose of Testing
The purpose of testing the Crop Deal Management System is to:
Detect and eliminate bugs early in the development cycle.
Validate all specified functional and non-functional requirements.
Ensure that business logic and workflows operate reliably.
Verify data integrity and correctness of transactions.
Confirm that authentication, authorization, and CRUD operations
behave as expected.
5.2 Testing Types Performed
Testing Type Description
Unit Testing Individual service methods tested in isolation using mock data.
Ensures multiple services work correctly when connected (e.g.,
Integration Testing
payment + invoice).
System Testing Tests the complete system from the user’s perspective.
User Acceptance Confirms the application meets the expectations of farmers, dealers,
Testing and admins.
Functional Testing Validates user actions, service outputs, and business rules.
Security Testing Verifies role-based access using JWT and backend guards.
Regression Testing Ensures new features do not disrupt existing functionalities.
5.3 Tools Used
Tool Purpose
Swagger API testing and request/response validation
Postman Manual testing of secure REST APIs
NUnit Unit testing for service layer methods
Chrome Dev Tools Manual debugging of frontend interactions
JWT Debugger Verifying and decoding JWT tokens
5.4 Unit Testing (Using NUnit)
Unit tests were written to validate critical service methods in isolation.
Example: Testing CropService.PublishCropAsync()
csharp
CopyEdit
[Test]
public async Task
PublishCropAsync_ShouldReturnTrue_WhenValidInputGiven()
{
var crop = new CropDto {
CropName = "Wheat",
QuantityInKg = 100,
Price = 25.5M,
Location = "Mathura"
};
var result = await
_cropService.PublishCropAsync(crop);
Assert.IsTrue(result);
}
Benefits:
Validates service layer independently from UI or DB.
Prevents defects early and simplifies debugging.
5.5 API Testing (Swagger & Postman)
5.5.1 Swagger Testing
All backend endpoints are auto-documented using Swagger.
Real-time input/output tested for different user roles.
Sample endpoints tested:
o /api/crop/publish
o /api/payment/pay
o /api/admin/reportManagement
5.5.2 Postman Testing
Used to simulate API calls with role-specific JWT headers.
Example: Testing dealer’s access to /api/crop/subscribe and
verifying 403 for unauthorized access.
5.6 Frontend Testing (Manual Testing)
Component Test Scenario Expected Result
Login Page Login with valid credentials Redirect to correct role dashboard
Crop Publish
Submit empty crop form Shows validation error
Form
Subscription
View filtered crops by dealer Displays subscribed crops
Table
Admin Applies changes and shows status
Activate/Deactivate users
Dashboard notification
Submit payment with missing bank
Payment Page Displays error toast
details
5.7 Functional Testing (End-to-End)
Test Case 1: Login and Role-Based Redirect
Test ID TC_01
Description Valid login should redirect to dashboard
Input Email, Password
Expected Role-specific dashboard appears
Test ID TC_01
Status ✅ Passed
Test Case 2: Publish a Crop
Test ID TC_02
Description Farmer publishes crop successfully
Input Crop Name, Quantity, Price, Location
Expected Crop appears in published list
Status ✅ Passed
Test Case 3: Dealer Unauthorized Access
Test ID TC_03
Description Dealer tries to access admin reports
Expected HTTP 403 Forbidden
Status ✅ Passed
5.8 Role-Based Access Testing
Role-specific restrictions were tested both on the frontend (Angular
RoleGuard) and backend ([Authorize(Roles="X")]).
Role Access Page Access Allowed?
Admin User Management Dashboard ✅ Yes
Dealer Publish Crop (Farmer-only) ❌ No (403)
Farmer View Dealer Subscriptions ✅ Yes
Dealer Admin Reports ❌ No
5.9 Regression Testing
Regression testing was performed after every major change such as:
Implementing ratings
Adding invoice generation
Integrating notifications
Tests were repeated for:
Login sessions and JWT validation
Role-based redirects
API endpoints with/without headers
Crop publishing, subscribing, and payment
5.10 Bug Tracking and Fixes
Bug Description Fix Implemented
Added routing logic to check role from decoded
Incorrect redirect on login for dealers
JWT
Invoice not generated after payment Reordered service call chain for atomic transaction
Notifications not received by dealers Corrected event trigger conditions in CropService
UI elements not scaling on mobile
Adjusted Angular Material grid and flex layout
view
5.11 Summary
This chapter explained the complete testing lifecycle of the Crop Deal
Management System. A combination of unit tests, API validation,
manual UI testing, and end-to-end scenarios ensured that the system met
all its functional and security requirements. By leveraging tools such as
NUnit, Swagger, and Postman, the application was thoroughly validated.
All critical bugs were fixed, and regression tests guaranteed the system’s
stability, performance, and readiness for deployment.
CHAPTER 6
Conclusion
The successful development and implementation of the Crop Deal
Management System (CDMS) represent a significant step forward in
digitizing the agricultural trade ecosystem. This project addresses critical
issues in traditional crop selling—such as intermediary exploitation, lack
of transparency, delayed payments, and poor accessibility—by
introducing a secure, scalable, and role-based digital platform. Built
using modern full-stack technologies, the system not only meets its
functional objectives but also lays a strong foundation for future
expansion and integration with broader agri-tech services.
6.1 Project Recap
The Crop Deal Management System was conceptualized, designed, and
implemented to enable direct transactions between farmers and dealers,
while giving administrative control to platform moderators. The backend
is powered by ASP.NET Core 8.0 Web API, the frontend by Angular
18, and data storage is managed through SQL Server using Entity
Framework Core.
Key Features Developed:
Role-based access with JWT authentication (Farmer, Dealer,
Admin)
Crop listing, subscription, and rating functionalities
Secure digital payments and auto-generated invoices
Real-time notification system for subscribers
Admin dashboard for user and report management
Responsive Angular UI with clean navigation for all roles
Integration of CQRS and Federated Identity for scalability and
security
6.2 System Achievements
The system meets or exceeds all objectives defined in the planning
phase.
Objective Status
Secure user login and role-based access ✅ Achieved
Direct crop listing and subscription model ✅ Achieved
End-to-end payment with invoice generation ✅ Achieved
Notification and alert system ✅ Achieved
Admin management and reporting tools ✅ Achieved
Modular and scalable service-oriented architecture ✅ Achieved
Responsive, multi-role user interfaces ✅ Achieved
Unit, integration, and functional testing ✅ Achieved
6.3 Benefits of the System
1. Empowered Agriculture Commerce
o Eliminates the need for middlemen, ensuring better
pricing for farmers.
o Provides dealers with direct access to crop listings,
increasing procurement efficiency.
2. Role-Based Segmentation and Workflow
o Custom dashboards and functionalities based on user roles
improve clarity and reduce errors.
3. Real-Time Interactions
o Farmers and dealers are immediately notified of listings,
subscriptions, and payments.
4. Transparency and Trust
o Invoices, ratings, and role-based validation ensure
transactions are trustworthy and verifiable.
5. Scalability and Flexibility
o Microservices allow future enhancements like logistics or
weather forecasting to be added easily.
6.4 Technical Learnings
Building this project provided deep technical insights and full-stack
development exposure:
Backend (ASP.NET Core 8.0)
API development using controller-service-repository structure
Role-based authorization using ASP.NET Identity
JWT authentication and secure token validation
Implementation of CQRS and Event Sourcing for decoupled
services
Unit testing with NUnit
Frontend (Angular 18)
Standalone component architecture
Reactive forms, validation, and navigation
Angular Material for consistent UI elements
RoleGuard for route protection and session handling
Tools and DevOps
API testing using Swagger and Postman
JWT decoding and security verification
Git/GitHub for version control and collaboration
6.5 Challenges Faced
Challenge Resolution
Dynamic redirection post-login Added frontend logic to decode JWT and route
based on role accordingly
Implemented transaction tracking and async error
Payment workflow integration
handling
Real-time subscription notification Added event-driven architecture for alert triggering
Used modular Angular components and conditional
Designing UI for all three roles
views
Securing APIs from unauthorized Enforced [Authorize(Roles = \"X\")] with
access JWT validation
6.6 Social and Academic Impact
The project showcases both social relevance and academic value:
Academic Impact: Demonstrates applied understanding of
backend, frontend, authentication, microservices, and software
design principles.
Agricultural Impact: Empowers farmers and small-scale dealers
by offering them a digital marketplace that is easy to use,
transparent, and cost-free.
Innovation: Lays the groundwork for adding AI-driven pricing
insights, crop trend analytics, and logistics integration.
6.7 Key Takeaways
Gained real-world experience in full-stack web development
Understood the importance of clean architecture and modular
design
Learned to implement real-time systems with complex workflows
Strengthened skills in debugging, testing, version control, and
secure coding
Appreciated the value of user-centered design in software
projects
6.8 Future Scope
While the core features are complete, several enhancements are
envisioned for future releases:
1. Payment Gateway Integration
o Enable UPI, net banking, or wallet-based crop purchases.
2. Logistics Management Module
o Track shipment and delivery of sold crops.
3. AI-Powered Price Prediction
o Suggest crop prices based on market trends and
seasonality.
4. SMS/Email Notification Integration
o Keep users updated without needing to stay logged in.
5. Multilingual Support
o Provide accessibility in Hindi, Bengali, and other regional
languages.
6. Mobile App Version
o Build a hybrid or native app for Android/iOS to increase
reach.
6.9 Final Thoughts
The Crop Deal Management System was more than just a technical
challenge; it was an opportunity to bridge gaps in a real-world domain
that affects millions. Through its development, a clear understanding
emerged of how structured planning, layered architecture, and user
empathy come together to create impactful software. With further
support and adoption, this project has the potential to positively
transform how agricultural trade is conducted in India and beyond.
CHAPTER 7
Summary and Future Scope
The journey of designing and developing the Crop Deal Management
System (CDMS) has been an in-depth and rewarding learning
experience. This final chapter provides a comprehensive summary of the
entire project lifecycle — from initial problem identification to final
deployment and testing. It outlines the steps taken in each chapter,
highlights the key functionalities implemented, and discusses the
project’s academic and practical impact. Furthermore, it explores the
possible future scope of the platform in real-world agriculture
technology.
7.1 Introduction
The Crop Deal Management System was envisioned as a full-stack
web application to digitize and simplify agricultural trading. The
platform bridges the gap between Farmers, Dealers, and Admins
through a secure, transparent, and scalable ecosystem. Each user interacts
with role-specific dashboards tailored to their responsibilities—whether
it’s listing crops, subscribing to deals, or managing platform operations.
This summary reflects on the technical decisions, project goals,
outcomes, and the overall development experience gained throughout the
project.
7.2 Problem Statement Recap
Before CDMS, the majority of crop selling in India relied on local
mandis, brokers, and manual communication methods. These practices
resulted in:
Exploitation by middlemen reducing farmers’ profits
No real-time crop price listing or transparency
Inability to securely handle payments or subscriptions
Lack of centralized control for transaction history
Minimal digital presence for rural producers and dealers
This project addressed those gaps by developing a centralized platform
that provides a modern and secure crop trading experience.
7.3 Summary of System Development
The development of CDMS was divided into focused phases, as detailed
in each chapter:
7.3.1 Chapter 1 – Introduction
Outlined the motivation to empower farmers and improve agri-
commerce.
Defined objectives like direct farmer-dealer interaction, payment
integration, and role-based workflows.
Compared similar systems and highlighted the distinct benefits of
CDMS.
7.3.2 Chapter 2 – Software Requirement Analysis
Conducted a detailed study of technical, operational, legal, and
economic feasibility.
Defined functional and non-functional requirements.
Introduced the module-level breakdown and system modeling
strategy.
7.3.3 Chapter 3 – Software Design
Presented the system’s microservices-based architecture.
Included DFDs, UML diagrams, ER diagrams, and class
diagrams.
Detailed each module’s interaction and backend structure.
7.3.4 Chapter 4 – Implementation and User Interface
Explained how the backend and frontend layers were
implemented using ASP.NET Core 8 and Angular 18.
Covered role-specific dashboards, API communication, form
validation, and authentication.
Described the overall UI structure with code snippets and design
patterns used.
7.3.5 Chapter 5 – Software Testing
Documented unit, integration, and functional testing using NUnit,
Swagger, and Postman.
Included role-based access tests, API validations, and bug
resolutions.
Demonstrated how security and data integrity were validated
across all services.
7.3.6 Chapter 6 – Conclusion
Recapped project goals, system benefits, technical insights, and
challenges overcome.
Emphasized the broader agricultural and academic relevance of
the system.
7.4 Key Functionalities Delivered
Feature Description
JWT-based login for Farmers, Dealers, and Admins with route-
Login & Registration
level protection
Crop Publishing & Farmers can publish crop listings; dealers can subscribe based
Subscription on preferences
Feature Description
Dealers initiate payment with invoice generation and record
Digital Payments
tracking
Notifications Real-time alerts for crop listings, payments, and subscriptions
Separate dashboards for each role with unique views and
Role-Based Dashboards
workflows
Admin Reports & User Admins can generate crop and transaction reports and manage
Control user accounts
Dealers can rate farmers after each transaction for future
Ratings
credibility
Organized structure with reusable components and
Modular Codebase
microservices for maintainability
7.5 Tools & Technologies Used
Layer Technologies
Backend ASP.NET Core 8.0, Entity Framework Core, SQL Server
Frontend Angular 18, Angular Material, TypeScript, HTML, RxJS
API Testing Swagger, Postman
Authentication ASP.NET Identity, JWT (JSON Web Tokens), Federated Identity
Version Control Git, GitHub
Testing NUnit, Swagger UI, Postman, Angular DevTools
Project Tracking Manual milestone tracking, GitHub issues
7.6 Learning Outcomes
Working on CDMS gave exposure to the full Software Development Life
Cycle (SDLC) and instilled confidence in handling real-world technical
challenges:
Built a robust microservices-based architecture
Implemented secure, token-based authentication with ASP.NET
Identity
Practiced clean coding principles and modular design
Developed full CRUD-based APIs and integrated them with
Angular frontend
Applied unit testing and API testing practices
Managed role-based routing and state handling in Angular
Learned the importance of user experience and real-time
responsiveness
7.7 Real-World Applications
The Crop Deal Management System can be deployed in various real-life
scenarios:
Local Farmer Groups: Offering digital channels to small
farmers to expand their reach.
Dealer Networks: Allowing wholesalers to subscribe to crop
listings from verified sources.
Agri Co-operatives: Managing produce aggregation, pricing, and
payments in a centralized system.
Government Initiatives: As a foundational platform for e-
mandis or procurement schemes.
Its modularity makes it adaptable to different user sizes and regions.
7.8 Suggestions for Future Development
CDMS can be significantly enhanced through the following innovations:
Payment Gateway Integration: Add Razorpay/Paytm to support
instant online transactions.
Logistics Module: Add shipment tracking for crop delivery using
vehicle IDs or QR codes.
Multilingual Support: Introduce language packs for regional
farmers and dealers.
Mobile Application: Build hybrid apps using Ionic or React
Native for wider accessibility.
AI-Based Crop Pricing Engine: Recommend competitive crop
prices using regional analytics.
SMS/Email Notification System: Alert users about listing
success, payments, or admin decisions.
Blockchain Integration: For tamper-proof invoice tracking and
farmer reputation scoring.
7.9 Final Words
The Crop Deal Management System has proven to be an impactful
academic project that also has real-world potential in revolutionizing
how farmers and dealers interact in India. It digitizes an otherwise
fragmented and offline supply chain, empowering grassroots
stakeholders through technology.
This system is a testament to how software engineering can address
socio-economic challenges with scalable, maintainable, and secure
solutions. The project has not only fulfilled its academic purpose but also
demonstrated the power of open, inclusive technology in solving
grassroots problems. The technical skills, architectural insights, and
domain awareness gained through this project will serve as a solid
foundation for future innovation.