The Juice Box is an alternative way of searching for drinks.
To run this application locally for development, you'll need to:
git clonethis repocdinto the local repocdinto thebackendfolder andnpm install- Create your own
.envfile in thebackendbased on the.env.examplethere - Create a user that matches the only you identified in your
.envfile in PostgreSQL - Run
npx dotenv sequelize db:createto create the database- If the
sequelizemodule is not found, try runningnpx dotenv sequelize-cli db:createand replacesequelizewithsequelize-clifor the rest of these commands
- If the
- Run
npx dotenv sequelize db:migrateto run the migrations - Run
npx dotenv sequelize db:seed:allto seed the database - Open another terminal and
cdinto thefrontenddirectory andnpm installthere - Run
npm startin yourbackendand then anothernpm startin 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.
