- User can create an account with an email address and password input field
- User receives a success message after creating an account
- After creating an account, email address or username appears in the top right corner
- User can log in to an account with an email address/password or OAuth
- User can log out of an account
- User can deposit money
- Total balance updates according to deposit amount
- User can withdraw money
- Total balance updates according to withdrawal amount
- The total balance amount and any other user input persists through different user sessions
- Logging out of the application does not reset the user data
- A screenshot showing a data representation of user information and account balance is uploaded
-
Install homebrew on macOS
-
Install mongodb with homebrew
brew tap mongodb/brew brew install mongodb-community brew services start mongodb-community ## Use the following command to stop it #brew services stop mongodb-community
-
Install Heroku CLI with homebrew
brew install heroku/brew/heroku
-
Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
-
Install Node.js with NVM
nvm install lts/fermium nvm use lts/fermium
-
Upgrade npm to npm 8
npm install --global npm@8
-
Install Docker Desktop Personal
-
To run locally, execute:
nvm use npm install npm run dev
Then, open http://localhost:3000 with your browser to see the result
-
To run inside docker, execute:
nvm use npm install npm run docker:start
Then, open http://localhost:3000 with your browser to see the result
-
Create a MongoDB Atlas account (See https://www.mongodb.com/developer/products/atlas/use-atlas-on-heroku/)
-
Create a new project
-
Create a shared cluster
-
Create a user, make sure to take note of the password
-
Set the conection from the cloud
-
Add IP 0.0.0.0 to the permitted IPs
-
Copy the connection string for the application
-
Replace the
<password>
placeholder in the connection string and take note of it -
Create your heroku app
heroku login heroku container:login heroku create mit-fullstack-banking-app heroku config:set MONGODB_URI=<URI_FROM_STEP_8> heroku container:push web heroku container:release web heroku open heroku logs --tail heroku logout
mongo myproject --eval 'db.users.find().pretty()'
- https://create-react-app.dev/docs/proxying-api-requests-in-development
- https://stackoverflow.com/a/61927857/1714951
- https://reactjs.org/docs/context.html
- https://stackabuse.com/redirects-in-react-router/
- https://www.youtube.com/watch?v=_HdrLsyAdJg
- https://stackoverflow.com/a/14713363/1714951
- https://www.mongodb.com/docs/manual/tutorial/write-scripts-for-the-mongo-shell/#std-label-mongo-shell-scripting
- https://expressjs.com/en/starter/static-files.html
- https://expressjs.com/en/api.html#res.redirect
- https://devcenter.heroku.com/articles/container-registry-and-runtime
- https://www.mongodb.com/developer/products/atlas/use-atlas-on-heroku/