HelloBooks is an online book library and management application. Hello Books is aimed at handling the individual processes that take place in the library, from the borrowing of books to the returning of books. This in turn handles inventory management of the book stock in the library effectively. The application is hosted at http://hellobooks-kelechi.herokuapp.com/signin
The Application Programming Interface(API) and fully hosted application implements the following features for diferent users correspondingly.
- View the landing page
- View the about page
- View all available books in the application
- Register in the application
- Sign into the application
- View all available books in the application
- Borrow a book
- Return a borrowed book
- View user profile
- Log out of the application
- View all the books in the application
- View details of a book
- View user profile
- Delete a book
- View application settings (user types, account types and book categories)
- Add book category
- Add a book
- Node js – A JavaScript runtime built on Chrome's V8 JavaScript engine
- Express Js – Fast, minimalistic web framework for Node.js
- Sequelize – A promise-based ORM for Node.js v4 and up. It supports the dialects PostgreSQL, MySQL, SQLite and MSSQL.
- Postgresql – An open source database
The application server-side API documentation can be found in https://hellobooks2.docs.apiary.io
These instructions will get you a copy of the HelloBook application up and running on your local machine for development and testing purposes. See installation for notes on how to deploy the project on a live system.
The following applications are required to have HelloBooks up and running on your system.
Node 5+ – (Version 5 and above)
Editor – Sublime Text, Visual Studio Code or others
Postgres database manager – PgAdmin, Elephant SQL
Take the following steps to get a development environment of HelloBooks application running on you machine or server
Clone HelloBooks application
On the root folder of the cloned application, add a .env file with required credentials following the .sample-env file pattern. This should contain the following
DB_NAME=
DB_USERNAME=
DB_PASSWORD=
DB_URL=
SECRET=
BORROW_VALIDITY_IN_DAYS=
SILVER_ACCOUNT_USE_COUNT=
GOLD_ACCOUNT_USE_COUNT=
PLATINIUM_ACCOUNT_USE_COUNT=
ADMIN_EMAIL_ACCOUNT=
ADMIN_EMAIL_PASSWORD=
ADMINTOKEN=
USERTOKEN=
ADMIN_USERNAME=
ADMIN_PASSWORD=
CLIENT_USERNAME=
CLIENT_PASSWORD=
NODE_ENV=
PORT=
GOOGLE_ID=
Navigate to the root folder of the application On command line, run the following commands
npm install
npm run start
Test the individual routes using postman End with an example of getting some data out of the system or using it for a little demo
In order to run tests cases for the routes, execute the following command
- Server side test
npm run test
- Client side test
npm run test:client
- End to end test
npm run e2e-server
npm run e2e-test
In order to contribute to the project, kindly do the following
- Fork the repository
- Work on the feature you desire
- Ensure that you follow the convention as outlined in the wiki
- Raise a pull request to the repository
We welcome and deeply appreciate your contributions.
- Kelechi Iheanyichukwu - (https://github.com/paradisekelechi)