/WorkIndia-SDE-API

Zomato Restaurant Booking System

Primary LanguageJavaScript

WorkIndia-SDE-API

Zomato Restaurant Reservation System

Step 1: Clone the repository

git clone  https://github.com/kashish0603/WorkIndia-SDE-API.git

Step 2: Create a config.js file for Database connection

touch config.js

Step 3: Write the below text in config.js file

module.exports = {
    db: {
      host: 'localhost',
      user: 'root',
      password: 'YOUR_PASSWORD',
      database: 'DATABSE_NAME'
    },
    adminApiKey: 'YOUR_API_KEY', 
    JWT_SECRET: 'YOUR_JWT_SECRET_KEY'
  };

Step 4: Run the requirements.txt file

To start the server:

node server/index.js

Tool used for API Testing: Postman

Tech Stack: Node.js, Express.js

Database: MySQL

MySQL has 2 tables:


1. Users table:

CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  username VARCHAR(255) NOT NULL UNIQUE,
  password VARCHAR(255) NOT NULL,
  email VARCHAR(255) NOT NULL UNIQUE
);

Dining_places table:

CREATE TABLE dining_places (
  place_id INT AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  address VARCHAR(255),
  phone_no VARCHAR(15),
  website VARCHAR(255),
  operational_hours JSON,
  booked_slots JSON
);

After adding Password Hashing

![github](https://github.com/user-attachments/assets/323c7a2c-01ec-4c96-a8b7-942603457825)

Thank You for this opportunity, this is my submission for the API Round