Book-In-Style is inspired by StyleSeat (https://www.styleseat.com/), an online destination for beauty & wellness where clients can discover new services and providers, book appointments, leave reviews, and more.
Book-In-Style is brought to you by Cecilia Zhao. Thank you for visiting!
How do I run this project?
-
Clone this repo.
git clone git@github.com:cc-y-zhao/Book-In-Style.git
-
Install dependencies from the root directory
pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
pipenv install psycopg2-binary
-
Install dependencies from the
react-app
directorynpm install
-
In the
react-app
directory, create a.env
file using the.env.example
that will be used to define your desiredPORT
(preferably 5000). -
In the root directory, create a
.env
file that will be used to define your environment variables.Use the
.env.example
found in the root directory as a template. Use a secured combination of characters for yourSECRET_KEY
. TheDATABASE_URL
should be in the format ofpostgresql://<database_user>:<password>@localhost/<database_name>
-
Create a user using the same credentials in the
.env
file of the root directory with the ability to create databasespsql -c "CREATE USER <database_username> PASSWORD '<password>' CREATEDB"
-
Create a database using the same credentials in the
.env
file of the root directorypsql -c "CREATE DATABASE <database_name> WITH OWNER <database_username>"
-
Enter
pipenv
to migrate and seed your databasepipenv shell
flask db upgrade
flask seed all
-
Inside of the
pipenv
shell, start the services in the root directoryflask run
-
In a separate terminal, start the services in the
react-app
directorynpm start
How do I log in as a Demo User?
On the log in page, click "Demo Login".Users can book, update, and delete their appointments.
Users can create, update, and delete reviews.
Users can add and delete favorites.
Users can list businesses, add services, as well as edit and delete their listings.
Command | Purpose |
---|---|
pipenv shell |
Open your terminal in the virtual environment and be able to run flask commands without a prefix |
pipenv run |
Run a command from the context of the virtual environment without actually entering into it. You can use this as a prefix for flask commands |
flask db upgrade |
Check in with the database and run any needed migrations |
flask db downgrade |
Check in with the database and revert any needed migrations |
flask seed all |
Just a helpful syntax to run queries against the db to seed data. See the app/seeds folder for reference and more details |