Skip to content

halbert-anderson/final-restaurant-reservation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restaurant Reservation System

The Restaurant Reservation System is designed to streamline the process of booking tables and managing reservations in a restaurant. It allows restaurant staff to easily manage reservations and table assignments. Users can create, edit, and cancel reservations, as well as seat guests at tables. The system provides a clear overview of the reservations for any given day and the status of tables, improving the efficiency and organization of the restaurant.

Technology Used

  • Frontend: React, HTML, CSS
  • Backend: Node.js, Express
  • Database: PostgreSQL
  • Others: Fetch for API calls, Bootstrap for styling

Installation Instructions

  1. Clone the repository:
 git clone https://github.com/halbert-anderson/final-restaurant-reservation
 cd final-restaurant-reservation
  1. Install dependencies:
  npm install
  1. Set up environment variables:
PORT=5001
DATABASE_URL=your-database-url
  1. Run the application:
 npm start
  1. Open your browser
 Go to http://localhost:3000 to view the application. 

Live Application

You can access the live application here.

API Documentation

Base URL

  • Development: http://localhost:5001
  • Production: https://final-restaurant-reservation-system-9mjb.onrender.com

Endpoints

Reservations

  • Get All Reservations

    • URL: /api/reservations
    • Method: GET
    • Description: Retrieves all reservations.
    • Response:
      {
        "data": [
          {
            "reservation_id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "mobile_number": "1234567890",
            "reservation_date": "2024-07-16",
            "reservation_time": "19:00",
            "people": 4,
            "status": "booked"
          },
          ...
        ]
      }
  • Create Reservation

    • URL: /api/reservations
    • Method: POST
    • Description: Creates a new reservation.
    • Request Body:
      {
        "data": {
          "first_name": "John",
          "last_name": "Doe",
          "mobile_number": "1234567890",
          "reservation_date": "2024-07-16",
          "reservation_time": "19:00",
          "people": 4
        }
      }
    • Response:
      {
        "data": {
          "reservation_id": 1,
          "first_name": "John",
          "last_name": "Doe",
          "mobile_number": "1234567890",
          "reservation_date": "2024-07-16",
          "reservation_time": "19:00",
          "people": 4,
          "status": "booked"
        }
      }
  • Update Reservation

    • URL: /api/reservations/:reservation_id
    • Method: PUT
    • Description: Updates an existing reservation.
    • Request Body:
      {
        "data": {
          "first_name": "John",
          "last_name": "Doe",
          "mobile_number": "1234567890",
          "reservation_date": "2024-07-16",
          "reservation_time": "19:00",
          "people": 4,
          "status": "seated"
        }
      }
    • Response:
      {
        "data": {
          "reservation_id": 1,
          "first_name": "John",
          "last_name": "Doe",
          "mobile_number": "1234567890",
          "reservation_date": "2024-07-16",
          "reservation_time": "19:00",
          "people": 4,
          "status": "seated"
        }
      }
  • Update Reservation Status

    • URL: /api/reservations/:reservation_id/status
    • Method: PUT
    • Description: Updates the status of a reservation.
    • Request Body:
      {
        "data": {
          "status": "cancelled"
        }
      }
    • Response:
      {
        "data": {
          "reservation_id": 1,
          "status": "cancelled"
        }
      }

Tables

  • Get All Tables

    • URL: /api/tables
    • Method: GET
    • Description: Retrieves all tables.
    • Response:
      {
        "data": [
          {
            "table_id": 1,
            "table_name": "Table 1",
            "capacity": 4,
            "reservation_id": null
          },
          ...
        ]
      }
  • Create Table

    • URL: /api/tables
    • Method: POST
    • Description: Creates a new table.
    • Request Body:
      {
        "data": {
          "table_name": "Table 1",
          "capacity": 4
        }
      }
    • Response:
      {
        "data": {
          "table_id": 1,
          "table_name": "Table 1",
          "capacity": 4,
          "reservation_id": null
        }
      }
  • Seat Reservation

    • URL: /api/tables/:table_id/seat
    • Method: PUT
    • Description: Seats a reservation at a table.
    • Request Body:
      {
        "data": {
          "reservation_id": 1
        }
      }
    • Response:
      {
        "data": {
          "table_id": 1,
          "reservation_id": 1,
          "status": "seated"
        }
      }
  • Clear Table

    • URL: /api/tables/:table_id/seat
    • Method: DELETE
    • Description: Clears a table, marking it as free.
    • Response:
      {
        "data": {
          "status": "finished"
        }
      }

Screenshots

Dashboard Screenshot Reservation Form Screenshot Tables Management Screenshot Reservations Search Screenshot Reservation Edit Screenshot

About

The Restaurant Reservation System is designed to streamline the process of booking tables and managing reservations in a restaurant. It allows staff to view, create, edit, and manage reservations and table statuses efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors