HD app is the magic tool that allows the Happy Dev network to thrive in a decentralized way.
SiB App is the magic tool that allows the Happy Dev network to thrive in a decentralized way.
## Use cases
## Getting Started
Identified and scheduled use cases of the application includes (but are not limited to):
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Listing of projects
- Listing of members
- Search of members by skills
- Invoicing and billing
- Project-scoped chat
- Personal messaging
### Prerequisites
### Chat
To install SiB App, you'll need to have:
The repository of the SIB Chat component can be found here:
- Python3 & Pip
- NodeJS & NPM
- A Prosody Server
- (Optional) A SMTP Server
- https://git.happy-dev.fr/startinblox/sib-chat
### Installing
It is based on XMPP as messaging protocol, Prosody as the server and ConverseJS as the client.
#### At first, you'll need to deploy a `sib-manager` server, then configure it.
### Project
#### `sib-manager` installation or update
The repository of the project listing components is the core and can be found here:
You'll have to change some settings on the `sibserver` files.
If you want to contribute or test the app, please follow those steps.
- Change `oidc_provider` from `packages.py` to `settings.py`:
- Remove `oidc_provider` line in `./sibserver/packages.py`
- Add `oidc_provider` on `INSTALLED_APPS` in `./sibserver/settings.py`
- Add your server name to `ALLOWED_HOSTS`
- In `settings.py`, add your hostname on `ALLOWED_HOSTS`, eg:
```
ALLOWED_HOSTS = ['api.myserver.com', 'localhost']
```
- Around line `75-79` of `settings.py` set your `PROSODY_HTTP_URL`, `JABBER_DEFAULT_HOST` & `BASE_URL`, eg:
```
PROSODY_HTTP_URL = 'https://jabber.happy-dev.fr'
JABBER_DEFAULT_HOST = 'happy-dev.fr'
BASE_URL = 'https://localhost:8000'
```
### Requirements
- If you wish use another database than `sqlite`, you can also configure it on `DATABASES` in `settings.py`
You need to have both NodeJS and NPM installed and working.
- If you want to receive mails from notifications, you need to add these lines & configure them at the end of `settings.py`
```
EMAIL_HOST = "your.smtp.srv"
EMAIL_HOST_USER = "user@email.com"
EMAIL_HOST_PASSWORD = "password"
EMAIL_USE_TLS = True #Or False
```
### Installation process
#### `sibserver` migrate
clone then:
On the first `sibserver` folder:
*`make install`
```
$ ./manage.py migrate
```
Edit the created `./src/config.pug` file to :
- update the `client_id`[you generated on the server](https://git.happy-dev.fr/startinblox/applications/sib-app-data-server/blob/master/README.md#openidconnect-configuration) / OIDC provider
- update the `sdn` / Server Domain Name to match yours
#### Add an RSA Key for `oidc`
## Build
On the first `sibserver` folder:
A first build is mandatory for compiling the static assets.
```
$ ./manage.py creatersakey
```
*`make build`
#### `sib-manager` launching
or
On the first `sibserver` folder
*`make watch`
```
$ sib runserver
```
if you are working on something and want to benefit of the hot reload feature.
You can also launch it directly from `manage.py`. Don't forget to activate the `venv` if so.
## Run server
#### Create a Client ID for Prosody & Client
*`make serve`
- Go to `localhost:8000/admin/`
- Login with previously created account.
- If needed you can create another admin account with `./manage.py createsuperadmin`
- Add a `Clients` on `OpenID Connect Provider` section
"client_id": "000000" # <- Here goes your previously created Client ID
},
```
#### That's all! Now let's run it!
```
# For dev
$ make watch
# Or for prod
$ make build
# Then on another terminal
$ make serve
```
## Deployment
Deployment will need a registered RSA Key on production servers.
### On Alpha
```
$ make syncprod
```
### On Staging
```
$ make sync
```
## Built With
*[Sib-Core](https://git.happy-dev.fr/startinblox/framework/sib-core/) - An awesome new framework!
### Architecture
Some general schema of the existing StartinBlox applications architecture can be found [here](https://docs.google.com/presentation/d/1iCRGaJpFvZjhjIUnpsn6lRTJJ31ES6n94BNkJygzUwM/edit?usp=sharing).