Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dinner Reservation

Live front-end: https://thefonso-cafe.onrender.com/dashboard
Live back-end: https://dinner-reservation-back-end.onrender.com

Description

A restaurant reservation system that allows restaurant staff to:

  • reservations:
    • create reservations
    • edit reservations
    • cancel reservations
    • seat reservations at a table
    • search reservations by phone number
  • tables:
    • create a new table
    • seat a table with a reservation
    • finish seated reservations

API

API base url: ???

API Path Method(s)
/reservations GET: List all reservations
/reservations POST: Create a new reservation.
/reservations/?date='YYYY-MM-DD' GET: List all reservations by date.
/reservations/?mobile_number='###' GET: List all reservations by mobile_number with a partial match.
/reservations/:reservation_id GET: Read a single reservation by reservation_id.
/reservations/:reservation_id PUT: Update a reservation by reservation_id.
/reservations/:reservation_id/status PUT: Update a reservation's status. Options being "booked", "seated", "cancelled", or "finished".
/tables GET: List all tables.
/tables POST: Create a new table.
/tables/:table_id/seat PUT: Update a table's status to "occupied" via adding reservation_id.
/tables/:table_id/seat DELETE: Update a table's status to "free" via removing reservation_id.




Tech Stack

Front-end

CSS HTML JavaSccript React

Back-end

JavaScript Node.js Express Knex

Screenshots

/dashboard dashboard

/search search

/reservations/new create-reservation




Installation

  1. Fork and clone this repository.
  2. Run cp ./back-end/.env.sample ./back-end/.env.
  3. Update the ./back-end/.env file with the connection URL's to your PostgreSQL database instances.
  4. cd back-end
  5. npx knex migrate:latest <--run all migrations
  6. npx knex migrate:rollback <--roll them all back if needed
  7. npx knex migrate:list <-- see who is pending
  8. npx knex seed:run <-- seed DB
  9. (Note for prod:NODE_ENV=production npx knex seed:run)
  10. Run cp ./front-end/.env.sample ./front-end/.env.
  11. You should not need to make changes to the ./front-end/.env file unless you want to connect to a backend at a location other than http://localhost:5000.
  12. Run npm install to install project dependencies.
  13. Run npm run start:dev to start your server in development mode.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages