Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoodQuery Backend API

Overview

FoodQuery Backend API is a lightweight and efficient backend service designed for the FoodQuery food discovery app. It provides endpoints for fetching restaurant and dish details, with options for filtering and sorting using raw SQL queries on a SQLite database.

Features

  • Fetch restaurant and dish details.
  • Filter restaurants based on cuisine, vegetarian options, outdoor seating, and luxury.
  • Sort restaurants by rating and dishes by price.

Setup & Deployment

  1. Clone the repository:
    git clone https://github.com/AkshAI-2030/FoodQuery-SQLITE
  2. Install dependencies:
    npm install
  3. Initialize the database:
    node initDB.js
  4. Start the server:
    npm start

API Endpoints

  • Get All Restaurants: GET /restaurants
  • Get Restaurant by ID: GET /restaurants/details/:id
  • Get Restaurants by Cuisine: GET /restaurants/cuisine/:cuisine
  • Get Restaurants by Filters: GET /restaurants/filter?isVeg=true&hasOutdoorSeating=true&isLuxury=false
  • Get Restaurants Sorted by Rating: GET /restaurants/sort-by-rating
  • Get All Dishes: GET /dishes
  • Get Dish by ID: GET /dishes/details/:id
  • Get Dishes by Filter: GET /dishes/filter?isVeg=true
  • Get Dishes Sorted by Price: GET /dishes/sort-by-price

Technologies Used

  • Node.js & Express.js - Backend framework for API development.
  • SQLite & Raw SQL Queries - Lightweight database management.
  • JavaScript (ES6+) - Core language for backend logic.
  • CORS - Cross-origin resource sharing for seamless frontend integration.
  • RESTful API Principles - Ensuring scalability and efficiency.

Live Demo & Resources

Conclusion

This API powers FoodQuery, making it easy to discover restaurants and dishes with advanced filtering and sorting. Ideal for food discovery apps, it ensures a smooth and responsive user experience.

About

Created with StackBlitz ⚡️

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages