Skip to content

sibi361/lite-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lite-library

Book library initially made using Vanilla CSS and JS as part of The Odin Project. Later upgraded to a full stack web app using Express JS and sqlite.

Frontend only demo: https://sibi361.github.io/lite-library/

DEMO : https://lite-library.onrender.com/

^This demo will take around 20 seconds to boot up

Features

  • Add books along with the author name, page count, etc.
  • Books stored on server, available from any device
  • Password-based User Auth
  • Ability to delete, favourite books and mark their read status
  • Mobile friendly UI

Installation

  1. Clone the repository

    git clone https://github.com/sibi361/lite-library.git
    
  2. Generate a bcrypt salt and place it in .env as SALT

    # https://blog.logrocket.com/password-hashing-node-js-bcrypt/
    bcrypt
    .genSalt(saltRounds)
    .then(salt => {
       console.log('Salt: ', salt)
       return bcrypt.hash(password, salt)
    })
    
  3. Generate a JWT secret token using the below snippet and save it as JWT_SECRET in .env

    node -e "console.log(require('crypto').randomBytes(32).toString('hex'));"
    
  4. Run the server at given port, for e.g. 8080

    npm run start -- 8080
    

TODO

  • Fix: liteShare buttons not working after tab change
  • Feature: redirect to liteShare page after login if visitor was logged out

Legal

This project is licensed under the terms of the MIT License.

Books data credit: https://github.com/benoitvallon/100-best-books/blob/master/books.json