benfluleck / HelloBooks

HelloBooks is a full stack javascript app that implements a simple digital library for keeping, borrowing managing all kinds of literature.
https://staging-hellobooks.herokuapp.com/
MIT License
19 stars 5 forks source link
books borrowing hellobooks javascript library react-redux

License: MIT Build Status Coverage Status Maintainability Greenkeeper badge

HelloBooks

HelloBooks is an application that helps manage a library and its processes like stocking, tracking and lending of books.This application enables users to be able to find and borrow books. Users are managed by an admin who manages users as well as add, edit, delete books.



Hellobooks-screenshot


Table of Contents

Getting Started

This is a javascript application built with Express framework on the nodejs platform. Authentication of users is done via JSON Web Tokens.

Technology Stack

UI & Templates

  1. HTML & CSS
  2. Materialize CSS Framework
  3. Javascript
  4. JQuery

Server Side

  1. NodeJS
  2. Express
  3. Sequelize

Client Side

  1. React(Redux)

Dependencies

Installation

  1. Install Node JS.

  2. Install Postgres .

  3. Clone the repository here

  4. [cd] into the root of the project directory.

  5. Run npm install on the terminal to install Dependecies

  6. Install sequelize-cli, Create Postgresql database, Navigate to server directory and run migrations:

    npm install -g seqeulize-cli
    cd server
    sequelize db:migrate
  7. Create a .env file in the root directory of the application. Use a different database for your testing and development. Example of the content of a .env file is shown in the .env.sample

  8. Start the application: Different Build Environment

Production

npm run start-prod

Development

npm run start:dev
npm run build:dev

Usage

Limitations

The limitations with this current version of Hello Books includes:

Testing

Sever side tests - Run npm test on the terminal while within the project root directory. Client side tests - Run npm client:test on the terminal while within the project root directory.

Server side testing is achieved through use of chai-http, mocha and chai packages. chai-http is used to make requests to the api and mocha is the testing framework and chai is the exception library. They will both be installed when you run npm install and the tests will run when you run npm test.

Client side testing is achieved through the use of jest package. jest is used to test javascript code in React applications.

Features

HelloBooks consists of the following features:

Authentication

Unauthenticated Users

Authenticated Users

Admin Users

Models

Three models are defined: Users, Books and UserBooks. Book must have a unique title and title on their creation. A User can borrow a book Book. The routes are defined under models/index.

API Documentation

You can view the API Documentation here

Express Routes

Api endpoints were created using express router. The routes are defined under server/routes.

Questions

For more details contact benny.ogidan@andela.com

Support or Contribution

For any suggestions or contributions please do not hesistate to contact me

Contributions to this project are welcomed by all, If you need to contribute to this project, follow the steps below

License

This project is authored by Benny Ogidan (benny.ogidan@andela.com) and is licensed for your use, modification and distribution under the MIT license. MIT © benny-ogidan

FAQ

See the Hello Books wiki

Current state