Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

Backend Development

A Project Report

Submitted by

Your name

Enrolment number

In partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

in

Computer Engineering

Gyanmanjari Institute Of Technology,

Bhavnagar

Gujarat Technological University,Ahmedabad

[April 2024]
Gyanmanjari Institute Of Technology,

Bhavnagar

CERTIFICATE

This is to certify that the project report submitted along with the project entitled
Backend development has been carried out by your name under my guidance in
partial fulfillment for the degree of Bachelor of Engineering in computer
enginnering , 8th Semester of Gujarat Technological University, Ahmadabad
during the academic year 2024.

Prof.Pruthviraj Parmar Prof.Prashant Viradiya


(Internal Guide) (Head of Department)
Gyanmanjari Institute Of Technology,

Bhavnagar

DECLARATION

We hereby declare that the Internship / Project report submitted along with the
Internship entitled backend development submitted in partial fulfillment for the
degree of Bachelor of Engineering in computer engineering to Gujarat
Technological University, Ahmedabad, is a bonafide record of original project
work carried out by me / us at connected dot solutions under the supervision of
and that no part of this report has been directly copied from any students’
reports or taken from any other source, without providing due reference.

Name of the Student Sign of Student

1.
Project ID:

ACKNOWLEDGEMENT

I wish to express our sincere gratitude to our external guide for continuously guiding me at
the company and answering all my doubts with patience. I would also like to thank you my
Internal guide for helping us through our internship by giving us the necessary suggestions
and advices along with their valuable co-ordination in completing this internship.

I would also like to thank my parents, friends and all the members of the family for their
precious support and encouragement which they had provided in completion of my work.In
addition to that, I would also like to mention the company personals who gave me the
permission to use and experience the valuable resources required to the internship

Thank you.

Gujarat Technological University i GMIT,Bhavnagar


Project ID:

Abstract

Back-end development means working on server-side software, which focuses on everything


you can’t see on a website. Back-end developers ensure the website performs correctly,
focusing on databases, back-end logic, application programming interface (APIs),
architecture, and servers. They use code that helps browsers communicate with databases,
store, understand, and delete data.

Js is used to build interactive and dynamic websites. For JS, we have a framework which is
NodeJS, which is designed with real-time, push-based architectures, the single-threaded
model used for backend API services. NodeJS allows you to run JavaScript on the server.

Gujarat Technological University ii GMIT,Bhavnagar


Project ID:

List of Figures

Fig-1.1 E-R diagram………………………………………………………………………...3

Fig-1.2 Use case diagram…………………………………………………………………...3

Fig-1.3 DFD level one……………………………………………………………………...4

Fig-1.3.1 Admin DFD level two…………………………………………………………….4

Fig-1.3.2 User DFD level two……………………………………………………………....5

Fig-1.4.1 Registration Activity diagram…………………………………………………....5

Fig-1.4.2 User Activity diagram………………………………………………………….....6

Fig-2.1 Set up local Machine………………………………………………………………14

Fig-2.2 Starting Server on Local…………………………………………………………...14

Fig-2.3 REST APIs collections……………………………………………………………..15

Fig-2.4 Database collections………………………………………………………………..15

Fig-2.5 User sign Up……………………………………………………………………….16

Fig-2.6 User data in DB……………………………………………………………………..16

Fig-2.7 Sign in………………………………………………………………………………..17

Fig-2.8 Authentication using JWT Token……………………………………………………17

Fig-2.9 Category Create………………………………………………………………….…..18

Fig-2.9.1 DB of Category……………………………………………………………18

Fig-2.10 Update Category……………………………………………………………………19

Fig-2.11 Add Product………………………………………………………………………...19

Fig-2.11.1 DB of Product………………………………………………………….20

Fig-2.12 Cart APIs…………………………………………………………………….…….20

Fig-2.12.1 Cart DB………………………………………………………………….21

Gujarat Technological University iii GMIT,Bhavnagar


Project ID:

Table of Contents

Acknowledgement……………………………………………………………………….......i

Abstract……………………………………………………………………………………...ii

List of Figures……………………………………………………………………….............iii

Table of Contents…………………………………………………………………………….iv

Chapter 1:Introduction of internship & project………………………………………….1

1.1 Project Summary……………………………………………………………………..1


1.2 Literature…………………………………………………………………..................1
1.3 Project Details …………………………………………………………………….....1
1.4 Technologies used………………………………………………………………….....2

Chapter 2 : System Design…………………………………………………………………..3


