0% found this document useful (0 votes)
2K views4 pages

Problem Statement 2 - Food-App

The document outlines the problem statement, scope of work, and backend endpoints needed to build an online food ordering and delivery application. The problem is that people prefer ordering food for delivery at home during the pandemic. The scope of work is to build backend endpoints for user registration, login, and displaying food items. The backend endpoints specified are for user registration and authentication, retrieving and updating user profiles, and creating, retrieving, and updating food items.

Uploaded by

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

Problem Statement 2 - Food-App

The document outlines the problem statement, scope of work, and backend endpoints needed to build an online food ordering and delivery application. The problem is that people prefer ordering food for delivery at home during the pandemic. The scope of work is to build backend endpoints for user registration, login, and displaying food items. The backend endpoints specified are for user registration and authentication, retrieving and updating user profiles, and creating, retrieving, and updating food items.

Uploaded by

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

Problem Statement

It is known fact that in today’s work-from-home world, people prefer ordering food that
can be delivered at the comfort of their home. So most of the times people end up
ordering food from restaurants that have delivery services. The objective of this problem
statement is to come up with a solution for people to order food online and get prompt
delivery.

You need to solve the given problem by developing a web application, that should
facilitate users to order food online from different restaurants using the web-app to cater
their needs.

Scope of work

You have been asked to build the backend system for the following:
• Registration
• Login and
• Display the list of Food items

Backend :
Below are the end points to be built
Method End point Description + Payload
POST /api/register To register the user with basic
details like
Input:
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno: Number,
street: String,
city: String,
state: String,
zip: number
}
}

Return code : 201


Return:
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno: Number,
street: String,
city: String,
state: String,
zip: number
}
}

POST /api/authenticate To validate the user is registered in


the system

Input:
{
username: String,
password: String
}
Return:
{
message: User logged in successful
}
Return Code: 200
When user details are wrong Return
Code : 403 (Forbidden)
GET /api/users To get all the users who are
registered to the system, the end
point should return an array,
[
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno: Number,
street: String,
city: String,
state: String,
zip: number
}
},
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno: Number,
street: String,
city: String,
state: String,
zip: number
}
}
]
Return code: 200
GET /api/users/:userID To return user by specifying id
When valid
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno:Number,
street:String,
city:String,
state:String,
zip:number
}
}
Return Code: 200
When Id not found:
{
Message:”Sorry user With <ID> not
found”
}
PUT /api/users Should update the user specified in
the payload which shall match the
ID and updated the existing user
with the new details.

When valid
{
id: Number,
username: String,
email: String,
password: String
address: {
houseno:Number,
street:String,
city:String,
state:String,
zip:number
}
}
Return Code: 200
When Id not found:
{
Message:”Sorry user With <ID> not
found”
}
DELETE /api/users/:userID Should delete the user which is
specified in the :userID
When Valid :
{
Message:”User Deleted
Successfully”
}
Return Code: 200
When Id not found:
{
Message:”Sorry user With <ID> not
found”
}
POST /api/food To add a new food to the system.
{
foodId:number,
foodName:String,
foodCost:Number,
foodType: Indian/Chinese/Mexican
}
Return Code : 201, and the id should
be generated by the system
Return Payload
{
Id:Number
foodId:number,
foodName:String,
foodCost:Number,
foodType: Indian/Chinese/Mexican
}

GET /api/food/:foodID To return a food item specified with


:foodID
When Valid
{
Id:Number
foodId:number,
foodName:String,
foodCost:Number,
foodType: Indian/Chinese/Mexican
}

When :foodID not found


{
Message: “Sorry Food Not Found”
}

You might also like