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.
- Fetch restaurant and dish details.
- Filter restaurants based on cuisine, vegetarian options, outdoor seating, and luxury.
- Sort restaurants by rating and dishes by price.
- Clone the repository:
git clone https://github.com/AkshAI-2030/FoodQuery-SQLITE
- Install dependencies:
npm install
- Initialize the database:
node initDB.js
- Start the server:
npm start
- 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
- 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.
- StackBlitz URL: Click Here
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.