2.1 E-R diagram…………………………………………………………………………...3
2.2 Use Case diagram……………………………………………………………………...3
2.3 DFD diagram………………………………………………………………………......4
2.3.1 DFD level one…………………………………………………………………...4
2.3.2 Admin DFD level two…………………………………………………………...4

2.3.3 User DFD level two……………………………………………………………...5

2.4 Activity diagram……………………………………………………………………….5

Chapter 3: Project Management…………………………………………………………….7

3.1 Feasibility Study……………………………………………………………………….7

3.2 Technical Feasibility……………………………………………………………….......7

3.2.1 Technology Stack Evaluation……………………………………………………8

3.2.2 Scalability and Performance………………………………………………….....8

3.2.3 Development Resources……………………………………………………........8

3.2.4 Infrastructure Requirements…………………………………………………......8

3.2.5 Operational Feasibility…………………………………………………………..8

3.2.6 Implementation Feasibility…………………………………………………........9

Gujarat Technological University iv GMIT,Bhavnagar


Project ID:

Chapter 4:Implementation…………………………………………………………………10

4.1 Implementation environment…………………………………………………………10

4.2 Security features……………………………………………………………………...11

Chapter 5: Testing…………………………………………………………………………..12

5.1 Testing Method……………………………………………………………………….12

5.1.1 Unit Testing…………………………………………………………………….12

5.1.2 Integration Testing……………………………………………………………...12

5.1.3 Functional Testing………………………………………………………..…….12

5.1.4 Security Testing………………………………………………………………...12

5.1.5 APIs Testing…………………………………………………………………….13

5.1.6 Database Testing………………………………………………………………..13

5.1.7 Compatibility Testing…………………………………………………………..13

5.2 Testing plans…………………………………………………………………………...13

Chapter 6: Snapshots……………………………………………………………………….14

6.1 REST APIs collections………………………………………………………………...15

6.2 MongoDB collections…………………………………………………………………15

6.3 User Sign Up.……………………………………………………………………….....16

6.4 Sing In………………………………………………………………………………....17

6.5 Authentication Using Token…………………………………………………………...17

6.6 Category Creation……………………………………………………………………..18

6.7 Update Category………………………………………………………………………19

6.8 Product APIs…………………………………………………………………………..19

6.9 Cart APIs………………………………………………………………………………20

Chapter 7 : Conclusion……………………………………………………………………..22

7.1 Summary of Project………………………………………………………………22

7.2 Limitation & Future Enhancement……………………………………………….22

Gujarat Technological University v GMIT,Bhavnagar


Project ID:

Chapter 1:Introduction of internship & project

1.1 Project Summary:

The backend is necessary in eCommerce to manage product catalogues , user accounts,


transactions, order processing, inventory management, and secure payment processing
.Without a backend, there would be no way to store and retrieve product information,
process payments, manage orders, or handle user accounts. In short, an eCommerce
website would not be able to operate without a backend. so, project is divided into three
major parts first was routes second was controllers and third was model where all schema
was define and model was connected with MongoDB(database) and controllers contain
all logic of ecomm backend.

1.2 Literature:
The backend infrastructure of an ecommerce platform serves as the backbone,
orchestrating critical functionalities such as product management, inventory control,
order processing, and payment handling. database management systems including SQL
and NoSQL, and programming languages such as Node.js, Python, and Java commonly
employed in ecommerce backend development. Additionally, the abstract addresses
important aspects such as API design, data security, performance optimization, and
integration with third-party services. Through a synthesis of academic literature,
industry reports, and technical documentation, this abstract aims to provide insights and
guidelines for designing, implementing, and maintaining robust ecommerce backend
solutions capable of meeting the demands of modern ecommerce.

1.3 Project Details :


ecommerce backend project, there are several key components and functionalities to
consider.

1. Features :
• User authentication and authorization: Define the authentication mechanisms
(e.g., JWT, OAuth) and authorization levels for users, administrators, and other
roles.
• Product management: Specify how products will be managed, including CRUD
(Create, Read, Update, Delete) operations, categories.

Gujarat Technological University 1 GMIT,Bhavnagar


Project ID:

2. Future Enhancements :

• Identify potential areas for future enhancements and feature additions based on user
feedback, market trends, and evolving business requirements.
• Consider scalability, performance optimization, security enhancements, and integration
with emerging technologies to stay competitive in the ecommerce landscape

3. Documentation:
• API documentation: Provide comprehensive documentation for the backend APIs,
including endpoints, request/response formats, authentication requirements, and usage
examples.
• Code documentation: Ensure well-commented and organized codebase with clear
documentation to facilitate maintenance and collaboration among team members.

4. Testing:
• Testing strategy: Outline the testing approach, including unit testing, integration
testing, and end-to-end testing, to ensure the reliability and stability of the backend
system.
• Test cases: Define specific test cases for each feature and functionality to verify
correct behavior and handle edge cases effectively.

1.4 Technologies used :

1. Programming language : Javascript (Node.js)


2. Framework : Express.js , Node.js
3. Database : MongoDB
4. APIs : RESTful APIs
5. Authentication and Authoriztion : JWT(JSON web tokens)
6. Version control : Git
7. Testing Framework : Postmen
8. Task runners : npm , yarn

Gujarat Technological University 2 GMIT,Bhavnagar


Project ID:

Chapter 2 : System Design

2.1 E-R diagram :

[Fig-1.1 E-R diagram]

2.2 Use Case diagram :

[Fig-1.2 Use case diagram]

Gujarat Technological University 3 GMIT,Bhavnagar


Project ID:

2.3 DFD diagram :

2.3.1 DFD level one diagram :

[Fig-1.3 DFD level one]

2.3.2 Admin Side DFD level two diagram :

[Fig-1.3.1 Admin DFD level two]

Gujarat Technological University 4 GMIT,Bhavnagar


Project ID:

2.3.3 User Side DFD level two diagram :

[Fig-1.3.2 User DFD level two]

2.4 Activity diagram:

2.4.1 Registration Activity :

[Fig-1.4.1 Registration Activity diagram]

Gujarat Technological University 5 GMIT,Bhavnagar


Project ID:

2.4.2 User Activity diagram :

[Fig-1.4.2 User Activity diagram]

Gujarat Technological University 6 GMIT,Bhavnagar


Project ID:

Chapter 3: Project Management

3.1 Feasibility Study :

• Feasibility studies aimed to objectively uncover the strengths and Weaknesses of an


existing tracking applications, opportunities and threats present in the resources
required to carry through, and ultimately the prospects for success.
• A feasibility study evaluates the project's potential for success; therefore, perceived
objectivity is an important factor in the credibility of the study.

3.2 Technical Feasibility :

• At this level, the concern is whether the proposal is technically feasible.


• The technical feasibility assessment is being focused on gaining an understanding of
the present technical resources, and their applicability to the expected needs of the
proposed system. It is an evaluation process of the hardware and software and how it
meets the need of the proposed system.

Back-end selection
• Multiple user support
• Efficiency in data handling
• Efficient data retrieval and data store procedure.
• Easy to implement with Front-end.
• OS compatible

According to above stated functions we selected JavaScript, MongoDB as our backend


for developing the web-application .According to above stated selections and statements,
this project is Technically

Gujarat Technological University 7 GMIT,Bhavnagar


Project ID:

3.2.1 Technology Stack Evaluation :


• Identify and evaluate the appropriate technology stack for building the eCommerce
backend. This includes programming languages, frameworks, databases, and other
tools.
• Consider factors such as scalability, performance, security, and compatibility with
existing systems.

3.2.2 Scalability and Performance :


• Evaluate the scalability requirements of the backend system to handle varying levels
of traffic and transactions, especially during peak periods.
• Conduct performance testing to ensure that the backend can meet response time and
throughput targets under expected load conditions.

3.2.3 Development Resources :


• Assess the availability of skilled development resources, including software
engineers, database administrators, and system architects.
• Consider whether in-house development, outsourcing, or a combination of both is
feasible based on the organization's capabilities and requirements.

3.2.4 Infrastructure Requirements :


• Assess the infrastructure needed to support the eCommerce backend, including
servers, cloud services, networking, and storage solutions.
• Determine whether the existing infrastructure is sufficient or if additional resources
need to be procured.

3.2.5 Operational Feasibility :

• The Operational Feasibility is the measure of how well a proposed system solves the
problems, and takes advantage of the opportunities identified during scope definition
and how it satisfies the requirements identified in the requirements analysis phase of
system development.

Gujarat Technological University 8 GMIT,Bhavnagar


Project ID:

• Our app will cover almost all features and it will satisfy requirements identified in the
analysis phase. So, we can say that our project is operationally feasible.

3.2.6 Implementation Feasibility :

• There is no any ambiguity in project planning, and our requirements are very well-
defined and stable. So, we can say that our project is feasible to implement.

Gujarat Technological University 9 GMIT,Bhavnagar


Project ID:

Chapter 4:Implementation

4.1 Implementation environment :

(1) Development Environment:


• Development Machines: Provide developers with powerful workstations or laptops
equipped with necessary development tools, such as IDEs (Integrated Development
Environments), code editors, and version control systems.
• Development Tools: Install and configure development tools and frameworks
required for backend development, such as programming languages web frameworks
and database management systems.
• Version Control: Set up a version control system (e.g., Git) to manage source code
changes, collaboration, and version history effectively.

(2) Testing Environment:


• Testing Servers: Provision dedicated testing servers or virtual machines to simulate
the production environment for testing purposes.
• Test Data: Populate the testing environment with sample data representative of the
production dataset to conduct realistic testing scenarios.
• Testing Tools: Implement testing tools and frameworks for unit testing, integration
testing, and end-to-end testing to ensure the quality and reliability of the backend
system

(3) Security Measures:


• Encryption: Implement encryption mechanisms to secure data transmission between
clients and servers and protect sensitive information stored in databases.
• Access Controls: Define role-based access controls (RBAC) and authentication
mechanisms to restrict access to privileged functionalities and sensitive data within
the backend system.

Gujarat Technological University 10 GMIT,Bhavnagar


Project ID:

4.2 Security features :

(1) Authentication and Authorization:


• Implement robust authentication mechanisms, such as multi-factor authentication
(MFA) or OAuth, to verify the identity of users accessing the backend.
• Enforce strong password policies, including minimum length, complexity
requirements, and password expiration.
• Use role-based access control (RBAC) to manage user permissions and restrict access
to sensitive functionalities and data based on user roles and privileges.

(2) Data Encryption:


• Encrypt sensitive data, such as customer personal information, payment details, and
login credentials, both in transit and at rest.
• Use industry-standard encryption protocols, such as SSL/TLS for data transmission
over the internet and AES encryption for data stored in databases or filesystems.

(3) Session Management:


• implement logging mechanisms to record security-related events, including
authentication attempts, access control decisions, and system configuration changes.

Gujarat Technological University 11 GMIT,Bhavnagar


Project ID:

Chapter 5: Testing

In this chapter is aimed to provide a brief account of testing the software.

There are two principal motives of testing the software:

1. To rectify the error in execution

2. To check the viability of software

The testing ensures that the software is according to the required specification standards and
performs the task meant for it. The testing is done by our team members that act as novice
users and test the project with all possible way to find the error as well as check validation.

5.1 TESTING METHODS :

5.1.1 Unit Testing:

• Unit Testing: Test individual components (functions, methods, classes) in isolation


to ensure they work as expected. This is typically done using testing frameworks like
JUnit (for Java), Mocha (for JavaScript).

5.2.2 Integration Testing:

• Integration Testing: Test how individual components work together. For example,
you might test how the payment module interacts with the inventory module.

5.1.3 Functional Testing:

• Functional Testing: Test the functionality of the system as a whole. This involves
testing user flows and scenarios, such as adding items to a cart, placing an order,
and processing payments.

5.1.4 Security Testing :

• Security Testing: Check for vulnerabilities such as SQL injection, cross-site scripting
(XSS), and authentication flaws. Also, ensure sensitive data is handled securely.

Gujarat Technological University 12 GMIT,Bhavnagar


Project ID:

5.1.5 APIs Testing:

• API Testing: If your backend exposes APIs (e.g., RESTful APIs), test them thoroughly
to ensure they return the correct data and handle various inputs properly.

5.1.6 Database Testing:

• Database Testing: Verify that data is being stored, retrieved, and manipulated
correctly in the database. This includes testing data integrity, data consistency, and
data manipulation operations.

5.1.7 Compatibility Testing:

• compatibility Testing: Ensure the backend works correctly across different


browsers, devices, and operating systems.

5.2 TESTING PLAN :

i) Testing Types : Identify the types of testing to be performed, including unit testing,
integration testing, functional testing, performance testing, security testing, etc.

ii) Testing Tools and Frameworks :


• Choose appropriate testing tools and frameworks for each type of testing. For example:
• Unit Testing: JUnit, pytest, NUnit
• Integration Testing: Postman, REST Assured, Supertest
• Functional Testing: Selenium, Cypress, Puppeteer
• Performance Testing: JMeter, Gatling, LoadRunner
• Security Testing: OWASP ZAP, Burp Suite, Nessus

iii) Test Cases:


• Develop detailed test cases for each feature and functionality of the e-commerce
backend.
• Ensure test cases cover positive and negative scenarios, error handling, edge cases,
and corner cases.

Gujarat Technological University 13 GMIT,Bhavnagar


Project ID:

Chapter 6: Snapshots

