Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic UI and update docs #5

Merged
merged 11 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ MONGO_PORT=27017
MONGO_DATABASE_NAME=notify
MONGO_USERNAME=admin
MONGO_PASSWORD=admin!password
MONGO_TLS_ACTIVE=true

SENTRY_LOGGING_DNS=https://1245@asdf.ingest.sentry.io/67890
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
name: Build and publish Hugo site to Pages

on:
release:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/docs-build-on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build Hugo site on push

on:
push:
branches:
- main
- develop
- 'develop/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: docs
env:
HUGO_VERSION: 0.118.2
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
working-directory: docs
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/public
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and publish docker image
name: Build and publish notify docker image

on:
release:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build on push
name: Build notify docker image on push

on:
push:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/web-docker-build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and publish web docker image

on:
release:
types:
- created

env:
IMAGE_NAME: notify-frontend
IMAGE_TAG: ${{ github.event.release.tag_name }} # eg. v0.0.1
GH_USERNAME: m-mattia-m

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build . --file ./web/.docker/Dockerfile --tag $IMAGE_NAME --label $IMAGE_TAG
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Add tag to image
run: docker tag $IMAGE_NAME ghcr.io/$GH_USERNAME/$IMAGE_NAME:$IMAGE_TAG
- name: Push image to container-registry
run: docker push ghcr.io/$GH_USERNAME/$IMAGE_NAME:$IMAGE_TAG
19 changes: 19 additions & 0 deletions .github/workflows/web-docker-build-on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build web docker image on push

on:
push:
branches:
- main
- develop
- 'develop/**'

env:
IMAGE_NAME: notify-frontend

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build . --file ./web/.docker/Dockerfile --tag $IMAGE_NAME
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ configs/zitadel-service-user-key.json
/.idea/notify.iml
/.idea/modules.xml
/message-proxy/.idea/modules.xml


/web/node_modules
/web/.nuxt
/web/.env
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ services:
- MONGO_DATABASE_NAME=${MONGO_DATABASE_NAME}
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_TLS_ACTIVE=${MONGO_TLS_ACTIVE}
- SENTRY_LOGGING_DNS=${SENTRY_LOGGING_DNS}
ports:
- "8080:8080"
Expand Down Expand Up @@ -210,13 +209,16 @@ spec:
- name: notify
image: ghcr.io/m-mattia-m/notify:v1.0.1
env:
- name: MONGO_TLS_ACTIVE
value: "true"
- name: MONGO_HOST
valueFrom:
secretKeyRef:
name: notify-secrets
key: MONGO_HOST
- name: MONGO_PORT
valueFrom:
secretKeyRef:
name: notify-secrets
key: MONGO_PORT
- name: MONGO_DATABASE_NAME
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -319,7 +321,7 @@ POST `/v1/settings/projects`
### Update

