Skip to content

Commit

Permalink
added rough info on modules and config
Browse files Browse the repository at this point in the history
  • Loading branch information
piggydoughnut committed Apr 10, 2024
1 parent 795c31c commit 304cb61
Show file tree
Hide file tree
Showing 32 changed files with 136 additions and 3 deletions.
4 changes: 4 additions & 0 deletions documentation/pages/framework/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"configuration": "Configuration",
"permissions": "Permissions"
}
File renamed without changes.
65 changes: 65 additions & 0 deletions documentation/pages/framework/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.

```
./config
├── application.json app name, auth, and homepage layout
├── company.json company name, offices, departments, divisions
├── modules.json list of enabled modules with their metadata and enabled integrations
├── permissions.json list of roles with their permissions, default role by email domain
├── modules custom modules
│ ├── division-sync
│ ├── help-center
├── public custom static files
│ ├── manifest.webmanifest custom manifest (as it can contain custom app name, icons set, etc)
│ ├── images
│ │ └── ...
└── templates custom text templates
├── guest-invites
│ └── email.yaml
└── visits
└── 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.

We use `mapbox` in a few places:

- All users map at `/map`.
- Map of the hub location on the about page `/about/<hubId>`
- User location on their profile if they specify that they want to share. `/profile/<userId>`

## 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)
File renamed without changes.
Empty file.
17 changes: 17 additions & 0 deletions documentation/pages/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Polkadot Hub App

Polkadot Hub App is a self-hosted web app for managing offices, meeting rooms, events, and people profiles. It's an opinionated hackspace-like approach for hybrid teams distributed across many continents and working on multiple projects. The app is written in React, Node.js and Postgres.

Main features:

- Multiple office locations + "Global" page for remote workers
- Internal user profiles with custom tags, locations, timezones and onboarding
- Flexible role system for access management
- Google authentication
- Authentication using Polkadot
- Modular architecture that allows you to expand the app with new widgets and integrations with external APIs

<Image
src="/screen-global.png"
alt="Polkadot Hub app"
width={300}
height={350}
style="margin-top: 10px;"
/>
1 change: 1 addition & 0 deletions documentation/pages/modules/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
12 changes: 10 additions & 2 deletions documentation/pages/modules/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ import Image from 'next/image'

## About widget

The widget shows information that is configured in [`company.json` file](../how-to/configuraiton.md): address, location directions, hub opening hours and days, whether desk reservations or room reservations are enabled, floor maps.
The widget shows information that is configured in [`company.json` file](../how-to/configuraiton.md): address, location directions and hub opening hours and days. The image on the widget can be replaced in the public folder in the configuration of the project. Simply add a file to `/config/public/maps/[hubID.png]`

<Image src="/about1.png" alt="Hello" width={300} height={350} />
<Image
src="/about1.png"
alt="about widget"
width={150}
height={200}
style="margin-top: 10px;"
/>

## About page

The about page shows more information than the widget, including an interactive map, floor plans and whether desk reservations or room reservations are enabled, floor maps.

<Image src="/aboutpage1.png" alt="About page 1" width={600} height={800} />
<Image src="/aboutpage2.png" alt="About page 2" width={600} height={800} />
17 changes: 17 additions & 0 deletions documentation/pages/modules/announcements.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# Announcement module

The Announcement Module is designed to broadcast important updates, notifications, and reminders to all users.
Announcements are displayed at the top of the user interface, ensuring maximum visibility to all users upon logging in to the platform.

Each announcement is assigned an expiration date, ensuring that outdated information is automatically removed from the display.

<Image src="/announcement.png" alt="Announcement" width={600} height={650} style="border: 1px solid gray; border-radius: 10px;"/>

## Create

Announcements are managed through the administration panel accessible to authorized personnel.

Admins can create, edit, and delete announcements as needed, providing them with full control over the content displayed to users. Admins can choose which users see which announcements using the in-built permissions system.

Announcements support markdown text.

Additionally, admins can set expiration dates for announcements, defining the duration of their visibility on the platform.
Binary file removed documentation/pages/modules/assets/about1.png
Binary file not shown.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions documentation/pages/modules/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Search module

The Search Module, located at the top of the page, serves as a powerful tool for users to quickly locate others within the organization.

<Image src="/search1.png" alt="Announcement" width={600} height={650} style="border: 1px solid gray; border-radius: 10px; margin-top: 10px;"/>

Search results:

<Image src="/search3.png" alt="Announcement" width={600} height={650} style="border: 1px solid gray; border-radius: 10px; margin-top: 10px;"/>

Users can search using:

- Names: Search by first name, last name, or both.

- Tags: Users can add personalized tags to their profiles, enabling searches based on specific interests, skills, or attributes.

- Other Fields: The search functionality extends to other fields filled in by users on their profiles, such as their social media handles.

A great example is searching for people using their github handles.

<Image src="/search4.png" alt="Announcement" width={600} height={650} style="border: 1px solid gray; border-radius: 10px; margin-top: 10px;"/>
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion documentation/pages/quickStart.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Quick start

Hello, quick world!
Refer to [QuickStart](https://github.com/paritytech/polkadot-hub-app/blob/master/docs/quickstart.md) on github.
Binary file modified documentation/public/about1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/announcement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/screen-global.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/search1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/search2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/search3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/public/search4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 304cb61

Please sign in to comment.