Demo URL - http://drinkterest.jaisughand.com
Drinkterest
is an app to browse beers (compiled by BreweryDB) and favorite them.
Here is how you can use the app:
- When you start the app for the first time, you will see Sign In page.
- Since you don't have an account, click on the Sign Up button to create one.
- Enter the credentials and click on Submit.
- Now you can Sign In with those credentials.
- After signing in, you will see the Browse section. Here you can search and check out the beers that are compiled by BreweryDB.
- Click on the Favorite button of one of the beers you like!
- Now go to the Favorites section (on the Navbar) to view the beers you have favorited.
- Finally, you can Sign Out of the app by clicking on your username dropdown (on the Navbar).
- When you log back in next time, your data is persisted.
Node.js - For its efficient light-weight backend and easy integrations with other libraries.
Express - To create a quick and robust API.
Express-Session - Session middleware (Express) used for authentication.
Express-Validator - Input validation and sanitization middleware (Express)
Crypto - Used to hash and store password securely.
NeDB - Embedded persistent database for Node.js (Easy for development but would use a mature DB in production like PostgreSQL or MongoDB).
NeDB-Session-Store - Session store for persistent authentication.
React - For real-time updates to the UI elements with high performance.
Bootstrap 4 - For responsive pages that will look great on any device.
throttle-debounce - To debounce search query in Browse section.
Jest - JavaScript Testing utility for React.
Chai - Assertion library for Node testing.
Sinon - Standalone test spies, stubs and mocks for JavaScript.
Tested on Mac OSX (High Sierra) and Ubuntu 16.04.
Pre-requisites - Latest version of node and npm.
- Clone the repo.
- Open a Terminal window.
- Run
cd Drinkterest/server
- Run
npm install
to install all the packages necessary for the server. - Run
node server.js
- Open a new Terminal window.
- Run
cd Drinkterest/client
- Run
npm install
to install all the packages necessary for the client. - Run
npm start
- This should automatically open up browser and run the app on
http://localhost:3000/
- Open a new Terminal window.
- Run
cd Drinkterest/client
- Run
npm run test