My Bar is an application developed with React, Express, and Firebase.
It allows you to easily manage your bar.
The application was developed to practice with React and Firebase development workflow.
The following list of tools that must be installed locally to run app:
- NodeJS
- Yarn
Create a new folder and run in terminal git clone git@github.com:maschin/my-bar-react.git .
- Create test and development database in firebase
- Enable G+ authentication: Authentication/SIGN-IN METHODS/Google/Enable
- Setup both test and development database rules: Database/RULES
- Dev and Live firebase rules are in
firebaseRules.json
- Open a terminal and run
yarn install
- In the root directory, create a file
.env.developmet
and.env.test
as follows, replacing values with your own settings to firebase:
FIREBASE_API_KEY=YOUR_API_KEY
FIREBASE_AUTH_DOMAIN=YOUR_AUTH_DOMAI
FIREBASE_DATABASE_URL=YOUR_DATABASE_URL
FIREBASE_PROJECT_ID=YOUR_PROJECT_ID
FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET
FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER
- Run in the terminal for development
yarn run dev-server
- React Dev Server runs on localhost:8080
- Run in the terminal for production
yarn run build:prod
-->yarn run server
- Your Prod Server runs on localhost:8080
- Open a terminal and run
yarn test --watch
- Login to Heroku https://www.heroku.com/
- Install Heroku CLI https://devcenter.heroku.com/articles/heroku-cli
- Login to Heroku
heroku login
- Create app
heroku create my-bar-react
- Setup Heroku variables for firebase
heroku config:set FIREBASE_API_KEY=YOUR_API_KEY
heroku config:set FIREBASE_AUTH_DOMAIN=YOUR_AUTH_DOMAI
heroku config:set FIREBASE_DATABASE_URL=YOUR_DATABASE_URL
heroku config:set FIREBASE_PROJECT_ID=YOUR_PROJECT_ID
heroku config:set FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET
heroku config:set FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER
- Upload & build to Heroku
git push heroku master
- Run app
heroku open
- Add a new drink (resolved)
- Edit existing drinks (resolved)
- Delete existing drinks (resolved)
- View list of all drink (resolved)
- Detailed view (resolved)
- Highlight opened and emptied drinks (resolved)
- Search by title (resolved)
- Search by categories (resolved)
- Search by state
- Liters summary (resolved)
- Cost summary (resolved)
- Sort by best before
- Confirmation on delete
- Confirmation on open
- Confirmation on emptied