Replace `<project-id>` in the URL with your project id. If you do not know this ID, you can list all your project
with [list-projects](/docs/configuration/project#list).
with [list-projects](https://m-mattia-m.github.com/Notify/docs/configuration/project#list).

PUT `/v1/settings/projects/<project-id>`

Expand All @@ -338,14 +340,14 @@ GET `/v1/settings/projects`
### Get

Get a specific project by their ID. Replace `<project-id>` in the URL with your project id. If you do not know this ID,
you can list all your project with [list-projects](/docs/configuration/project#list).
you can list all your project with [list-projects](https://m-mattia-m.github.com/Notify/docs/configuration/project#list).

GET `/v1/settings/projects/<project-id>`

### Delete

Delete a specific project by their ID. Replace `<project-id>` in the URL with your project id. If you do not know this
ID, you can list all your project with [list-projects](/docs/configuration/project#list).
ID, you can list all your project with [list-projects](https://m-mattia-m.github.com/Notify/docs/configuration/project#list).

DELETE `/v1/settings/projects`

Expand Down Expand Up @@ -482,13 +484,13 @@ You can't update a host, because of the verification is to complex. You need to
### Verify

You need to verify a host. For this you need to add your `verify_token` in your
DNS ([configure your own DNS](/docs/self-hosted/domain#dns)). For this you need go to your domain provider (e.g.
DNS ([configure your own DNS](https://m-mattia-m.github.com/Notify/docs/self-hosted/domain#dns)). For this you need go to your domain provider (e.g.
Cloudflare) and add a `TXT`-record with the tokens as the value. The `verify_token` looks like
this: `notify-verification::abc123-de45-fg67-hi89-jklmn01234` after this you can send the verification-request (if it
fails, be aware that a DNS-record can take up to 72 hours until it is active.). Replace `<project-id>` in the URL with
your project id.

For your development/local environment look [here](/docs/development/localhost#dns).
For your development/local environment look [here](https://m-mattia-m.github.com/Notify/docs/development/localhost#dns).

PUT `v1/settings/projects/<project-id>/hosts`

Expand Down Expand Up @@ -563,7 +565,7 @@ DELETE `v1/settings/projects/<project-id>/hosts/<host-id>`
2. If you don't have your domain
connected, [add](https://help.mailgun.com/hc/en-us/articles/203637190-How-Do-I-Add-or-Delete-a-Domain-) one.
3. Create an [API-Key](https://app.mailgun.com/settings/api_security) for Notify.
4. Create a [Notify project](/docs/configuration/project), if you don't have one yet.
4. Create a [Notify project](https://m-mattia-m.github.com/Notify/docs/configuration/project), if you don't have one yet.
5. Add your Mailgun API-Key to your project. At the moment, you need to configure it via Swagger (or cURL, ...). (We are
working on a frontend.). Replace `<your-project-id>` in the url with your notify-project-id
\
Expand Down Expand Up @@ -631,7 +633,7 @@ All activities will be logged in the mongo database.
### Hide message and subject

If you are use the self-hosted variant, you can set in the configuration, that the subject and the massage should not be
logged in the activity. [Read more](/docs/self-hosted/domain#activity)
logged in the activity. [Read more](https://m-mattia-m.github.com/Notify/docs/self-hosted/domain#activity)

## Notification

Expand Down Expand Up @@ -756,10 +758,10 @@ to [Github](https://github.com/m-mattia-m/Notify) for this.

## Ideas

- add [messaging providers](/docs/configuration/providers) (like Discord, Microsoft Teams, SMTP, Twitter, Instagram,
- add [messaging providers](https://m-mattia-m.github.com/Notify/docs/configuration/providers) (like Discord, Microsoft Teams, SMTP, Twitter, Instagram,
WhatsApp, ...)
- test more [OIDC providers](/docs/self-hosted/authentication) and document if it works.
- add [logging providers](/)
- test more [OIDC providers](https://m-mattia-m.github.com/Notify/docs/self-hosted/authentication) and document if it works.
- add [logging providers](https://m-mattia-m.github.com/Notify/docs/self-hosted/logging/) and document how it works.

## Development

Expand Down
6 changes: 3 additions & 3 deletions docs/content/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ You are welcome to contribute to Notify. Just do what you think is good and impo

### Ideas

- add [messaging providers](/docs/configuration/providers) (like Discord, Microsoft Teams, SMTP, Twitter, Instagram, WhatsApp, ...)
- test more [OIDC providers](/docs/self-hosted/authentication) and document if it works.
- add [logging providers](/)
- add [messaging providers](../docs/configuration/providers) (like Discord, Microsoft Teams, SMTP, Twitter, Instagram, WhatsApp, ...)
- test more [OIDC providers](../docs/self-hosted/authentication) and document if it works.
- add [logging providers](../docs/self-hosted/logging/) and document how it works.

## Development

Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Notify is a simple secure message gateway witch allows you to send messages from
Dive right into the following section to get started:

{{< cards >}}
{{< card link="/docs/getting-started" title="Getting started" >}}
{{< card link="/docs/configuration" title="Configuration" >}}
{{< card link="/docs/development" title="Development" >}}
{{< card link="./getting-started" title="Getting started" >}}
{{< card link="./configuration" title="Configuration" >}}
{{< card link="./development" title="Development" >}}
{{< /cards >}}
8 changes: 4 additions & 4 deletions docs/content/docs/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ create your resources. All this requests need a valid JWT token from a valid use
cloud: [Zitadel](https://github.com/zitadel/zitadel/)).

{{< cards >}}
{{< card link="/docs/configuration/project" title="Project" >}}
{{< card link="/docs/configuration/host" title="Hosts" >}}
{{< card link="/docs/configuration/flow" title="Flows" >}}
{{< card link="/docs/configuration/providers" title="Providers" >}}
{{< card link="../configuration/project" title="Project" >}}
{{< card link="../configuration/host" title="Hosts" >}}
{{< card link="../configuration/flow" title="Flows" >}}
{{< card link="../configuration/providers" title="Providers" >}}
{{< /cards >}}


4 changes: 2 additions & 2 deletions docs/content/docs/configuration/host.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ You can't update a host, because of the verification is to complex. You need to
## Verify

You need to verify a host. For this you need to add your `verify_token` in your
DNS ([configure your own DNS](/docs/self-hosted/domain#dns)). For this you need go to your domain provider (e.g.
DNS ([configure your own DNS](../../self-hosted/domain#dns)). For this you need go to your domain provider (e.g.
Cloudflare) and add a `TXT`-record with the tokens as the value. The `verify_token` looks like
this: `notify-verification::abc123-de45-fg67-hi89-jklmn01234` after this you can send the verification-request (if it
fails, be aware that a DNS-record can take up to 72 hours until it is active.). Replace `<project-id>` in the URL with
your project id.

For your development/local environment look [here](/docs/development/localhost#dns).
For your development/local environment look [here](../..//development/localhost#dns).

PUT `v1/settings/projects/<project-id>/hosts`

Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/configuration/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ POST `/v1/settings/projects`
## Update

Replace `<project-id>` in the URL with your project id. If you do not know this ID, you can list all your project
with [list-projects](/docs/configuration/project#list).
with [list-projects](../../configuration/project#list).

PUT `/v1/settings/projects/<project-id>`

Expand All @@ -46,14 +46,14 @@ GET `/v1/settings/projects`
## Get

Get a specific project by their ID. Replace `<project-id>` in the URL with your project id. If you do not know this ID,
you can list all your project with [list-projects](/docs/configuration/project#list).
you can list all your project with [list-projects](../../configuration/project#list).

GET `/v1/settings/projects/<project-id>`

## Delete

Delete a specific project by their ID. Replace `<project-id>` in the URL with your project id. If you do not know this
ID, you can list all your project with [list-projects](/docs/configuration/project#list).
ID, you can list all your project with [list-projects](../../configuration/project#list).

DELETE `/v1/settings/projects`

Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/configuration/providers/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ sidebar:
## Providers

{{< cards >}}
{{< card link="/docs/configuration/providers/slack" title="Slack" image="/images/providers/slack.png" options="600x800 q100 webp" method="fit" subtitle="Add your Slack integration API-Key." >}}
{{< card link="/docs/configuration/providers/mailgun" title="Mailgun" image="/images/providers/mailgun.png" options="600x800 q100 webp" method="fit" subtitle="Store Mailgun credentials." >}}
{{< card link="/contribute" title="Other provider" image="/images/providers/add.png" options="600x800 q100 webp" method="fit" subtitle="Add your own provider." >}}
{{< card link="../providers/slack" title="Slack" image="/images/providers/slack.png" options="600x800 q100 webp" method="fit" subtitle="Add your Slack integration API-Key." >}}
{{< card link="../providers/mailgun" title="Mailgun" image="/images/providers/mailgun.png" options="600x800 q100 webp" method="fit" subtitle="Store Mailgun credentials." >}}
{{< card link="../../../contribute" title="Other provider" image="/images/providers/add.png" options="600x800 q100 webp" method="fit" subtitle="Add your own provider." >}}
{{< /cards >}}

### Planned
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/configuration/providers/mailgun.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Create an [API-Key](https://app.mailgun.com/settings/api_security) for Notify.

### Step 4

Create a [Notify project](/docs/configuration/project), if you don't have one yet.
Create a [Notify project](../../project), if you don't have one yet.

### Step 5

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/development/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ sidebar:
If you are developing, you find all the configurations and peculiarities for the development here.

{{< cards >}}
{{< card link="/docs/development/localhost" title="Localhost" >}}
{{< card link="../development/localhost" title="Localhost" >}}
{{< /cards >}}
8 changes: 4 additions & 4 deletions docs/content/docs/self-hosted/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ sidebar:
Notify is Open Source! So you can host Notify for yourself.

{{< cards >}}
{{< card link="/docs/self-hosted/setup" title="Setup" >}}
{{< card link="/docs/self-hosted/file" title="File" >}}
{{< card link="/docs/self-hosted/database" title="Database" >}}
{{< card link="/docs/self-hosted/authentication" title="Authentication" >}}
{{< card link="../self-hosted/setup" title="Setup" >}}
{{< card link="../self-hosted/file" title="File" >}}
{{< card link="../self-hosted/database" title="Database" >}}
{{< card link="../self-hosted/authentication" title="Authentication" >}}
{{< /cards >}}
4 changes: 2 additions & 2 deletions docs/content/docs/self-hosted/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ You can add a .env-file or you also can add the environment variables directly i
```yaml {filename="./configs/config.yaml"}
database:
mongo:
authMechanism: SCRAM-SHA-256
srv: true
authMechanism: SCRAM-SHA-256 # optional
srv: true # optional
tls: true # is only required when your DB use TLS.
```

Expand Down
Loading