Live Deployment: https://reservation-scheduler-app.herokuapp.com/dashboard
This app allows users/restaurants to create and manage reservations for a restaurant. The user is able to create tables and their capacity and then seat reservations at tables. The reservations can be managed based on cancellations, seating at a table, and finishing the reservations. Finishing a reservation also clears the table.
- HTML
- React
- Node.js
- Express
- Knex
- Bootstrap
Submiting this form will create a new reservation and display it on the dashboard
This page contains a list of reservations their current status depending on a selected date, and a list of all tables and their current status.
Allows users to add new tables to the list of available tables
Allows users to seat a reservation at a selected table, tables that currently have reservations will not be able to be selected
Displays matching reservations based on phone number. Partial phone numbers will work too
| Tables | body |
capacity integer, table_name string |
|---|---|---|
GET/ |
list |
Returns list of tables |
POST/ |
create |
Creates a new table record |
PUT/:table:id/seat |
update |
Changes table entry information |
DELETE/:table:id/seat |
finishReservation |
Removes Reservation from table |
| Reservations | body |
capacity integer, table_name string |
|---|---|---|
GET/ |
list |
Returns list of reservations |
POST/ |
create |
Creates a new Reservation record |
GET/:reservation_id |
read |
Returns reservation information based on ID |
PUT/:reservation_id |
update |
Updates reservation information based on ID |
##Setup
Run npx knex commands from within the back-end folder, which is where the knexfile.js file is located.
- Fork and clone this repository.
- Run
cp ./back-end/.env.sample ./back-end/.env. - Update the
./back-end/.envfile with the connection URL's to your database instance. - Run
cp ./front-end/.env.sample ./front-end/.env. - You should not need to make changes to the
./front-end/.envfile unless you want to connect to a backend at a location other thanhttp://localhost:5001. - Run
npm installto install project dependencies. - Run
npm run start:devto start your server in development mode.
npm testruns all tests.npm run test:backendruns all backend tests.npm run test:frontendruns all frontend tests.npm run test:e2eruns only the end-to-end tests.
If you would like a reminder of which npm scripts are available, run npm run to see a list of available commands.
Note that the logging level for the backend is set to warn when running tests and info otherwise.