[Fig-2.1 Set up local Machine]

[Fig-2.2 Starting Server on Local]

Gujarat Technological University 14 GMIT,Bhavnagar


Project ID:

6.1 REST APIs collections :

[Fig-2.3 REST APIs collections]

6.2 MongoDB collections:

[Fig-2.4 Database collections]

Gujarat Technological University 15 GMIT,Bhavnagar


Project ID:

6.3 User SingUp:

[Fig-2.5 User signin]

6.3.1 User Singup details in DB:

[Fig-2.6 User data in DB]

Gujarat Technological University 16 GMIT,Bhavnagar


Project ID:

6.4 SingIn :

[Fig-2.7 Signin]

6.5 Authentication Using Token :

[Fig-2.8 Authentication using JWT Token]

Gujarat Technological University 17 GMIT,Bhavnagar


Project ID:

6.6 Category Creation :

[Fig-2.9 Category Create]

[Fig-2.9.1 DB of Category]

Gujarat Technological University 18 GMIT,Bhavnagar


Project ID:

6.7 Update Category :

[Fig-2.10 Update Category]

6.8 Product APIs :

[Fig-2.11 Add Product]

Gujarat Technological University 19 GMIT,Bhavnagar


Project ID:

[Fig-2.11.1 DB of Product]

6.9 User Cart :

[Fig-2.12 Cart APIs]

Gujarat Technological University 20 GMIT,Bhavnagar


Project ID:

[Fig-2.12.1 Cart DB]

Gujarat Technological University 21 GMIT,Bhavnagar


Project ID:

Chapter 7 : Conclusion

7.1 SUMMARY OF PROJECT WORK :

• The ecommerce backend project aims to develop the foundational infrastructure and
functionality necessary to support an online retail platform. Key components of the
project include database design, user authentication, product management, order
processing, inventory management, and payment integration. The backend system will
facilitate the seamless interaction between the frontend user interface and the underlying
database, ensuring efficient data storage, retrieval, and manipulation. Additionally,
security measures such as encryption and secure authentication protocols will be
implemented to safeguard user information and transactions. Throughout the
development process, scalability, reliability, and performance optimizations will be
prioritized to accommodate future growth and ensure a smooth user experience.

7.2 LIMITATION:

1. Scalability: Designing the system to handle a large number of concurrent users and
transactions can be challenging. If the backend architecture is not properly designed
for scalability, it may struggle to accommodate sudden increases in traffic, leading to
performance issues and downtime.

2. Security: Ensuring the security of user data, payment information, and the overall
system is crucial. However, implementing robust security measures requires careful
planning and expertise. Failure to adequately address security concerns may result in
data breaches, unauthorized access, or other security vulnerabilities.

3. Performance Optimization: Optimizing the performance of the ecommerce backend,


such as reducing latency and improving response times, is essential for delivering a
seamless user experience. However, identifying performance bottlenecks and
implementing optimizations may require significant time and effort.

Gujarat Technological University 22 GMIT,Bhavnagar


Project ID:

7.2.1 FUTURE ENHANCEMENT :

1. Advanced Search and Filtering: Enhance search capabilities to allow users to filter
products based on various attributes such as price range, brand, size, color, etc.
Implement advanced search algorithms for faster and more accurate results.

2. Multi-channel Integration: Expand the backend APIs to support integration with


multiple sales channels, including websites, mobile apps, social media platforms, and
third-party marketplaces. Enable seamless synchronization of product inventory,
orders, and customer data across all channels.

3. Enhanced Security Measures: Strengthen security measures by implementing


additional authentication mechanisms such as multi-factor authentication (MFA),
biometric authentication, and OAuth. Enhance data encryption, access control, and
auditing to protect sensitive information from unauthorized access and data breaches.

4. GraphQL Support: Introduce support for GraphQL APIs alongside RESTful APIs to
provide more flexibility and efficiency in data fetching and manipulation. GraphQL
enables clients to request only the data they need, reducing over-fetching and under-
fetching of data.

Gujarat Technological University 23 GMIT,Bhavnagar


Project ID:

REFERENCES :-

• www.w3schools.com/git/default.asp
• www.w3schools.com/mongodb/
• www.javatpoint.com/postman
• chat.openai.com
• https://developer.mozilla.org/en-US/docs/Web/JavaScript
• https://docs.npmjs.com/
• https://nodejs.org/docs/latest/api/
• https://expressjs.com/en/5x/api.html
• https://www.npmjs.com/package/braintree

Gujarat Technological University 24 GMIT,Bhavnagar

You might also like