Backend Features v2 - cheehongw/functional_expressionism GitHub Wiki

Backend Features

We intended to expose a RESTful API for anyone to fetch information from the database. This way, the backend can still serve a purpose for the NUS community if anyone intends to use a database of NUS food stalls.

View the repository here:

https://github.com/cheehongw/functional_expressionism-API

Currently implemented API Endpoints

Method Endpoint Purpose Details
GET /location Returns a list of locations in NUS
GET /location/<Location_Name> Returns details of a particular location. <Location_Name> is the name of the Location, replace any spaces with underscore.
GET /location/<Location_Name>/<Stall_Name> Returns details of a particular stall at a particular location

Unfinished business

We started the backend quite late into milestone 2, and were unable to complete the set of endpoints that will support our frontend. As such, while we may have coded out parts of the frontend, it is still not ready for deployment.

We have a rough list of endpoints left to expose, as listed below:

Name Purpose
get_stalls Return the list of stalls at a particular location for frontend Stall info feature
get_stall Return the detailed information about a stall for frontend Stall info feature
get_dishes Return the list of dishes at a particular stall for frontend Stall info feature
get_random_dishes Return a set of dishes for the frontend Dish Suggestion feature
post_location Allow users to contribute to the set of locations in the database
post_stall Allow users to contribute to the set of stalls in the database
post_dishes Allow users to contribute to the set of dishes in the database

Problems

Difficulty in performing data entry, as well as the unexpected nature of the data formats out in the wild delayed our plans. For example, in our Dish model, we expected 1 pricing for every dish. However, the reality is that there are multiple pricing for the same dish, such as a student and public price.

⚠️ **GitHub.com Fallback** ⚠️