FrontDeskApp

Repository Setup

git clone git@github.com:jamesesguerra/frontdeskapp.git

Change directory into project folder

cd frontdeskapp/

NOTE: The app runs on React and Flask, so Node/npm and Python need to be installed first.

Project Setup

Client

Install dependencies

cd client && npm i

Server

Change directory into server folder

cd ../server

Make a virtual environment

python -m venv venv

Activate the virtual environment

# windows
\venv\Scripts\activate

# unix
source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Usage

  1. Start the server
# still in /server folder 
python app.py
  1. Open a second terminal and change directory into the frontdeskapp/client folder.

  2. Start the client server

npm start
  1. View the project at http://localhost:3000/
image

API

  1. customers
  • GET /customers - returns all the customers
  • POST /customers - creates a new customer; accepts JSON in request body
  1. boxes
  • GET /boxes - returns boxes of small, medium, and large sizes, including retrieved boxes
  • POST /boxes - registers a new box if there is available space; accepts JSON in request body
  • PUT /boxes - retrieves a box, removing it from stored boxes and adding it to the list of retrieved boxes; accepts JSON in request body

JSON DB

  1. server/customers.json - file which the server writes to and reads from to store and retrieve information about the customers
  2. server/boxes.json - file which the server writes to and reads from to store and retrieve information about boxes