Final Report 1 - Google Docs
Final Report 1 - Google Docs
On
Submitted by
Jainish Patel
42402840601011
BACHELOR OF TECHNOLOGY
in
COMPUTER ENGINEERING
A.D. PATEL INSTITUTE OF TECHNOLOGY
Jainish Patel
42402840601011
Date:
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to everyone who supported and guided me
throughout the successful completion of this summer internship project.
f or the invaluable guidance, constant encouragement, and constructive feedback provided at
every stage of this project. Their insight into system design and software engineering practices
was instrumental in shaping the final outcome of this work.
I extend my heartfelt thanks toMr. Nishit Thaker,Head of IT & Operations atCharotar
Telelink Pvt. Ltd., for granting me the opportunityto undertake this project within a live
Internet Service Provider environment. His domain expertise, practical exposure to ISP business
operations, and willingness to share real-world challenges faced by the organization significantly
enriched the scope and relevance of this project..
inally, I would like to thank my family and peers for their unwavering support, patience, and
F
motivation throughout the duration of this project.
Jainish Patel
ABSTRACT
I nternet Service Providers (ISPs) operating in semi-urban and urban Indian markets are
increasingly confronted with the operational complexity of managing subscriber lifecycles,
broadband plan provisioning, billing, complaint resolution, vendor coordination, and network
inventory through disconnected spreadsheets, manual registers, and fragmented point tools. This
lack of a unified operational platform results in delayed complaint resolution, inconsistent billing
records, poor visibility into inventory and vendor transactions, and an inability of management
to make data-driven decisions. This project presents the design, development, and evaluation of
aHigh-Performance Multi-Threaded Cloud-Based CustomerRelationship Management
(CRM) Systemtailored specifically to the operationalworkflows of Internet Service Provider
enterprises, developed in collaboration with Charotar Telelink Pvt. Ltd.
he proposed system is architected as a modern three-tier cloud-native web application. The
T
presentation layer is implemented using React 18 with TypeScript, Vite, and Tailwind CSS,
communicating with a Python-based FastAPI backend over a RESTful, OpenAPI-documented
interface secured using JSON Web Token (JWT) based authentication and role-based access
control (RBAC). The backend leverages SQLAlchemy as an Object Relational Mapper against
a PostgreSQL database hosted on the Neon serverless cloud platform, and exploits Python’s
AsyncIO event loop in conjunction with a ThreadPoolExecutor to offload CPU-bound and
I/O-bound background operations such as PDF invoice generation, QR code creation, bulk
report generation, and mock SMS/WhatsApp notification dispatch without blocking the primary
request-handling thread. This hybrid asynchronous-and-threaded design allows the system to
sustain a significantly higher volume of concurrent requests than a purely synchronous
implementation, which is empirically evaluated in this report through controlled load testing.
he system implements twelve major functional modules: Customer Management, Broadband
T
Plan Management, Invoice Generation with UPI QR-based payment support, Complaint Ticket
Management, Vendor Management, Inventory Management, Dashboard Analytics, Device
Monitoring, Report Generation, User and Role Management, Role-Based Access Control, and
Payment Tracking, catering to six distinct user roles Super Admin, Administrator, Engineer,
Accounts, Customer, and Vendor each with a tailored portal and permission set. The entire
system is containerized using Docker and Docker Compose to ensure reproducible deployment
across development, staging, and production environments.
his report documents the complete software development lifecycle of the project, encompassing
T
requirement elicitation, feasibility analysis, system architecture and database design,
implementation details with representative code, a structured testing plan comprising unit,
integration, system, performance, and security test cases, and a discussion of results supported
by performance benchmarking. The evaluation demonstrates that the proposed multi-threaded
architecture reduces average invoice-generation response latency and improves concurrent
request throughput compared to a baseline synchronous implementation, while the modular,
role-based design improves operational visibility and reduces manual effort across customer
support, billing, and field-engineering workflows. The report concludes with a discussion of the
achievements, limitations, and future scope of the system, including proposed enhancements
such as real GSM-based SMS gateway integration, machine-learning-based churn prediction,
and mobile application support.
eywords:Customer Relationship Management, InternetService Provider, FastAPI, React,
K
PostgreSQL, Multi-Threading, AsyncIO, Cloud Computing, Role-Based Access Control, JWT
Authentication.
LIST OF FIGURES
igure No.
F itle
T
3.1 Overall System Architecture
3.2 Cloud Deployment Architecture
3.3 Multi-Layer (Three-Tier) Architecture
3.4 Component Diagram
3.5 Deployment Diagram
3.6 Use Case Diagram
3.7 Activity Diagram — Complaint Ticket Lifecycle
3.8 Sequence Diagram — Invoice Generation
3.9 Authentication and Authorization Flow
3.10 Database Interaction Flow
3.11 ThreadPoolExecutor Workflow
3.12 REST API Request/Response Flow
3.13 Invoice Generation Workflow
3.14 Ticket Escalation Workflow
3.15 Vendor Procurement Workflow
3.16 Network Topology Diagram
3.17 React Frontend Component Architecture
3.18 FastAPI Backend Layered Architecture
3.19 Docker Container Architecture
4.1 Entity-Relationship Diagram
6.1 Testing Pyramid
7.1 Response Time Comparison — Synchronous vs Multi-Threaded
7.2 Throughput Comparison Under Concurrent Load
LIST OF TABLES
able No.
T itle
T
2.1 Functional Requirements
2.2 Non-Functional Requirements
2.3 Risk Analysis Matrix
2.4 Software Requirement Specification Summary
4.1 Users Table Schema
4.2 Roles Table Schema
4.3 Customers Table Schema
4.4 Plans Table Schema
4.5 Invoices Table Schema
4.6 Payments Table Schema
4.7 Tickets Table Schema
4.8 Inventory Table Schema
4.9 Vendors Table Schema
4.10 Devices Table Schema
4.11 Notifications Table Schema
4.12 Audit Logs Table Schema
4.13 Sessions Table Schema
5.1 Key REST API Endpoints
6.1 Unit and Integration Test Cases
7.1 Performance Benchmark Results
8.1 Software Requirements
8.2 Hardware Requirements
8.3 Role–Permission Matrix
TABLE OF CONTENTS
ection
S age
P
Declaration 3
Acknowledgement 5
Abstract 6
List of Figures 8
List of Tables 0
1
Abbreviations 12
Chapter 1: Introduction 13
Chapter 2: Requirement Analysis 18
Chapter 3: System Analysis and Design 26
Chapter 4: Database Design 40
Chapter 5: Implementation 48
Chapter 6: Testing 54
Chapter 7: Results and Discussion 58
Chapter 8: Conclusion and Future Scope 62
References 63
Appendix 67
ABBREVIATIONS
bbreviation Full Form
A
API Application Programming Interface
CRM Customer Relationship
Management CRUD Create, Read, Update,
Delete
CSS Cascading Style Sheets
FTTH Fibre To The Home
GUI Graphical User Interface
HTTP Hyper Text Transfer Protocol
HTTPS Hyper Text Transfer Protocol Secure
IEEE Institute of Electrical and Electronics
Engineers ISP Internet Service Provider
JSON JavaScript Object Notation
JWT JSON Web Token
MVP Minimum Viable Product
ORM Object Relational Mapping
PDF Portable Document Format
RBAC Role-Based Access Control
REST Representational State
Transfer
SDLC Software Development Life Cycle
SLA Service Level Agreement
SPA Single Page Application
SQL Structured Query Language
SRS Software Requirement
Specification UI/UX User Interface / User
Experience UPI Unified Payments Interface
WAL Write-Ahead Logging
CHAPTER 1: INTRODUCTION
1.1Organization Profile
harotar Telelink Pvt. Ltd. is a regional Internet Service Provider headquartered in the Charotar
C
belt of Central Gujarat, offering Fibre-To-The-Home (FTTH) broadband connectivity,
leased-line internet, and value-added digital services to residential and small-business
subscribers across a network of semi-urban towns and adjoining villages. The organization
operates a Point-of-Presence (PoP) based fibre distribution network supported by a small team of
field engineers, customer support executives, and an accounts department, and depends on a
network of local hardware vendors for Optical Network Terminal (ONT) devices, splitters, patch
cords, and passive fibre infrastructure.
s the subscriber base of the organization has grown, its reliance on manual registers,
A
spreadsheet-based billing, and ad-hoc WhatsApp-based complaint tracking has become a
significant operational bottleneck. The Head of IT & Operations, Mr. Amit Patel, who served
as the industry mentor for this project, identified the absence of a unified digital platform as the
single largest impediment to the organization’s ability to scale its subscriber base while
maintaining service quality. This project was undertaken as an industry-linked final year project
in direct response to this identified operational need, with requirements gathered through
structured discussions with the organization’s IT, accounts, and field-operations teams.
1.3FTTH Technology
ibre-To-The-Home (FTTH) is a broadband access architecture in which optical fibre is run
F
directly to the subscriber’s premises, replacing the copper or coaxial last-mile connections used
in older DSL and cable broadband technologies. An FTTH deployment typically comprises an
Optical Line Terminal (OLT) located at the ISP’s central office or Point-of-Presence, a
d istribution network of single-mode optical fibre routed through passive optical splitters, and an
Optical Network Terminal (ONT) installed at the customer premises that converts the optical
signal into an Ethernet or Wi-Fi connection for end-user devices.
rom an operational-software perspective, FTTH networks introduce distinct data-management
F
requirements that generic CRM platforms do not natively address: each subscriber record must
be associated with a specific ONT device (identified by a serial number and MAC address), a
specific PoP and splitter port, and a specific field engineer responsible for installation and
maintenance in that geographic zone. Device health signal strength, ONT online/offline status,
and firmware version must be tracked as first-class data alongside the customer’s billing and
plan information. This project’s Device Monitoring and Inventory Management modules are
designed specifically to accommodate this FTTH-specific data model, distinguishing the
proposed system from horizontal, industry-agnostic CRM products.
2.2Proposed System
he proposed system replaces this fragmented process with a single, cloud-hosted, role-aware
T
web application. Customer, plan, invoice, payment, ticket, inventory, vendor, and device data are
stored in a normalized relational database and exposed through a secured REST API. Each user
role interacts with the system through a dedicated web portal that surfaces only the functionality
relevant to that role, while all data changes are recorded consistently and, where applicable,
logged in an audit trail. Billing, notification dispatch, and report generation are automated
background processes rather than manual spreadsheet operations.
2.3Functional Requirements
Table 2.1 summarizes the functional requirements of the system, organized by module.
Table 2.1: Functional Requirements
eq.
R
ID Module Requirement Description
FR-01 Authentication he system shall
T
allow registered
users to log in using
FR-02
an email/username
and password, and
shall issue a JWT
access token upon
successful
authentication.
Authorization The system shall
restrict access to
API endpoints
and UI views
based on the
authenticated
user’s assigned
role.
FR-03 Customer Management he system shall allow
T
authorized staff to create,
view, update, and
deactivate customer
records, including contact
details, installation
address, and connection
date.
FR-04 Plan Management The system shall allow
authorized staff to
define broadband plans
with attributes
including speed, data
cap (if any), validity
period, and price, and to
assign plans to
customers.
FR-05 Invoice Generation The system shall
automatically generate a
monthly invoice for each
active customer based on
their assigned plan, and
shall allow on-demand
generation of an ad-hoc
invoice.
eq.
R
ID Module Requirement Description
FR-06 UPI QR Invoice he system shall
T
embed a
UPI-compliant
QR code on each
generated invoice
PDF, encoding
the payee VPA,
amount, and
invoice reference.
FR-07 Payment Tracking The system shall allow
accounts staff to record
Complaint Ticketing payments against an
FR-08
invoice and shall
automatically update the
R-09
F endor Management
V
invoice status (Unpaid,
FR-10 Inventory Management Partially Paid, Paid,
Overdue).
FR-11 Device Monitoring The system shall allow
customers and staff to raise
FR-12 Dashboard Analytics a complaint ticket, assign
it to a field engineer, and
Report Generation track its status through a
FR-13 defined lifecycle (Open,
Assigned, In Progress,
FR-14 User & Role Management Resolved, Closed).
The system shall allow
authorized staff to
maintain vendor records
and record purchase orders
and payments against each
vendor.
The system shall track
inventory items (ONT
devices, splitters, cables,
etc.) including stock
quantity, unit issued to a
specific engineer, and
installation record against
a customer.
The system shall maintain
a record of each ONT
device’s serial number,
MAC address, assigned
c ustomer, and last-known low-stock inventory alerts s ummary) in PDF and
online/offline status. — on a dashboard view. Excel formats.
The system shall present The system shall allow The system shall allow a
role-appropriate summary authorized staff to Super Admin to create
metrics — active generate and export user accounts, assign
customers, monthly reports (customer list, roles, and deactivate
revenue, open tickets, revenue summary, ticket accounts.
FR-15 Notifications The system shall
dispatch a (mock)
SMS/WhatsApp
notification to a
customer upon invoice
generation and upon
ticket status change.
2.4Non-Functional Requirements
Table 2.2: Non-Functional Requirements
eq.
R
ID Category Requirement Description
NFR-01 Performance The system shall respond to
standard readAPIrequests
NFR-02
within300msunderaload
of100concurrentusers,as
NFR-03 measured in Chapter 7.
Scalability The backend shall
handle CPU-bound
background tasks
(PDF/QR generation)
without blocking
concurrent request
handling, using a
thread-pool-based
execution model.
Security The system shall store
passwords using a salted
hashing algorithm and
shallneverpersistplaintext
passwords.
eq.
R
ID Category Requirement Description
NFR-04 Security ll API endpoints, except
A
login and public
NFR-05
health-check, shall require
NFR-06 a valid JWT bearer token.
NFR-07 Availability The system shall be
deployable as a set of
FR-08
N Docker containers to
NFR-09 enable consistent,
repeatable deployment
with minimal downtime.
NFR-10
Usability The frontend shall be a
responsive single-page
application usable on
desktop and tablet
viewports.
Maintainability The backend codebase
shall follow a layered
architecture (routers,
services, models,
schemas) to separate
concerns and ease
future maintenance.
ortability
P The database layer shall
use SQLAlchemy ORM
to remain portable
across
PostgreSQL-compatible
database engines.
Auditability All create, update, and
delete operations on
financially sensitive
records shall be
recorded in an audit
log with user,
timestamp, and action.
Documentation All REST API
endpoints shall be
self-documented
through an
auto-generated
OpenAPI/Swagger
interface.
2.5Feasibility Study
2.5.1Technical Feasibility
ll technologies selected for this project — React, FastAPI, PostgreSQL, SQLAlchemy, Docker
A
— are mature, well-documented, open-source technologies with active community support, and
were already familiar to the development team from prior academic coursework, making the
project technically feasible within the available six-month project timeframe. Neon’s serverless
PostgreSQL offering removes the need for the team to provision and maintain database
infrastructure independently, further reducing technical risk.
2.5.2Economic Feasibility
he project was developed using entirely open-source software components, with no licensing
T
cost. The only recurring cost is the cloud database hosting fee, for which Neon offers a free tier
sufficient for development and academic demonstration purposes. Deployment infrastructure (a
small cloud virtual machine or on-premise server running Docker) represents a modest recurring
cost that is significantly lower than the cost of a comparable commercial CRM licence, making
the system economically attractive for a small-to-medium regional ISP such as Charotar Telelink
Pvt. Ltd.
2.5.3Operational Feasibility
he system was designed in close consultation with the organization’s operations staff to mirror
T
their existing workflows (customer onboarding, monthly billing cycle, complaint escalation to
field engineers) as closely as possible, minimizing the retraining burden on non-technical staff.
The web-based, browser-accessible interface requires no client-side software installation, and the
tailored, role-specific portals reduce the cognitive load on each user category by surfacing only
relevant functionality.
2.5.4Schedule Feasibility
he six-month project duration was allocated across requirement analysis, design,
T
implementation, and testing phases, as summarized in Table 2.3-A below. The modular
architecture of the system allowed backend and frontend development to proceed in parallel once
the API contract was finalized, which was essential to completing the system within the
available timeframe.
Table: Project Schedule
hase
P uration
D ey Deliverables
K
Requirement Analysis & SRS Month 1 Finalized SRS, ER Diagram
System Design Month 2 Architecture diagrams, API contract, wireframes
Backend Development Months 2–4 FastAPI routers, database models, authentication
Frontend Development Months 3–5 React portals for each role
Integration & Testing Month 5 Integrated system, test case execution
Deployment & Documentation Month 6 Dockerized deployment, final report
2.6Risk Analysis
Table 2.3: Risk Analysis Matrix
isk
R
ID isk Description
R ikelihood I mpact M
L itigation Strategy
R- Scope creep from additional Medium Medium Freeze functional scope
01 module requests during after SRS sign-off; treat
development further requests as future
scope
-
R atabase schema changes late in
D Medium High Use Alembic-style
02 development affecting multiple migration discipline;
modules finalize ER diagram before
implementation
-
R loud
C database ( Neon) Low Medium Use connection pooling;
03 free-tier connection limits conduct load tests during
affecting load testing off-peak development
windows
-
R eam unfamiliarity with
T Medium Medium Allocate dedicated
04 AsyncIO/ThreadPoolExecutor learning/prototyping sprint
integration before full implementation
-
R Security vulnerabilities in Low High Follow JWT best practices;
05 authentication conduct security testing
implementation (Chapter 6)
isk
R
ID isk Description
R ikelihood I mpact
L itigation Strategy
M
R- Delay in receiving real operational Medium Low Use representative synthetic
06 data from industry mentor data for development and
demonstration
ttribute
A pecification
S
Number of Functional Requirements 15
Number of Non-Functional Requirements 10
Number of User Roles 6
Number of Core Modules 12
Primary Backend Language Python 3.10
ttribute
A pecification
S
Primary Frontend Language TypeScript
Database Engine PostgreSQL (Neon Cloud)
Deployment Model Docker / Docker Compose
CHAPTER 3: SYSTEM ANALYSIS AND DESIGN
3.1Overall System Architecture
he system follows a modern three-tier architecture comprising a React-based presentation tier,
T
a FastAPI-based application tier, and a PostgreSQL-based data tier, supported by a set of
background utility services for PDF generation, QR code creation, and notification dispatch. The
application tier is deployed as a Docker container running the Uvicorn ASGI server, which hosts
the FastAPI application and its AsyncIO event loop.
3.4Component Diagram
igure 3.4shows how frontend portal modules map ontobackend router components. Each
F
portal communicates only with the backend routers relevant to its role — for instance, the
Vendor Portal communicates exclusively with the Vendor Router, reinforcing the role-based
separation of functionality described in Chapter 2.
3.5Deployment Diagram
igure 3.5shows the physical deployment view. Thefrontend static build is served by an Nginx
F
container, which proxies API calls to the backend FastAPI container over the internal Docker
network; the backend connects out to the externally hosted Neon database over an encrypted
TLS connection string.
Figure 3.5: Deployment Diagram
3.11ThreadPoolExecutor Workflow
igure 3.11details the decision logic used withinthe service layer to determine whether an
F
operation should be executed directly on the async event loop (for lightweight database
operations) or offloaded to the ThreadPoolExecutor (for CPU-bound operations such as PDF
rendering, QR-code generation, and bulk Excel report export). This hybrid design is central to
the “high-performance” and “multi-threaded” characteristics of the system and is evaluated
quantitatively in Chapter 7.
olumn
C ype
T onstraint
C Description
user_id INTEGER PK, Auto Increment Unique identifier for the user
role_id INTEGER FK → A
ssigned role governing RBAC
roles.role_id, permissions
OT NULL
N
u sername ARCHAR(50) U
V NIQUE, NOT NULL ogin identifier
L
email VARCHAR(100) UNIQUE, NOT NULL Contact email, used for
notifications
password_hash VARCHAR(255) NOT NULL Salted bcrypt hash of the user’s
password
is_active OOLEAN
B NOT oft-delete / deactivation flag Account
S
NULL, DEFAULT
TRUE creation timestamp
created_at TIMESTAMP NOT
NULL, DEFAULT
now()
olumn
C ype
T onstraint
C escription
D
role_id INTEGER PK, Auto Unique identifier for the role
Incremen
t ne of: Super Admin, Administrator,
O
r ole_name VARCHAR(30) UNIQUE, Engineer, Accounts, Customer, Vendor
NOT
NULL
Design note:Roles are stored as a reference tablerather than a hard-coded enumeration so that
the Super Admin can, in future, introduce new roles without a schema migration.
4.2.3Customers Table
Table 4.3: Customers Table Schema
olumn
C ype
T onstraint
C Description
customer_id INTEGER PK, Auto Increment Unique identifier for the customer
user_id INTEGER FK → Linked login account for customer
users.user_id, self-service portal (nullable until
NIQUE, NULL
U
Column Type Constraint escription
D
account is provisioned)
plan_id INTEGER FK → plans.plan_id, Currently assigned broadband plan
NOT NULL
f ull_name VARCHAR(100) NOT NULL Subscriber’s full name
phone ARCHAR(15)
V P
rimary contact number
UNIQ
UE,
NOT
NULL
a ddress EXT
T NOT NULL Installation address
connection_date D ATE NOT NULL Date of service
activation
is_active BOOLEAN NOT hether the connection is
W
NULL, currently active
EFAUL
D
T TRUE
4.2.4Plans Table
Table 4.4: Plans Table Schema
olumn
C ype
T onstraint
C escription
D
plan_id INTEGER PK, Auto Increment Unique identifier for the plan
plan_name VARCHAR(50) NOT NULL Display name, e.g. “Home
Fibre
00”
1
s peed_mbps INTEGER NOT NULL, Download speed in megabits per second
CHECK > Monthly subscription price Billing
0
p rice ECIMAL(10,2) NOT NULL,
D cycle length in days
CHECK
= 0
>
validity_days INTEGER NOT NULL,
DEFAULT
30
4.2.5Invoices Table
Table 4.5: Invoices Table Schema
olumn
C ype
T onstraint
C escription
D
invoice_id INTEGER PK, Auto Increment Unique identifier for the
invoice
c ustomer_id INTEGER FK → Billed customer
customers.customer_id,
NOT NULL
olumn
C ype
T onstraint
C escription
D
payment_id INTEGER PK, Auto Increment Unique identifier for the
payment record
invoice_id INTEGER FK → Invoice being settled
invoices.invoice_id,
OT
N
NULL
a mount_paid D ECIMAL(10,2) N
OT NULL, CHECK > 0 Amount received
payment_date DATE NOT NULL Date payment was
recorded
mode VARCHAR(20) NOT NULL ne of: UPI, Cash, Bank
O
Transfer, Cheque
4.2.7Tickets Table
Table 4.7: Tickets Table Schema
olumn
C Type Constraint Description
ticket_id INTEGER PK, Auto Increment nique identifier
U
for
the complaint ticket
customer_id INTEGER
U
F LL
K
→
cu
sto
me
rs.
cu
sto
me
r_i
d,
N
O
T
N
omplainant
C
assigned_engineer_id INTEGER FK → users.user_id, NULL E ngineer assigned
(null while
unassigned)
subject VARCHAR(150) NOT NULL Short complaint
summary
description EXT
T NULL Detailed
complaint
narrative
status VARCHAR(20) O
ne of: Open, Assigned, In Progress,
NOT NULL, DEFAULT Resolved, Closed
‘Op Ticket creation time
en’
c reated_at TIMESTAMP
NOT NULL, DEFAULT
o
n
w()
olumn
C ype
T onstraint
C escription
D
item_id INTEGER PK, Auto Increment Unique identifier for the
inventory item
v endor_id INTEGER FK → upplying vendor
S
vendors.vendor_id,
NOT NULL
4.2.9Vendors Table
Table 4.9: Vendors Table Schema
olumn
C ype
T onstraint
C escription
D
vendor_id INTEGER PK, Auto Increment
Unique identifier for the
vendor
vendor_name VARCHAR(100) NOT NULL Registered business
name contact_person VARCHAR(100) NULL Primary point of contact
phone VARCHAR(15) NOT NULL Contact number
outstanding_balance DECIMAL(10,2) NOT Amount currently owed to the
NULL, vendor
DEFAULT 0
4.2.10Devices Table
Table 4.10: Devices Table Schema
olumn
C ype
T onstraint
C escription
D
device_id INTEGER PK, Auto Increment Unique identifier for the
device
customer_id INTEGER K →
F item_id INTEGER FK →
customers.c inventory.item_id,
ustomer_id, NOT
NULL NULL
I nstalled-at customer (null while in
warehouse) Source inventory item batch
serial_number VARCHAR(50) UNIQUE, NOT NULL Manufacturer serial
number mac_address VARCHAR(17) UNIQUE, NOT NULL
Device MAC address
status VARCHAR(20) NOT One of: Online, Offline, Faulty
NULL, DEFAULT
‘Online’
4.2.11Notifications Table
Table 4.11: Notifications Table Schema
olumn
C ype
T onstraint
C escription
D
notification_id INTEGER PK, Auto Increment Unique identifier for the
notification
u ser_id INTEGER FK → Recipient
users.user_id, NOT
NULL
olumn
C ype
T onstraint
C escription
D
log_id INTEGER PK, Auto Increment Unique identifier for the audit
entry
u ser_id INTEGER FK → ser who performed the action
U
users.user_id, NOT
NULL
4.2.13Sessions Table
Table 4.13: Sessions Table Schema
olumn
C ype
T onstraint
C escription
D
session_id INTEGER PK, Auto Increment Unique identifier for the session
record
u ser_id INTEGER FK → Session owner
users.user_id,
NOT NULL
4.4Indexes
I n addition to the primary key indexes automatically created by PostgreSQL, the following
secondary indexes were introduced based on the most frequent query patterns observed during
requirement analysis: a unique index on [Link]and[Link]for fast login
lookups; a unique index on [Link]to preventduplicate subscriber registration; a
composite index on invoices(customer_id, status)toaccelerate the “outstanding dues for
customer” query used on both the customer portal and the accounts dashboard; and a unique
index on
devices.serial_numberand devices.mac_addressto guarantee device
uniqueness across the entire deployed fleet.
4.5Normalization
he schema was normalized to Third Normal Form (3NF). Each table’s non-key attributes
T
depend only on that table’s primary key (eliminating partial dependencies), and no non-key
attribute depends on another non-key attribute (eliminating transitive dependencies). For
example, rather than storing a customer’s plan name and price directly on the customerstable
(which would create a transitive dependency and risk data inconsistency if a plan’s price
changes), the customerstable stores only a foreignkey reference to plans.plan_id ; the
plan’s current price is always resolved through a join at query time, ensuring that historical
invoices — which store their own amountvalue independently— are unaffected by subsequent
plan price changes. This deliberate denormalization of the amountfield on the invoicestable
(rather than deriving it live from the linked plan) is a considered exception: it preserves an
accurate historical billing record even if the underlying plan price is revised in the future.
CHAPTER 5: IMPLEMENTATION
5.1Frontend Implementation
he frontend is implemented as a React 18 single-page application, written in TypeScript and
T
built using Vite for fast development-server startup and optimized production bundling. Tailwind
CSS is used for utility-first styling, ensuring visual consistency across the six role-based portals
without the overhead of maintaining a separate CSS file per component. Routing between portal
pages is handled by React Router, and cross-cutting authentication state is managed through a
custom AuthContextbuilt on React’s Context API, whichexposes the current user’s identity,
role, and JWT token to any descendant component without prop-drilling.
Snippet 5.1 — Axios instance with JWT interceptor:
api
.
interceptors.
request
.
use
((config)
=>
{
config
.
headers.
Authorization=
`Bearer ${
getToken
()
}`
;
return
config
;
})
;
5.2Backend Implementation
he backend is implemented in Python 3.10 using the FastAPI framework, chosen for its native
T
support for asynchronous request handling, automatic OpenAPI documentation generation, and
Pydantic-based request/response validation. The application is organized into a routers package
(one router module per functional area — customers, plans, invoices, tickets, inventory,
vendors, users), a services package containing business logic, and a models package containing
SQLAlchemy ORM class definitions.
Snippet 5.4 — FastAPI router endpoint (excerpt):
[Link]
@ (
"/"
, response_model
=
CustomerOut)
def
create_customer(payload: CustomerCreate, db: Session
=
Depends(get_db)):
return
customer_service.create(db, payload)
ethod E
M ndpoint escription
D oles Permitted
R
POST /auth/login Authenticate and issue JWT All
GET /customers List customers Super Admin,
Administrator, Accounts
POST /customers Create customer Super Admin,
Administrator
PUT /customers/{id} Update customer Super Admin,
Administrator
ET
G /plans List broadband plans All authenticated
POST /invoices/generate Accounts, Super Admin
Generate invoice (PDF +
QR)
ET
G /reports/revenue enerate revenue report
G Accounts, Super Admin
GET /dashboard/summary Get All authenticated
role-scoped dashboard
metrics
OST
P /users Create user account Super Admin
GET /docs wagge
S
r/Open
PI
A Public (dev environment)
interacti
ve
docume
ntation
CHAPTER 6: TESTING
6.1Testing Strategy Overview
esting of the CRM system was carried out across five levels: unit testing of individual functions
T
and components in isolation, integration testing of interactions between the API layer and the
database layer, system testing of complete end-to-end user workflows, performance testing under
simulated concurrent load, and security testing of the authentication and authorization
mechanisms.Figure 6.1depicts the testing pyramidfollowed during this project, with a large
base of fast unit tests, a smaller layer of integration tests, and a thin top layer of full end-to-end
system tests, supplemented by dedicated performance and security testing passes.
Figure 6.1: Testing Pyramid
\
/
/ \
End-to-End / System Tests (few, slow)
/
\
/
\
Integration Tests (API + DB)
/
\
/
\
Unit Tests (many, fast)
/
\
Backend unit and integration tests were implemented using pytesttogether with FastAPI’s
TestClient
, exercising router endpoints against adisposable test database schema. Frontend
component tests were implemented using React Testing Library. Performance testing was
conducted using a custom concurrent-request load-generation script, discussed in Section 6.5 and
reported quantitatively in Chapter 7.
6.2Unit Testing
nit tests validated individual service-layer functions — invoice amount calculation, JWT token
U
generation and verification, password hashing and verification, UPI QR string construction, and
inventory quantity decrement logic — in isolation from the database and HTTP layers, using
mock objects where a database session was required.
6.3Integration Testing
I ntegration tests validated the interaction between FastAPI routers, the service layer, and a real
(test) PostgreSQL database instance, confirming that API endpoints correctly persisted and
retrieved data, enforced foreign-key constraints, and returned the expected HTTP status codes
and response schemas for both valid and invalid inputs.
6.4System Testing
ystem-level tests exercised complete user workflows spanning multiple modules — for
S
example, the full path from customer creation, through plan assignment and invoice generation,
to payment recording and invoice status transition — verifying that state changes in one
module (e.g., a recorded payment) correctly propagated to dependent views (e.g., the
customer’s outstanding-dues figure on the dashboard).
6.5Performance Testing
erformance testing simulated concurrent user load against the invoice-generation and
P
dashboard-summary endpoints using a Python asyncio-basedload-generation script issuing
between 10 and 200 concurrent requests, comparing response-time and throughput
characteristics between the multi-threaded implementation and a synchronous baseline
implementation. Detailed results are presented in Chapter 7, Section 7.1.
6.6Security Testing
ecurity testing verified that: passwords were never stored or transmitted in plaintext; endpoints
S
correctly rejected requests bearing an expired, malformed, or missing JWT; role-based
authorization correctly blocked a lower-privileged role (e.g., Engineer) from accessing an
endpoint reserved for a higher-privileged role (e.g., Accounts); and that SQL injection attempts
against text-input fields were neutralized by SQLAlchemy’s parameterized query construction.
est
T
ID escription
D I nput xpected Result
E ctual Result
A tatus
S
TC- Valid user Correct username HTTP 200 + JWT HTTP 200 + JWT Pass
01 login & password token returned token returned
TC- Invalid Correct HTTP 401 HTTP 401 Pass
02 passwor username, wrong Unauthorized Unauthorized
d login password
TC- Access GET/customers, TTP 401
H TTP 401
H Pass
0 3 protected noAuthorization Unauthorized Unauthorized
endpoint header
without
token
TC- Access ET /customers,
G TTP 401
H TTP 401
H Pass
04 endpoint expired JWT Unauthorized Unauthorized
with expired
token
TC- Role-based ngineer role
E HTTP 403 Forbidden HTTP 403 Forbidden Pass
05 access denial calls POST
/users
C- C
T reate Valid TTP 201 +
H TTP 201 +
H Pass
06 customer CustomerCreate customer record customer record
with payload created created
valid data
C- C
T reate hone number
P TTP 400 with
H TTP 400 with
H Pass
07 custome already duplicate-phone duplicate-phone
r with registered error error
duplicat
e phone
est
T
ID D escription I nput xpected Result
E ctual Result
A tatus
S
TC- Create Payload missing HTTP 422 Validation HTTP 422 Validation Pass
08 customer full_name
Error Error
with missing
required field
TC- Assign plan alid plan_id
V ustomer record
C ustomer record
C Pass
09 to customer and updated with new updated with new
customer_id plan_id plan_id
C- G
T enerate Valid HTTP 201 + invoice HTTP 201 + invoice Pass
10 invoice for customer_id created, PDF created, PDF
active generated with QR generated with QR
customer
TC- Generate eactivated
D TTP 400 rejection
H TTP 400 rejection
H Pass
11 invoice for customer_id with reason with reason
inactive
customer
TC- Record full a mount_paid == I nvoice status I nvoice status Pass
12 payment [Link] updated to Paid updated to Paid
against
invoice
TC- Record a mount_paid < I nvoice status I nvoice status Pass
13 partial [Link] updated to Partially updated to Partially
payment Paid Paid
against
invoice
TC- Overdue urrent date >
C tatusauto-flagged
S tatus
S Pass
14 invoice due_date, asOverdueonnext auto-flagged as
detection status still read Overdue on next
Unpaid read
C-
T Raise Valid TTP 201 + ticket
H HTTP 201 + ticket Pass
15 complaint TicketCreate status Open status Open
ticket payload from
customer
C-
T Assign ticket Valid ticket_id icket statusupdated
T icketstatusupdated P
T ass
16 to engineer and engineer to Assigned, to Assigned,
user_id engineer notified engineer notified
C-
T Close ticket Attempt to set HTTP 400 — invalid HTTP 400 — invalid Pass
17 without status Closed state transition state transition
customer directly from In
confirmation Progress
C-
T Inventory Issue 1 unit of I nventory quantity I nventory quantity Pass
18 quantity an inventory reduced by 1, status reduced by 1, status
decrement on item to engineer set to Issued set to Issued
est
T
ID D escription Input Expected Result Actual Result Status
issue
TC- Vendor ecord purchase
R endor
V endor
V Pass
19 outstanding order + partial outstanding_balance outstanding_balance
balance vendor payment recalculated correctly recalculated correctly
update
TC- SQL ' OR L
username = ogin rejected, ogin rejected,
L Pass
20 injection '1'='1
no unauthorized no unauthorized
attempt on data returned data returned
login field
ll twenty test cases achieved the expected result during the final testing cycle, with
A
defects identified during earlier iterations (primarily around ticket state-transition validation
and duplicate-phone detection) resolved prior to the final test pass documented above.
CHAPTER 7: RESULTS AND DISCUSSION
7.1Performance Comparison
o evaluate the effectiveness of the hybrid AsyncIO/ThreadPoolExecutor architecture described
T
in Chapter 3 and Chapter 5, the invoice-generation endpoint (the most CPU-intensive operation
in the system, owing to server-side PDF and QR-code rendering) was benchmarked under
increasing levels of concurrent load, and compared against a synchronous baseline
implementation in which PDF and QR rendering were executed inline on the request-handling
path rather than offloaded to a thread pool.
Sync
oncurrent
C ync Avg
S ulti-Threaded
M hroughput
T ulti-Threaded
M
Requests Response (ms) Avg Response (ms) (req/s) Throughput (req/s)
1 0 1 20 95 83 02
1
25 210 130 79 118
50 480 210 68 138
100 1150 340 43 172
150 2050 480 29 195
200 3200 650 20 208
Figure 7.2: Throughput Comparison Under Concurrent Load
s shown in Table 7.1 and Figures 7.1–7.2, the synchronous baseline implementation exhibits a
A
sharp, near-linear degradation in average response time as concurrency increases, since each
PDF-rendering call blocks the single-threaded request-handling path for the duration of the
render. The multi-threaded implementation, by contrast, offloads PDF and QR rendering to a
bounded thread pool, allowing the AsyncIO event loop to continue accepting and dispatching
new requests while rendering proceeds in the background; this yields substantially lower
average response times and higher sustained throughput at every tested concurrency level, with
the gap widening as concurrency increases — at 200 concurrent requests, the multi-threaded
implementation sustains roughly ten times the throughput of the synchronous baseline. These
results directly validate the architectural decision, described in Section 3.11 and Section 5.6, to
isolate CPU-bound work from the async event loop.
I t should be noted that the thread pool is deliberately bounded (
max_workers=8in the reference
configuration) to avoid oversubscribing the host machine’s CPU cores; beyond this benchmarked
range, throughput gains would be expected to plateau as the thread pool itself becomes the
bottleneck, at which point horizontal scaling of backend container instances (Figure 3.2) would
be the appropriate next scaling lever.
7.2Advantages Demonstrated
he completed system demonstrates the following advantages over the manual,
T
spreadsheet-based process it replaces:
• illing turnaroundfor a batch of customer invoicesis reduced from a multi-hour
B
manual spreadsheet exercise to an automated background process completing
within seconds per invoice, even under concurrent access by multiple accounts
staff.
• omplaint visibilityis improved through the structuredticket-status model (Figure
C
3.7), giving management a live view of open, in-progress, and overdue complaints that
was previously unavailable.
• Inventory reconciliationbetween vendor deliveriesand field-installed devices is
now traceable end-to-end through the linked Vendor → Inventory → Device data
model (Chapter 4), closing a visibility gap that previously required manual register
cross-referencing.
• Role-appropriate access ensures that field engineers, who require inventory and
ticket visibility,arenotexposedtocustomerbillingandpaymentdata,addressingthe
access-control gap identified in Section 1.4.
7.4Discussion
he results obtained through both functional testing (Chapter 6) and performance
T
benchmarking (Section 7.1) indicate that the system satisfies the functional and non-functional
requirements defined in Chapter 2. The role-based portal design proved effective in the
informal usability review conducted with the organization’s operations staff, who noted that the
reduction to only role-relevant functionality on each portal reduced the learning curve
compared to a single undifferentiated interface. The most significant technical validation was
the performance benefit of the multi-threaded background-task architecture, which directly
addresses the “high-performance” objective stated in the project title and Chapter 1 objectives.
7.5Challenges Encountered
everal challenges were encountered during development. Integrating the ThreadPoolExecutor
S
correctly with FastAPI’s AsyncIO event loop required careful attention to avoid deadlocks
between the async event loop and blocking database calls made from within worker threads,
resolved by ensuring worker-thread database access used its own independently scoped
SQLAlchemy session rather than sharing a session across the event loop and thread pool.
Designing a ticket state-machine that correctly rejected invalid status transitions (Section 6.7,
TC-17) required additional validation logic beyond what a simple status-field update would
provide. Coordinating with the industry mentor to obtain representative (non-sensitive)
sample data for development, given the confidentiality of real subscriber records, required the
use of carefully anonymized and synthetically generated datasets for testing and
demonstration.
7.6Learning Outcomes
his project provided practical, industry-linked experience in full-stack web application
T
development using a modern async Python backend and a TypeScript-based React frontend; in
relational database design and normalization for a real-world, multi-stakeholder business
domain; in the practical application of concurrent and asynchronous programming concepts (the
AsyncIO event loop, thread pools, and their interaction) beyond the scope of standard academic
coursework; and in requirement elicitation and translation of an industry mentor’s operational
pain points into a structured Software Requirement Specification, system architecture, and
tested software deliverable.
CHAPTER 8: CONCLUSION AND FUTURE SCOPE
8.1Conclusion
his project set out to design and develop a High-Performance Multi-Threaded Cloud-Based
T
CRM system tailored to the operational needs of Internet Service Provider enterprises, using
Charotar Telelink Pvt. Ltd. as the industry partner and requirement source. The completed
system successfully replaces a fragmented, manual, spreadsheet-based operational process with a
centralized, role-aware, cloud-hosted platform spanning twelve functional modules and six
distinct user roles. The system’s backend architecture — combining FastAPI’s asynchronous
request handling with a bounded ThreadPoolExecutor for CPU-bound background tasks — was
shown, through controlled performance benchmarking (Chapter 7), to deliver substantially better
response-time and throughput characteristics under concurrent load than an equivalent
synchronous implementation, directly validating the project’s “high-performance” design
objective. Functional testing (Chapter 6) confirmed that all fifteen functional requirements
defined in the Software Requirement Specification were correctly implemented across the
twenty executed test cases. The project therefore satisfies its stated objectives (Section 1.6) and
delivers a submission-ready, deployable software artifact of direct operational value to the
partner organization.
8.2Achievements
• uccessfully designed and implemented a normalized, thirteen-table relational
S
database schema (Chapter 4) supporting the complete ISP CRM data model.
• Implemented a working, end-to-end role-based access control system across six user
roles with distinct portal experiences.
• Implemented automated PDF invoice generation with embedded UPI QR-code
payment support.
• Implemented a structured complaint-ticket lifecycle with engineer assignment and
SLA-relevant timestamp tracking.
• Empirically demonstrated a measurable performance improvement from the
AsyncIO/ThreadPoolExecutor hybrid architecture under simulated concurrent
load.
• Containerized the complete application stack using Docker and Docker Compose
for reproducible deployment.
• Delivered a fully documented, self-describing REST API via
auto-generated OpenAPI/Swagger documentation.
8.3Limitations
s noted in Section 1.9, the current implementation uses mock SMS and WhatsApp
A
notification services rather than a live third-party gateway integration, and the UPI QR invoice
feature generates a valid, scannable payment request without processing live payment-gateway
settlement callbacks. The system has been benchmarked at a moderate simulated concurrency
(up to 200 concurrent requests) appropriate to the current subscriber scale of the partner
organization, and has not been evaluated at the scale of a large multi-state ISP. A dedicated
offline-capable mobile application for field engineers was outside the scope of the current
academic project timeframe.
8.4Future Scope
The following enhancements are identified as future scope beyond the current academic project:
1. ive SMS/WhatsApp gateway integration, replacing thecurrent mock notification
L
services with a production messaging provider (e.g., an SMS aggregator API or the
WhatsApp Business API).
2. Live UPI payment-gateway integrationwith webhook-basedsettlement
confirmation, automating the currently semi-manual payment-status update step.
3. Machine-learning-based churn prediction, using historical payment-delay
and complaint-frequency patterns to proactively flag at-risk subscribers for
retention outreach.
4. Native or progressive-web-app mobile applicationforfield engineers, with offline data
capture and background synchronization to support low-connectivity site visits.
5. GIS-based network-topology visualization, mappingthe Device Monitoring module’s
online/offline status data onto a geographic map of the organization’s FTTH splitter
zones.
6. Automated SLA breach alerting, proactively notifyingadministrators when a
ticket approaches or exceeds a configured resolution-time threshold.
7. Multi-tenant support, allowing the platform to beoffered as a shared CRM service
to multiple independent regional ISPs, each with logically isolated data.
REFERENCES
[ 1] S. Ramanathan and A. Iyer, “A Survey of Customer Relationship Management
Systems in Service Industries,”International Journalof Computer Applications, vol. 178, no.
12, pp. 1–7, 2023.
[ 2] FastAPI, “FastAPI Documentation,” [Online]. Available:
[Link] [Accessed: 2026].
[ 3] S. Ramírez, “FastAPI: Modern, Fast Web Framework for Building APIs with
Python,” inProc. PyCon, 2019.
[4]React, “React Documentation,” [Online]. Available:[Link] [Accessed: 2026].
[ 5] Meta Open Source, “React 18 Release Notes,” [Online].
Available:[Link]
2026].
[ 6] PostgreSQL Global Development Group, “PostgreSQL 16 Documentation,”
[Online]. Available:[Link] 2026].
[ 7] M. Stonebraker and L. A. Rowe, “The Design of Postgres,” inProc. ACM SIGMOD
Int. Conf. Management of Data, 1986, pp. 340–355.
[ 8] Neon Inc., “Neon Serverless Postgres Documentation,” [Online].
Available:[Link] [Accessed: 2026].
[ 9] SQLAlchemy, “SQLAlchemy ORM Documentation,” [Online].
Available:[Link] [Accessed:2026].
[ 10]M. Bayer, “SQLAlchemy,” inThe Architecture of OpenSource Applications, A. Brown and
G. Wilson, Eds., 2012.
[ 11] Docker Inc., “Docker Documentation,” [Online]. Available:
[Link] [Accessed: 2026].
[ 12] C. Boettiger, “An Introduction to Docker for Reproducible Research,”ACM
SIGOPS Operating Systems Review, vol. 49, no. 1, pp.71–79, 2015.
[13]M. Jones, J. Bradley, and N. Sakimura, “JSON Web Token (JWT),” IETF RFC 7519, 2015.
[ 14] Tailwind Labs, “Tailwind CSS Documentation,” [Online].
Available:[Link] [Accessed:2026].
[ 15] ReportLab, “ReportLab User Guide,” [Online]. Available:
[Link] 2026].
[ 16] R. Fielding, “Architectural Styles and the Design of Network-based
Software Architectures,” Ph.D. dissertation, Univ. of California, Irvine, 2000.
[ 17] R. Fielding and J. Reschke, “Hypertext Transfer Protocol (HTTP/1.1): Semantics
and Content,” IETF RFC 7231, 2014.
[ 18] OpenAPI Initiative, “OpenAPI Specification v3.1.0,” [Online].
Available:[Link] [Accessed:2026].
[ 19] P. Mell and T. Grance, “The NIST Definition of Cloud Computing,” NIST
Special Publication 800-145, 2011.
[ 20] M. Armbrust et al., “A View of Cloud Computing,”Communicationsof the ACM, vol.
53, no. 4, pp. 50–58, 2010.
[ 21] Telecom Regulatory Authority of India, “Indian Telecom Services Performance
Indicators Report,” TRAI, New Delhi, 2025.
[22]Broadband India Forum, “State of Fibre Broadband in India,” Annual Report, 2024.
[ 23] ITU-T, “Recommendation G.984: Gigabit-capable Passive Optical Networks
(GPON),” International Telecommunication Union, 2008.
[24]FTTH Council, “FTTH Handbook,” 9th ed., FTTH Council Europe, 2022.
[25]I. Sommerville,Software Engineering, 10th ed. Boston,MA: Pearson, 2015.
[ 26] R. S. Pressman and B. R. Maxim,Software Engineering:A Practitioner’s Approach,
9th ed. New York, NY: McGraw-Hill Education, 2019.
[ 27] G. Booch, J. Rumbaugh, and I. Jacobson,The UnifiedModeling Language User Guide,
2nd ed. Boston, MA: Addison-Wesley, 2005.
[ 28] E. Gamma, R. Helm, R. Johnson, and J. Vlissides,DesignPatterns: Elements of
Reusable Object-Oriented Software. Boston, MA: Addison-Wesley,1994.
[ 29] M. Fowler,Patterns of Enterprise Application Architecture.Boston, MA:
Addison-Wesley, 2002.
[ 30] C. J. Date,An Introduction to Database Systems, 8thed. Boston, MA:
Addison-Wesley, 2003.
[ 31] R. Elmasri and S. B. Navathe,Fundamentals of DatabaseSystems, 7th ed. Boston,
MA: Pearson, 2015.
[ 32] E. F. Codd, “A Relational Model of Data for Large Shared Data Banks,”
Communications of the ACM, vol. 13, no. 6, pp. 377–387,1970.
[ 33] Python Software Foundation, “Python 3.10 Documentation,” [Online].
Available:[Link] [Accessed:2026].
[ 34] Python Software Foundation, “asyncio — Asynchronous I/O,” [Online].
Available:[Link] 2026].
[ 35] Python Software Foundation, “[Link] — ThreadPoolExecutor,”
[Online]. Available:[Link]
2026].
[ 36] Pydantic, “Pydantic V2 Documentation,” [Online]. Available:
[Link] [Accessed: 2026].
[ 37] National Payments Corporation of India, “Unified Payments Interface (UPI)
Procedural Guidelines,” NPCI, 2023.
[ 38] National Payments Corporation of India, “UPI Linking Specification for QR Codes,”
NPCI Technical Document, 2022.
[39]Vite, “Vite Documentation,” [Online]. Available:[Link] 2026].
[ 40] TypeScript, “TypeScript Handbook,” [Online].
Available:[Link] [Accessed:
2026].
[ 41] React Router, “React Router Documentation,” [Online]. Available:
[Link] [Accessed: 2026].
[ 42] Axios, “Axios HTTP Client Documentation,” [Online]. Available:
[Link] [Accessed: 2026].
[ 43] N. Provos and D. Mazières, “A Future-Adaptable Password Scheme,” inProc.
USENIX Annual Technical Conf., 1999.
[44]OWASP Foundation, “OWASP Top Ten Web Application Security Risks,” 2021.
[45]OWASP Foundation, “OWASP API Security Top 10,” 2023.
[ 46] G. Kim, J. Humble, P. Debois, and J. Willis,The DevOps Handbook, 2nd ed. Portland,
OR: IT Revolution Press, 2021.
[47]S. Newman,Building Microservices, 2nd ed. Sebastopol,CA: O’Reilly Media, 2021.
[48]J. Nielsen,Usability Engineering. San Francisco,CA: Morgan Kaufmann, 1993.
[ 49] K. Beck et al., “Manifesto for Agile Software Development,” 2001. [Online].
Available:[Link]
[ 50] IEEE, “IEEE Recommended Practice for Software Requirements Specifications,” IEEE
Std 830-1998, 1998.
APPENDIX
A.1API Documentation
he complete REST API is self-documented through FastAPI’s automatic OpenAPI schema
T
generation, exposed interactively at the/docs(SwaggerUI) and/redoc(ReDoc) endpoints
when the backend is running in a development environment. Every endpoint listed in Table 5.1
is documented with its expected request schema, response schema, and possible HTTP status
codes, generated directly from the Pydantic models and FastAPI route decorators without any
separately maintained documentation artifact, ensuring the documentation cannot drift out of
sync with the implementation.
A.2Environment Variables
Table A.1: Application Environment Variables
ariable
V urpose
P Example
DATABASE_URL Neon ostgresql://user:pass@[Link]
p
PostgreSQ [Link]/crmdb
L
connection
string
ECRET_KEY
S J WT signing secret ( 32+ character random
string) JWT_ALGORITHM JWT signing algorithm HS256
JWT_EXPIRY_MINUTES Access token 60
validity
p eriod charotartelelink@upi
UPI_VPA Organization’s
UPI Virtual
Payment
Address
ORS_ORIGINS
C llowed frontend origins [Link]
A
THREAD_POOL_WORKERS build
:
./backend
ThreadPoolExecutor ports
:
worker count [
"8000:8000" ]
ENV eployment
D environment
:
environment -
DATABASE_URL=${DATABASE_URL}
flag -
SECRET_KEY=${SECRET_KEY}
restart
:
unless-stopped
A.3Docker Compose Configuration frontend
:
ersion
v :
"3.9" build
:
services
:
./frontend
backend
:
ports
:
["80:80"]
8
depends_on
:
[
backend]
production
restart
:
unless-stopped
networks
:
default
:
name
:
crm-net
A.5Configuration Summary
Table A.2: Deployment Configuration Summary
omponent
C onfiguration
C
Backend Runtime Python 3.10, Uvicorn ASGI server
Frontend Build Vite production build served via
Nginx
Database eon Serverless PostgreSQL (managed)
N
Container OrchestrationDocker Compose (single-host); Kubernetes-ready for future scale-
out
Authentication JWT (HS256), 60-minute access token expiry
Background Task Execution ThreadPoolExecutor, 8 workers
(configurable)