Mirror of l'Hubl
Go to file
2020-05-23 14:53:38 +02:00
.gitlab A few changes in the feature request template 2020-04-16 12:50:27 +00:00
cypress Feature/cypressio 2020-05-19 13:13:30 +00:00
docker fix: test suit config.json 2020-05-20 12:41:01 +02:00
src update: conflict resolved 2020-05-23 14:53:38 +02:00
.babelrc fix: ES6 modules dependencies 2019-01-07 16:39:06 +01:00
.gitignore Feature/cypressio 2020-05-19 13:13:30 +00:00
.gitlab-ci.yml cicd: revert config.json from sample 2020-05-20 12:52:21 +02:00
client.sample.css feature: css variables 2020-05-11 18:20:13 +00:00
client.sample.happy-dev.css feature: css variables 2020-05-11 18:20:13 +00:00
config.sample.federated.json Fixes & Hubl branding 2020-05-08 13:27:44 +00:00
config.sample.json Feature/cypressio 2020-05-19 13:13:30 +00:00
cypress.json Feature/cypressio 2020-05-19 13:13:30 +00:00
LICENSE Add LICENSE 2018-11-01 20:29:31 +00:00
package-lock.json Feature/cypressio 2020-05-19 13:13:30 +00:00
package.json feature: private circles 2020-05-19 18:22:00 +02:00
README.md Feature/cypressio 2020-05-19 13:13:30 +00:00
styling.md feature: css variables 2020-05-11 18:20:13 +00:00

Hubl

Hubl is the magic tool that allows the Freelance Network to thrive in a decentralized way.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To install Hubl, you'll need:

  • A Hubl Server (djangoldp>=0.6.42) with the appropriate modules
  • A Prosody Server (with appropriate modules
  • A SMTP Server (optional)
  • NodeJS on your machine

Before diving in you have to check your Hubl Server supports the following LDP packages:

Those packages are given with the last stable version tested.

Refer to the documentation to install a Hubl Server with this configuration.

Build the application

In order to find your server(s) the client application needs to be assembled with the proper configuration.

Get the code of the Hubl on your machine:

git clone ...
cd hubl
npm install

Then create a config.json based on your needs, see Mandatory and Optional Modules on this page. For convienence a config.sample.json exists in the source.

Federated Hubl needs to use config.sample.federated.json example.

You can quickly update your API URI from the samples:

$ sed 's/http:\/\/localhost:8000/https:\/\/api.your-server.startinblox.com/' config.sample.json  > config.json

Then build your new Hubl:

npm run build

The application bundle is in the dist folder, ready to be deployed everywhere as a static file.

Developpers

Serve, watch files & rebuild on change with this command:

npm run watch

Mandatory modules

By default, a Hubl includes only individual chat modules.

On Server: djangoldp_account, djangoldp_profile, djangoldp_notification, djangoldp_skill, djangoldp_upload, oidc_provider packages

On config.json:

{
  "xmpp": "https://jabber.happy-dev.fr/http-bind/",
  "authority": "http://localhost:8000/",
  "endpoints": {
    "users": "http://server.url/users/"
  }
}

Where:

  • xmpp is your Prosody with appropriate modules configured on.
  • authority is the OpenID Provider. Usually, if you use djangoldp-account it's the same as your djangoldp server.
  • endpoints.users is the API endpoints for Users on your djangoldp server.

Optional personalisation

On config.json:

  "clientName": "Hubl",
  "clientFavicon": "/images/favicon.png",
  "clientLogo": "/images/logo.png",
  "clientLogoHeight": "32px",
  "clientCSS": "/path/to/custom.css",
  "authorityName": "djangoldp-server-name"

Where:

  • clientName is the name of your Hubl.
  • clientFavicon is an URL to a distant favicon
  • clientLogo is an URL to a distant logo for your client
  • clientLogoHeight allow a quick fix to manage different height logos
  • clientCSS is an URL to a distant CSS that'll be the last one loaded by the Hubl
  • authorityName is a visual name of your OpenID Provider

Optional modules

Analytics

Hubl support Google or Matomo as analytics trackers. To use them, add to your config.json:

  "analytics": [
    {
      "type": "matomo", //Or "google"
      "url": "https://my-personal.matomo.cloud/",
      "id": "1"
    }
  ]

Circles

Circles are a public group chat. To activate them, you need:

On Server: djangoldp_circle packages

On config.json:

  "endpoints": {
    "circle": "http://server.url/circles/"
  }

Dashboard

Dashboard includes card generation from HTML. To activate them, you need:

On Server: djangoldp_dashboard packages

On config.json:

  "endpoints": {
    "dashboard": "http://server.url/dashboard/"
  }

Events

Events allow to create and manage instance-level evenement. To activate them, you need:

On Server: djangoldp_event, djangoldp_upload packages

On config.json:

  "endpoints": {
      "events": "http://server.url/events/",
      "typeevents": "http://server.url/typeevents/",
    "uploads": "http://server.url/upload/"
  }

Project

(Experimental) Project are a private group chat including Customer and Business Provider management. To activate them, you need:

On Server: djangoldp_project packages

On config.json:

  "endpoints": {
    "projects": "http://server.url/projects/",
    "customers": "http://server.url/customers/",
    "businessproviders": "http://server.url/businessproviders/",
    "skills": "http://server.url/skills/"
  }

Users Directory

(In development) Directory includes a listing of each users of your app and editable individual profile. To activate them, you need:

On Server: djangoldp_skill, djangoldp_upload packages

On config.json:

  "publicDirectory": true,
  "endpoints": {
    "groups": "http://server.url/groups/",
    "skills": "http://server.url/skills/",
    "uploads": "http://server.url/upload/"
  }

Job Offers

(In development) Job Offers includes a job board with conversation. To activate them, you need:

On Server: djangoldp_joboffer, djangoldp_skill, djangoldp_upload, djangoldp_conversation packages

On config.json:

  "endpoints": {
    "joboffers": "http://server.url/joboffers/",
    "skills": "http://server.url/skills/",
    "uploads": "http://server.url/upload/"
  }

Use with docker

Multi services

Run with a local binding on localhost:

docker-compose build
docker-compose up -d client server

Use in CI context:

docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d client server
docker-compose -f docker-compose.yml run --rm e2e

Build and push the server to registry:

docker build -f docker/djangoldp.docker --build-arg serve="http://localhost:8000" -t registry.startinblox.com/applications/hubl/server:0.1 .
docker push registry.startinblox.com/applications/hubl/server:0.1

Note: within a Kubernetes pod all services are bound to localhost.

Built With