/huit

Primary LanguageJavaScriptMIT LicenseMIT

huit

Build Status

BookApp

http://thebookapp.maratmonnie.com/ https://thebookapp.herokuapp.com/

Todo and possible improvements

  • Google Books API exploitation
    • Volumes
      • Pagination
      • Sorting
      • Print Type
      • Filtering
      • Language
    • Bookshelves
    • Bookshelves "My Librairy"
  • Data display (Frontend)
    • Display the result with a thumbnail, title, publisher and date information
    • Display the result with extra information
    • Highlight the result with the term of the query searched
    • Enhanced UI
      • Local storage saved state
      • Better design
      • More responsive
  • Backend implementation
    • Implemented a very simple Python / Flask app
    • Containerized the app
    • Implement a first check health API
    • Features:
      • Account, profile, etc..
      • My library functionality, etc..
      • Data processing, ML, suggestion features etc..
  • Tests
    • Unit testing, almost all static rendering is covered
    • Unit testing for logic, some done but still work to do..
    • Continue Unit Testing & Integration testing
  • Refactor
    • 1st iteration of refactoring app -> better structure for testing
    • 2nd iteration:
      • General housekeeping and code DRYing
      • Removed the local storage save of actual research -> not useful at all.. (hydrateStateWithLocalStorage and saveStateToLocalStorage functions)
      • SRP applied as most as possible
        • Reduce large functions and large components
      • Improved UI
      • Features:
        • Updated the API health check feature
        • Changed the language selection
        • Improve the form part of the code with Formik

Getting started

cd bookapp/
npm i
npm start

Testing

cd bookapp/
npm test --verbose

Deployment

  1. Deploy react app

NB: PRE-REQUISITE: heroku account, heroku CLI installed.

cd bookapp/
heroku login
git init
heroku create -b https://github.com/mars/create-react-app-buildpack.git
git add .
git commit -m "react-create-app on Heroku"
git push heroku master
heroku open
heroku apps:rename newname --app oldname
  1. Deploy whole app with backend to local using docker.

NB: PRE-REQUISITE: docker installed, from root directory.

make deploy
  1. Deploy whole app with backend to heorku.

NB: PRE-REQUISITE: docker installed, heroku account, heroku CLI installed, from root directory.

make setup
make heroku

Makefile commands

  1. Deploy a containerized app in the localhost.
make deploy
  1. Clean environment.
make clean
  1. Setup heroku. (to do it one time)
make setup
  1. Deploy the containerized app the production environment to heroku.
make heroku