Welcome! Thanks for using our app. This app is designed to help users manage reservations for their customers.
Some features include:
- View all reservations on the Dashboard. The reservations are listed by date, which the user is able to change.
- Create and edit reservations.
- Create tables for seating your reservations.
- Assign a table to a reservation upon arrival at the restaurant.
- Free a table when the reservation has finished dining and leaves.
- Search for a reservation by mobile number.
- Cancel a reservation.
The frontend was built using HTML5, CSS3, Javascript, Bootstrap, and React. For the backend, we used Nodejs, Express, and Knex.
- Fork and clone this repository.
- Run
npm install
to install project dependencies. - Create a
.env
file in thebackend
directory. - Modify
.env
with the following:
DATABASEURL=_productionURL
DATABASEURL_DEVELOPMENT=_developmentURL
DATABASEURL_TEST=_testURL
DATABASEURL_PREVIEW=_previewURL
LOG_LEVEL=info
- Replace "productionURL" with the URL to your production database.
- Repeat step 5 for the remaining fields, but using the corresponding database URL.
- Create a
.env
file in thefrontend
directory. - Modify
.env
with the following:
REACT_APP_API_BASE_URL=http://localhost:5000
- From inside the backend directory, run
npx knex migrate:latest
. - Run
npx knex seed:run
. - Finally, go back to the root of the main directory and run
npm run start:dev
to run the application locally.
Endpoint | Method | Description |
---|---|---|
/reservations |
GET | Gets all of the reservations. If 'date' query parameter exists, then gets reservations for that date. |
/reservations |
POST | Creates a new reservation. |
/reservations/:reservation_id |
GET | Gets the reservation corresponding to 'reservation_id'. |
/reservations/:reservation_id |
PUT | Updates the reservation corresponding to 'reservation_id'. |
/reservations/:reservation_id/status |
PUT | Updates the reservation status. |
/tables |
GET | Gets all of the tables. |
/tables |
POST | Creates a table. |
/tables/:tableId/seat |
PUT | Assigns a reservation to a table. |
/tables/:tableId/seat |
DELETE | Frees a table for future reservations. |