hubl/README.md

203 lines
5.1 KiB
Markdown
Raw Normal View History

2019-04-29 12:46:13 +00:00
# SiB App
2018-11-07 18:05:32 +00:00
SiB App is the magic tool that allows the Freelance Network to thrive in a decentralized way.
2018-09-28 19:24:25 +00:00
2019-04-29 12:46:13 +00:00
## Getting Started
2018-11-14 12:50:38 +00:00
2019-12-02 14:22:25 +00:00
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
2018-11-14 12:50:38 +00:00
2019-04-29 12:46:13 +00:00
### Prerequisites
2018-11-14 12:50:38 +00:00
To install SiB App, you'll need:
2018-11-14 12:50:38 +00:00
* A SIB server (djangoldp>=0.6.41) with the appropriate modules
2019-12-02 14:22:25 +00:00
* A Prosody Server (with [appropriate modules](https://git.happy-dev.fr/startinblox/prosody/custom-prosody-modules/)
* A SMTP Server (optional)
* NodeJS on your machine
2018-11-14 12:50:38 +00:00
Before diving in you have to check your SIB server supports the following LDP packages:
2018-11-14 12:50:38 +00:00
2020-03-14 16:17:27 +00:00
* djangoldp_account
* djangoldp_circle
* djangoldp_dashboard
2020-03-14 16:17:27 +00:00
* djangoldp_joboffer
* djangoldp_conversation
* djangoldp_notification
* djangoldp_profile
* djangoldp_project
* djangoldp_skill
2019-12-02 14:22:25 +00:00
* oidc_provider: 'git+https://github.com/jblemee/django-oidc-provider.git@develop'
2018-11-14 12:50:38 +00:00
Those packages are given with the last stable version tested.
2018-11-14 12:50:38 +00:00
Refer to the [documentation to install a SIB server](https://git.startinblox.com/documentation/doc/wikis/devops/install_sib_server) with this configuration.
2019-04-29 12:46:13 +00:00
## Build the application
In order to find your server(s) the client application needs to be assembled with the proper configuration.
2019-04-29 12:46:13 +00:00
Get the code of the SIB app on your machine:
2019-12-02 14:22:25 +00:00
```bash
git clone ...
2019-04-29 12:46:13 +00:00
```
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 Sib App needs to use `config.sample.federated.json` example.
2019-04-29 12:46:13 +00:00
You can quickly update your API URI from the samples:
```
$ sed 's/http:\/\/localhost:8000/https:\/\/api.test2.startinblox.com/' config.sample.json > config.json
```
Then build your new SIB App:
2019-12-02 14:22:25 +00:00
```bash
npm run build
```
2019-04-29 12:46:13 +00:00
The application bundle is in the `dist` folder, ready to be deployed everywhere as a static file.
2019-04-29 12:46:13 +00:00
2019-12-02 14:22:25 +00:00
## Developpers
Serve, watch files & rebuild on change with this command:
```bash
npm run watch
```
## Mandatory modules
By default, a SIB App includes only individual chat modules.
On Server: `djangoldp_account`, `djangoldp_profile`, `djangoldp_notification`, `oidc_provider` packages
On `config.json`:
```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](https://git.happy-dev.fr/startinblox/prosody/custom-prosody-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`:
```json
"clientName": "Sib App",
"clientLogo": "/images/logo.png",
"clientLogoHeight": "32px",
"clientCSS": "/path/to/custom.css",
"authorityName": "djangoldp-server-name"
```
Where:
* `clientName` is the name of your SIB App.
* `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 SIB App
* `authorityName` is a visual name of your OpenID Provider
## Optional modules
### Circles
Circles are a public group chat. To activate them, you need:
On Server: `djangoldp_circle` packages
On `config.json`:
```json
"endpoints": {
"circle": "http://server.url/circles/"
}
```
### Events
Events allow to create and manage instance-level evenement. To activate them, you need:
On Server: `djangoldp_event` and `djangoldp_upload` packages
On `config.json`:
```json
"publicDirectory": true
```
### 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`:
```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 `config.json`:
```json
"endpoints": {
"projects": "http://server.url/projects/",
"customers": "http://server.url/customers/",
"businessproviders": "http://server.url/businessproviders/",
"skills": "http://server.url/skills/"
}
```
### Dashboard
(In development) Dashboard includes card generation from HTML. To activate them, you need:
On `config.json`:
```json
"endpoints": {
"dashboard": "http://server.url/dashboard/"
}
```
### Analytics
SIB App support Google or Matomo as analytics trackers. To use them, add to your `config.json`:
```json
"analytics": [
{
"type": "matomo", //Or "google"
"url": "https://my-personal-.matomo.cloud/",
"id": "1"
}
]
```
## Built With
* [Sib-Core](https://git.happy-dev.fr/startinblox/framework/sib-core/) - An awesome new framework!