The Juice Box is an alternative way of searching for drinks.
To run this application locally for development, you'll need to:
git clone
this repocd
into the local repocd
into thebackend
folder andnpm install
- Create your own
.env
file in thebackend
based on the.env.example
there - Create a user that matches the only you identified in your
.env
file in PostgreSQL - Run
npx dotenv sequelize db:create
to create the database- If the
sequelize
module is not found, try runningnpx dotenv sequelize-cli db:create
and replacesequelize
withsequelize-cli
for the rest of these commands
- If the
- Run
npx dotenv sequelize db:migrate
to run the migrations - Run
npx dotenv sequelize db:seed:all
to seed the database - Open another terminal and
cd
into thefrontend
directory andnpm install
there - Run
npm start
in yourbackend
and then anothernpm start
in yourfrontend
. - The React server will open up a browser window with the correct address, and you can begin your work from there.
- If you are planning on developing, please make a branch for your changes instead of writing directly to master.
- PostgreSQL
- Express.js
- Sequelize
- JavaScript
- TailwindCSS
- Bcryptjs
- Express-session
- Express-validator
- Node.js
- AWS S3
- Heroku
- React
- Redux
Here's a link to the live app!
Here's a link to the Documentation!
Users can:
- View Drinks
- Create Drinks
- Edit their Drinks
- Delete their Drinks
- View Reviews of Drinks
- Create Reviews of Drinks
- Edit their Reviews of Drinks
- Delete their Reviews of Drinks
Towards the beginning of the project, I wanted to implement a way to have the login and register modals be connected and allow the user to access either one at any point, even from the other modal. I ended up creating a React Context that housed the state variables and their corresponding updater functions to give access to the two modals from an outside component which would then control which modal, if any, were shown.
Another challenge was getting the page to work after a hard reload of the page where the Redux store would be reset to the initial state. I ended up working around this by having the main App component load the necessary items from the backend and database before the rendering of the pages that would need those resources from the Redux store.