Giter VIP home page Giter VIP logo

hat2.0's Introduction

Hub of All things

Build Status Coverage Status

HAT 2.0

This repository contains an implementation of the Hub-of-All-Things project Personal Data Store.

Releases

The current project version is a pre-release HAT 2.0.

About the project

Hub-of-All-Things is a platform for a Multi-Sided Market powered by the Internet of Things.

A Personal Data Management System (“the HAT”) is a personal single tenant (“the individual self”) technology system that is fully individual self-service, to enable an individual to define a full set of “meta-data” defining as a specific set of personal data, personal preferences, personal behaviour events. The HAT allows individuals to share the right information (quality and quantity), with the right people, in the right situations for the right purposes and gain the benefits.

PhD Comics explains the HAT

Technology stack

This HAT PDS implementation is written in Scala (2.11.6) uses the following technology stack:

  • PostgreSQL relational database (version 9.4)
  • Spray REST/HTTP toolkit (version 1.3.3)
  • Akka (version 2.3.9)
  • Slick as the database access layer (version 2.1)

Running the project

HAT Setup

If you use docker, the official HAT can be configured with a number of environment variables and instantiated as two docker containers: one for the database and one for the core HAT:

name=myhat

docker run\
  -e "DATABASE=$name"\
  -e "DBUSER=$name"\
  -e "DBPASS=$name"\
  -e "POSTGRES_PASSWORD=$name"\
  -e "POSTGRES_USER=$name"\
  -e "POSTGRES_DB=$name"\
  -e "[email protected]"\
  -e "HAT_OWNER_NAME=$name"\
  -e "HAT_OWNER_PASSWORD=$name"\
  -d --name hat-postgres-$name hubofallthings/hat-postgres

docker run\
  -e "DATABASE=$name"\
  -e "DBUSER=$name"\
  -e "DBPASS=$name"\
  -e "POSTGRES_PASSWORD=$name"\
  -e "POSTGRES_USER=$name"\
  -e "POSTGRES_DB=$name"\
  -e "[email protected]"\
  -e "HAT_OWNER_NAME=$name"\
  -e "HAT_OWNER_PASSWORD=$name"\
  -d --name hat-$name --link hat-postgres-$name -p $port:8080 hubofallthings/hat

The following variables are available:

  • HAT_HOME - path [default: current (".")]
  • DATABASE - name of the database [default: hat20test]
  • DBUSER - database username [default: hat20test]
  • DBPASS - database user password [default: pa55w0rd]
  • HAT_OWNER - HAT owner identity (DNS name/username) [default: [email protected]]
  • HAT_OWNER_ID - HAT owner GUID
  • HAT_OWNER_NAME - HAT owner name [default: Bob]
  • HAT_OWNER_PASSWORD - HAT owner login password [default: pa55w0rd]
  • HAT_PLATFORM - HAT platform identity [default: hatdex.org]
  • HAT_PLATFORM_ID - HAT platform GUID
  • HAT_PLATFORM_NAME - HAT platform name [default: hatdex]
  • HAT_PLATFORM_PASSWORD_HASH - BCrypt-hashed HAT platform password for platform-management operations (application account creation only)

If you do not wish to use Docker, you can execute the script at deployment/deploy.sh to run the HAT locally, using the environment variables for configuration

Run the project!

Execute the following command:

./target/universal/stage/bin/the-hat

You're all set!

Now you will be able to access 127.0.0.1:8080 or localhost:8080 in your browser, and see the message "Hello HAT 2.0!".

You can customise host and port settings by passing the right configuration parameters, for example:

./target/universal/stage/bin/the-hat -DapplicationHost=0.0.0.0 -DapplicationPort=10080

Testing

Functionality is tested via the provided tests. To run this code, setup sbt and run

sbt test

The testsuite uses the Specs2 framework.

WARNING: the tests completely clean the contents of the database you are connected to, multiple times. DO NOT RUN on production database.

API

API documentation can be found at http://hub-of-all-things.github.io/doc/

Additional information

License

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

hat2.0's People

Contributors

andriusa avatar mrmrtalbot avatar 4knahs avatar r-gl avatar gscardine avatar coolseraph 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.