diff --git a/documentation/pages/framework/_meta.json b/documentation/pages/framework/_meta.json index 9187bac1..abe68408 100644 --- a/documentation/pages/framework/_meta.json +++ b/documentation/pages/framework/_meta.json @@ -1,4 +1,3 @@ { - "configuration": "Configuration", - "permissions": "Permissions" + "configuration": "Configuration" } diff --git a/documentation/pages/framework/configuration.md b/documentation/pages/framework/configuration.md index 4befaba3..78710679 100644 --- a/documentation/pages/framework/configuration.md +++ b/documentation/pages/framework/configuration.md @@ -1,6 +1,6 @@ # Configuration -Configuration for the project lives in a `./config` directory. We suggest keeping that directory in a separate repository and create symbolic link it for local development. +Configuration for the project lives in a `./config` directory. We suggest keeping that directory in a separate repository and create symbolic link it for local development. You can find a sample folder called `config-demo` [here](https://github.com/paritytech/polkadot-hub-app/tree/master/config-demo) ``` ./config @@ -22,28 +22,6 @@ Configuration for the project lives in a `./config` directory. We suggest keepin └── notification.yaml ``` -## Integrations - -### Email-smtp - -Add `.env` variables. - -``` - SMTP_ENDPOINT="" - - SMTP_PORT= - - SMTP_USERNAME="" - - SMTP_PASSWORD="" - - SMTP_FROM_NAME="" - - SMTP_FROM_EMAIL="" -``` - -### Matrix - ### Mapbox Support for maps. @@ -53,13 +31,3 @@ We use `mapbox` in a few places: - All users map at `/map`. - Map of the hub location on the about page `/about/` - User location on their profile if they specify that they want to share. `/profile/` - -## Text templates - -Depending on the configuration of your project you might have certain integrations turned on, e.g. email. -The app sends default texts when emails are sent. You can ovewrite these texts with your customs ones. - -1. Create a folder with the module name in the templates folder , e.g. `./config/templates/guest-invites` -2. Create a YAML file for the text message. We have 3 types of messages: notification (matrix), email, text (error messages). E.g. `email.yml` -3. Look up the email message key [here](https://github.com/paritytech/polkadot-hub-app/blob/master/src/integrations/email-smtp/README.md#guest-invites). -4. Add your custom message to yml file. [See example here](https://github.com/paritytech/polkadot-hub-app/blob/master/src/modules/guest-invites/templates/email.yaml) diff --git a/documentation/pages/framework/configuration/_meta.json b/documentation/pages/framework/configuration/_meta.json new file mode 100644 index 00000000..c6a43bc9 --- /dev/null +++ b/documentation/pages/framework/configuration/_meta.json @@ -0,0 +1,5 @@ +{ + "application": "Application.json", + "company": "Company.json", + "textTemplates": "Text templates" +} diff --git a/documentation/pages/framework/configuration/application.md b/documentation/pages/framework/configuration/application.md new file mode 100644 index 00000000..e69de29b diff --git a/documentation/pages/framework/configuration/company.md b/documentation/pages/framework/configuration/company.md new file mode 100644 index 00000000..14f3d40b --- /dev/null +++ b/documentation/pages/framework/configuration/company.md @@ -0,0 +1,121 @@ +# Company.json + +``` + { + "id": "berlin", + "name": "BerlinHub", + "city": "Berlin", + "country": "GE", + "icon": "🇩🇪", + "address": "Main street 10", + "coordinates": [0.34324324, 0.234234234], + "directions": "Entrance through the courtyard", + "workingHours": ["09:00", "18:00"], + "workingDays": "Mon - Fri", + "timezone": "Europe/Berlin", + "allowGuestInvitation": true, + "allowDeskReservation": true, + "allowRoomReservation": true, + "areas": [{ + "id": "first_floor", + "name": "First Floor", + "available": true, + "bookable": true, + "map": "/path/to/map.png", + "meetingRooms": [ + { + "id": "hibiscus", + "name": "Hibiscus", + "description": "1st floor", + "capacity": 5, + "equipment": "whiteboard", + "photo":"/path/to/photo.png", + "workingHours": ["08:00", "19:00"], + "autoConfirm": true, + "position": { + "x":0, + "y":0 + } + } + ], + "desks": [ + { + "id": "a", + "name": "A", + "type": "flexible", + "position": { + "x":0, + "y":0 + } + } + ] + }] + } + +``` + +## Configurable fields + +`name` - name of your company + +`offices` - Array of your offices/hub configurations + +| key | value | required | var type | +| ----------------------- | ------------------------------------------------------------------------------------- | ----------------------- | --------------------- | +| id | unique identifier, once created please do not change | required | string | +| name | hub name | required | string | +| city | | | string | +| country | two letter code, e.g. GE | | string | +| icon | e.g. 🇩🇪 | | string | +| timezone | e.g. Europe/London | required | string | +| address | used in modules: About, Guest Invites | required for the module | string | +| coordinates | used in modules: About | required for the module | [float, float] | +| directions | used in modules: About | required for the module | string | +| workingHours | used in modules: About, e.g. ["09:00", "18:00"] | required for the module | [string, string] | +| workingDays | used in modules: Guest Invites, About. e.g. "Mon - Fri" | required for the module | string | +| roomsPlaceholderMessage | This message is shown in case you turned off `allowRoomReservation` for the given hub | optional | string | +| allowGuestInvitation | | required | boolean | +| allowDeskReservation | | required | boolean | +| allowRoomReservation | | required | boolean | +| areas | hub floors | required | Array of JSON objects | + +### Areas configuration + +`areas` + +| key | value | required | var type | +| ------------ | ------------------------------------------------------------ | -------- | --------------------- | +| id | unique area identifier, once created please do not change | required | string | +| name | | required | string | +| available | you can turn on and off the whole area | required | boolean | +| bookable | the area can be booked | required | boolean | +| map | path to the map image, place in public folder in your config | required | string | +| meetingRooms | meeting room configuration | required | Array of JSON objects | +| desks | desks configuration | required | Array of JSON objects | + +### Meeting Rooms configuration + +`meetingRooms` + +| key | value | required | var type | +| ------------ | ------------------------------------------------------------------------------------------- | -------- | ---------------- | +| id | unique area identifier, once created please do not change | required | string | +| name | | required | string | +| description | e.g. 1st floor | required | string | +| capacity | room capacity | required | number | +| equipment | e.g. Whiteboard, stationary, electrical sockets within reachable distance to the table. | required | string | +| photo | path to the meeting room photo, place in public folder in your config | required | string | +| workingHours | | | [string, string] | +| autoConfirm | some rooms may require manual approval by administrator | | boolean | +| position | {"x": 1, "y":1} position of the room on the map to display on the big map (module Hub Map ) | | object | + +### Desks configuration + +`desks` + +| key | value | required | var type | +| -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | +| id | unique area identifier, once created please do not change | required | string | +| name | this is displayed on the map, the shorter the better. e.g: A, B, C | required | string | +| type | "flexible" - can be booked by anyone, "full_area" - will book the whole area or "multi" - multiple bookings can be made on the same desk/spot | required | string | +| position | {"x": 1, "y":1} position of the desk on the floor map to display for booking | | object | diff --git a/documentation/pages/framework/configuration/textTemplates.md b/documentation/pages/framework/configuration/textTemplates.md new file mode 100644 index 00000000..8fff540e --- /dev/null +++ b/documentation/pages/framework/configuration/textTemplates.md @@ -0,0 +1,9 @@ +# Text templates + +Depending on the configuration of your project you might have certain integrations turned on, e.g. email. +The app sends default texts when emails are sent. You can ovewrite these texts with your customs ones. + +1. Create a folder with the module name in the templates folder , e.g. `./config/templates/guest-invites` +2. Create a YAML file for the text message. We have 3 types of messages: notification (matrix), email, text (error messages). E.g. `email.yml` +3. Look up the email message key [here](https://github.com/paritytech/polkadot-hub-app/blob/master/src/integrations/email-smtp/README.md#guest-invites). +4. Add your custom message to yml file. [See example here](https://github.com/paritytech/polkadot-hub-app/blob/master/src/modules/guest-invites/templates/email.yaml) diff --git a/documentation/pages/framework/integrations.md b/documentation/pages/framework/integrations.md index 587c85f8..3dfd0327 100644 --- a/documentation/pages/framework/integrations.md +++ b/documentation/pages/framework/integrations.md @@ -5,3 +5,21 @@ ## Mapbox ## Stripe + +### Email-smtp + +Add `.env` variables. + +``` + SMTP_ENDPOINT="" + + SMTP_PORT= + + SMTP_USERNAME="" + + SMTP_PASSWORD="" + + SMTP_FROM_NAME="" + + SMTP_FROM_EMAIL="" +```