Giter VIP home page Giter VIP logo

booklab's Introduction


BookLab

Finding The Right Book On Another Shelf

Introduction

BookLab allows users to quickly scan the books on their bookshelves and provides recommendations based on your collection when scanning other bookshelves.

Quick Start

Getting the source

Download the source code by running the following code in your command prompt:

git clone https://gitlab.ewi.tudelft.nl/TI2806/2017-2018/MS/ms1/ms1.git

or simply grab a copy of the source code as a Zip file.

Deployment Types

The project provides multiple deployment types:

  • Testing
    This deployment type is suitable for testing and development environments and uses an in-memory database to store the data. This deployment uses the latest, cutting-edge technology for book detection and recommendation.
  • Production
    This deployment type is suitable for a production environment and uses a Postgres as backing database. This deployment uses the latest, cutting-edge technology for book detection and recommendation.
  • OSS
    This deployment type is similar to the testing deployment type, but does not rely on external (Google) services for book detection and text extraction. This type should be preferred if using the (paid) services from Google forms a problem.

Deploy (with Docker)

Make sure you have done the following:

  • Install and start Docker
    Docker should be running before you are able to build the images. See Docker for more information on installing it. On Windows, make sure you have exposed the daemon without TLS (you can change this in Settings).
  • Install docker-compose
    Make sure that docker-compose is installed on your system. See this page on how to install the program.
  • Add Google Books API key to environment Add the API key for Google Books to your environmental variables under the name GOOGLE_BOOKS_API_KEY. See this page on how to acquire an API key.
  • Copy Google Cloud credentials to configuration folder
    The key file for your Google Cloud service account should be put in the config directory right in the root of the project as keys.json. See this page on how to acquire a service account for Google Cloud and generate a key file. Make sure you have enabled the Google Vision API.

After that, run the following command to build the Docker images for the project:

./gradlew dockerBuildImage

Finally, you can start the images using docker-compose. Make sure that you have set the TAG environmental variable to the version you want to deploy (e.g 1.0).

docker-compose up

The website will now be available at http://localhost.

Deploy (without Docker)

Make sure the following variables are defined in your environment:

  • GOOGLE_BOOKS_API_KEY
    An API key for Google Books which allows the backend server to query its catalogue. See this page on how to acquire an API key.
  • GOOGLE_APPLICATION_CREDENTIALS The path to your Google Cloud service account keys. See this page on how to acquire a service account for Google Cloud and generate a key file. Make sure you have enabled the Google Vision API.

After that, run the following command to start the backend (testing deployment):

./gradlew :booklab-deployment-testing:run

To run the frontend run the following code in your command prompt within the booklab-frontend-web folder. Make sure you have installed the dependencies of the project using npm install.

npm run ng serve -- --open

This will automatically open the frontend on http://localhost:4200.

Development

Before starting development, make sure you have the correct environmental variables defined. See the deployment steps on which variables have to be defined.

Backend

In order to run the tests and the linter, enter the following code in your command prompt:

./gradlew check

This command will show all the tests that fail and possible formatting errors.

Frontend (Angular)

In order to run the tests for the Angular frontend, enter the following code in your command prompt in the booklab-frontend directory:

npm run test

Additionally, if you want to check the source code for formatting errors, run:

npm run lint

Finally, if you want to run the end-to-end tests, run:

npm run e2e

Building without mobile applications

If you do not have the Android SDK or iOS SDK installed and you are not interested in building the mobile applications, either:

  • Set the environmental variable to ignore the projects:
    ORG_GRADLE_PROJECT_exclude=booklab-frontend-ios,booklab-frontend-android
  • Set the exclude property in your gradle.properties:
    exclude=booklab-frontend-ios,booklab-frontend-android

Contributing

In addition to this document, the repository contains a README for each of the modules that builds this project. Read below to learn how you can take part in improving BookLab.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to BookLab.

License

The code is released under the Apache version 2.0 license. See the LICENSE.txt file.

booklab's People

Contributors

fabianishere avatar marijnroelvink avatar asylunatic avatar sgmeligmeyling avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.