Live app is available here: https://restaurant-reservation-xs01.onrender.com/dashboard
A full-stack app built using:
- HTML
- CSS
- JavaScript
- React
- Express
- Knex
- PostgreSQL API
URL | Method | Description |
---|---|---|
/reservations?date=YYYY-MM-DD |
GET | Lists all reservations for the date specified |
/reservations?mobile_number=999-999-9999 |
GET | Lists all reservations for the phone number specified |
/reservations |
POST | Creates a new reservation |
/reservations/:reservationId |
GET | Reads a reservation by reservation_id |
/reservations/:reservationId |
PUT | Updates a reservation by reservation_id |
/reservations/:reservationId/status |
PUT | Updates the status of a reservation by reservation_id |
/tables |
GET | Lists all tables |
/tables |
POST | Creates a new table |
/tables/:table_id/seat |
PUT | Seats a reservation at a table |
/tables/:table_id/seat |
DELETE | Finishes an occupied table |
- Defaults to displaying a list of booked (or seated) reservations for the current date.
- Navigation buttons:
Previous
,Today
, &Next
are available for changing the date displayed by the dashboard. - All tables are also diplayed here.
The menu provides options to:
-
Search for a reservation
-
Create a new reservation
-
Create a new table
-
Return to the dashboard
- Enter the phone number for the reservation.
- Click
find
.
- Fill out the form with the reservation information.
- Click
submit
.
- Fill out the form with the table information.
- Click
submit
.
- Click
seat
on the reservation you'd like to seat. - Select a table from the drop-down menu.
- Click
submit
to seat the reservation at the selected table.
- Click
finish
on the table that has finished. - Click
OK
on the confirmation window that pops-up.
- Click
edit
on the reservation you'd like to edit. - Edit any of the reservation information as needed.
- Click
submit
to save the updated reservation information.
- Click
cancel
on the reservation you'd like to cancel. - Click
OK
on the confirmation window that pops-up.
- Fork and clone this repository.
- Run
cp ./back-end/.env.sample ./back-end/.env
. - Update the
./back-end/.env
file with the connection URL's to your database instance. - Run
cp ./front-end/.env.sample ./front-end/.env
. - Include your backend connection within
./front-end/.env
(defaults tohttp://localhost:5000
). - Run
npm install
to install project dependencies. - Run
npm run start
to start the server.
If you have trouble getting the server to run, reach out for assistance.