Skip to content

Commit 2791c5d

Browse files
authored
documentation with mkdocs-material (#141)
* introduce mkdocs * update API docs after rebase * UI: change app settings' icon * UI: bump htmx to 2.0.5 * expose swagger-ui only in DEV env * UI: update docs links * docs: draft docs structure & add configuration sections * update /health endpoint specs * remove unnecessary, explicit i18n config * add ko-fi banner * enable footer navigation * remove analytics and cookie consent * add sponsorship to the UI * docs: update & improve API docs * docs: update public PagerDuty setup guide * update feature request template * actualise README.md * finalize docs * add GH workflow to deploy docs * docs: fix social images URLs in prod
1 parent a30eef8 commit 2791c5d

File tree

85 files changed

+2754
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2754
-456
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
**What is your feature request related to?**
11+
A clear and concise description of the feature you want to request. For example, "I would like to see a new notification channel for SMS alerts."
1212

1313
**Describe the solution you'd like**
1414
A clear and concise description of what you want to happen.
1515

16-
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
18-
1916
**Additional context**
2017
Add any other context or screenshots about the feature request here.
18+
19+
**Would you like to contribute to this feature?**
20+
Please let us know if you are interested in contributing to this feature. We would be happy to assist you with the development process.

.github/workflows/docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: docs-deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Configure Git Credentials
14+
run: |
15+
git config user.name github-actions[bot]
16+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: 3.x
20+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21+
- uses: actions/cache@v4
22+
with:
23+
key: mkdocs-material-${{ env.cache_id }}
24+
path: .cache
25+
restore-keys: |
26+
mkdocs-material-
27+
- run: pip install -r requirements.txt
28+
- run: mkdocs gh-deploy --force

README.md

Lines changed: 18 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Kuvasz](https://github.com/kuvasz-uptime/kuvasz/raw/main/docs/kuvasz_banner.png)
1+
![Kuvasz](docs/docs/images/kuvasz_banner.webp)
22

33
[![CI](https://github.com/kuvasz-uptime/kuvasz/actions/workflows/main.yml/badge.svg)](https://github.com/kuvasz-uptime/kuvasz/actions/workflows/main.yml)
44
[![codecov](https://codecov.io/gh/kuvasz-uptime/kuvasz/branch/main/graph/badge.svg?token=67X0CD3CGY)](https://codecov.io/gh/kuvasz-uptime/kuvasz)
@@ -8,82 +8,37 @@
88

99
---
1010

11-
## ℹ️ What is Kuvasz?
11+
## [Documentation](https://kuvasz-uptime.dev)
1212

13-
Kuvasz is a **headless uptime monitor service**, which means that it is able to watch all of your precious websites and notifies you if something bad happens to them.
13+
## ℹ️ What is Kuvasz?
1414

15-
### Where does the name come from?
15+
**Kuvasz** [ˈkuvɒs], an open-source, self-hosted uptime & SSL monitoring service, designed to help you keep track of your websites and services. It provides a modern, user-friendly interface, a powerful REST API, and supports multiple notification channels like email, Slack, Telegram, and PagerDuty.
1616

17-
Kuvasz (pronounce as [ˈkuvɒs]) is an ancient hungarian breed of livestock & guard dog. You can read more about them on [Wikipedia](https://en.wikipedia.org/wiki/Kuvasz).
17+
![Kuvasz](docs/docs/images/feature_carousel.webp)
1818

19-
### Features
19+
### Where does the name come from?
2020

21-
- Uptime & latency monitoring with a configurable interval
22-
- SSL certification monitoring (once a day)
23-
- Email notifications through SMTP
24-
- Slack notifications through webhoooks
25-
- Telegram notifications through the Bot API
26-
- [PagerDuty integration](https://github.com/kuvasz-uptime/kuvasz/blob/main/docs/Integrating-with-PagerDuty.md) with automatic incident resolution
27-
- Configurable data retention period
21+
Kuvasz (pronounce as [ˈkuvɒs]) is an ancient hungarian breed of livestock & guard dog. You can read more about them on [Wikipedia](https://en.wikipedia.org/wiki/Kuvasz).
2822

29-
### Future ideas 🚧
23+
## ✨ Features
3024

31-
- Regular Lighthouse audits for your websites
25+
- **HTTP(S) monitoring**: Monitor the availability and performance of your websites and services by sending HTTP(S) requests.
26+
- **SSL certification monitoring**: Automatically check the SSL certificates of your monitored services to ensure they are valid and not expired.
27+
- **Notifications on a per-monitor basis**: Configure different notification channels for each monitor, allowing you to tailor alerts to your specific needs.
28+
- **Sleek UI**: Kuvasz has a modern, responsive, and user-friendly interface that makes it easy to manage your monitors.
29+
- **Full-fledged REST API**: Manage your monitors, check their status, and more through a powerful API.
30+
- More to come: _Kuvasz_ is under active development, and more features are planned for the future, such as **response keyword matching**, **POST requests with arbitrary payload**, and more.
3231

3332
## ⚡️ Quick start guide
3433

35-
### Requirements
36-
37-
- You have **a running PostgreSQL instance** (Preferably 12+)
38-
39-
### Starting Kuvasz
40-
41-
The quickest way to spin up an instance of Kuvasz is something like this:
42-
43-
```shell
44-
docker run -p 8080:8080 \
45-
-e ADMIN_USER=admin \
46-
-e ADMIN_PASSWORD=ThisShouldBeVeryVerySecure \
47-
-e DATABASE_HOST=127.0.0.1 \
48-
-e DATABASE_PORT=5432 \
49-
-e DATABASE_NAME=your_database \
50-
-e DATABASE_USER=your_db_user \
51-
-e DATABASE_PASSWORD=OhThisIsSoSecure \
52-
-e JWT_SIGNATURE_SECRET=testSecretItsVeryVerySecretSecret \
53-
kuvaszmonitoring/kuvasz:latest
54-
```
34+
If you want to get started quickly, please refer to the [**Installation guide**](https://kuvasz-uptime.dev/setup/installation/) in the documentation.
5535

56-
At this point you shouldn't see any error in your logs, so you're able to create your first monitor with an API call. Please, take a look at the [**API section**](https://github.com/kuvasz-uptime/kuvasz/wiki/API) of the Wiki, to get familiar with the authentication method that Kuvasz provides.
57-
If you have a valid access token, then creating a monitor and scheduling an uptime check for it, is simple like that:
36+
## ☕️ Do you like it?
5837

59-
```shell
60-
curl --location --request POST 'https://your.host:8080/api/v1/monitors/' \
61-
--header 'Authorization: Bearer YourAccessToken' \
62-
--header 'Content-Type: application/json' \
63-
--data-raw '{
64-
"name": "my_first_monitor",
65-
"url": "https://website.to.check",
66-
"uptimeCheckInterval": 60
67-
}'
68-
```
38+
While _Kuvasz_ is free and open-source, it still requires a lot of time and effort to maintain and develop. If you like it, please consider supporting the project by **starring it on GitHub**, or by **donating** via Ko-fi:
6939

70-
You can read more about the **monitor management** in the [dedicated section](https://github.com/kuvasz-uptime/kuvasz/wiki/Monitor-management) of the Wiki.
71-
72-
## ⛴ Deployment
73-
74-
Although the example above is simple, when you want to deploy Kuvasz to production you'll probably end up with a more mature tooling or configuration. You can find the available **configuration properties [here](https://github.com/kuvasz-uptime/kuvasz/wiki/Configuration)**.
75-
If you are going to deploy Kuvasz with **docker-compose or Kubernetes**, you should take a look at the [**deployment related examples**](https://github.com/kuvasz-uptime/kuvasz/tree/main/examples), or the [**Deployment**](https://github.com/kuvasz-uptime/kuvasz/wiki/Deployment) section of the Wiki.
76-
77-
## 📚 Further reading
78-
79-
If you want to know more about the fundamentals of Kuvasz, head to the [**Events & Event handlers**](https://github.com/kuvasz-uptime/kuvasz/wiki/Events-&-Event-handlers) section!
40+
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/L4L31DH59D)
8041

8142
## ⁉️ Do you have a question?
8243

8344
Let's go to the [discussions](https://github.com/kuvasz-uptime/kuvasz/discussions)!
84-
85-
## ❤️ Sponsors
86-
87-
[![JetBrains](https://github.com/kuvasz-uptime/kuvasz/raw/main/docs/jetbrains-logo.png)](https://www.jetbrains.com/?from=kuvasz)
88-
89-
Thanks to [JetBrains](https://www.jetbrains.com/?from=kuvasz) for supporting the development of Kuvasz with their Open Source License Program 🙏

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jib {
168168
val updateApiDoc by tasks.registering(type = Copy::class) {
169169
dependsOn("kaptKotlin")
170170
from(layout.buildDirectory.file("tmp/kapt3/classes/main/META-INF/swagger/kuvasz-latest.yml"))
171-
into("$rootDir/docs/api-doc")
171+
into("$rootDir/docs/docs/api-doc")
172172
}
173173

174174
val localDbUrl: String by project

app/src/main/kotlin/com/kuvaszuptime/kuvasz/controllers/MonitorOperations.kt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import java.time.Duration
2727

2828
interface MonitorOperations {
2929

30-
@Operation(summary = "Returns all monitors with their details")
30+
@Operation(summary = "Get all monitors with their details")
3131
@Get("/")
3232
fun getMonitorsWithDetails(
3333
@QueryValue
@@ -44,34 +44,36 @@ interface MonitorOperations {
4444
sslCheckEnabled: Boolean?,
4545
): List<MonitorDetailsDto>
4646

47-
@Operation(summary = "Returns a monitor's details")
47+
@Operation(summary = "Get a monitor's details")
4848
@Get("/{monitorId}")
4949
fun getMonitorDetails(monitorId: Long): MonitorDetailsDto
5050

51-
@Operation(summary = "Creates a monitor")
51+
@Operation(summary = "Create a monitor")
5252
@Post("/")
5353
fun createMonitor(@Body monitor: MonitorCreateDto): MonitorDto
5454

55-
@Operation(summary = "Deletes a monitor by ID")
55+
@Operation(summary = "Delete a monitor by ID")
5656
@Delete("/{monitorId}")
5757
fun deleteMonitor(monitorId: Long)
5858

5959
@Operation(
60-
summary = "Updates a monitor by ID",
60+
summary = "Update a monitor by ID",
61+
description = "Updates the monitor with the given ID. Only fields that are present in the request body " +
62+
"will be updated. Fields not present in the request body will remain unchanged.",
6163
requestBody = RequestBody(content = [Content(schema = Schema(implementation = MonitorUpdateDto::class))])
6264
)
6365
@Patch("/{monitorId}")
6466
fun updateMonitor(monitorId: Long, @Body updates: ObjectNode): MonitorDto
6567

66-
@Operation(summary = "Returns the uptime events of the given monitor")
68+
@Operation(summary = "Get the uptime events of the given monitor")
6769
@Get("/{monitorId}/uptime-events")
6870
fun getUptimeEvents(monitorId: Long): List<UptimeEventDto>
6971

70-
@Operation(summary = "Returns the SSL events of the given monitor")
72+
@Operation(summary = "Get the SSL events of the given monitor")
7173
@Get("/{monitorId}/ssl-events")
7274
fun getSSLEvents(monitorId: Long): List<SSLEventDto>
7375

74-
@Operation(summary = "Returns the stats of the given monitor")
76+
@Operation(summary = "Get the stats of the given monitor")
7577
@Get("/{monitorId}/stats")
7678
fun getMonitorStats(
7779
monitorId: Long,
@@ -83,11 +85,11 @@ interface MonitorOperations {
8385
period: Duration?,
8486
): MonitorStatsDto
8587

86-
@Operation(summary = "Returns the export of all monitors in YAML format")
88+
@Operation(summary = "Download the export of all monitors in YAML format")
8789
@Get("/export/yaml")
8890
fun getYamlMonitorsExport(): SystemFile
8991

90-
@Operation(summary = "Returns the overall, cumulative stats of all monitors")
92+
@Operation(summary = "Get the overall, cumulative stats of all monitors")
9193
@Get("/stats")
9294
fun getMonitoringStats(
9395
@QueryValue

app/src/main/kotlin/com/kuvaszuptime/kuvasz/controllers/SettingsOperations.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.Operation
66

77
interface SettingsOperations {
88

9-
@Operation(summary = "Returns the current settings of the application")
9+
@Operation(summary = "Get the current settings of the application")
1010
@Get("/")
1111
fun getSettings(): SettingsDto
1212
}

app/src/main/resources/application.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ micronaut:
33
application:
44
name: kuvasz
55
openapi:
6-
views.spec: 'swagger-ui.enabled=true'
76
additional:
87
files: 'src/main/resources/swagger'
98
security:
@@ -42,10 +41,6 @@ micronaut:
4241
access: isAnonymous()
4342
- pattern: /api/v1/info
4443
access: isAnonymous()
45-
- pattern: /swagger-ui/**
46-
access: isAnonymous()
47-
- pattern: /swagger/**
48-
access: isAnonymous()
4944
- pattern: /api/**
5045
access:
5146
- ROLE_API
@@ -56,12 +51,6 @@ micronaut:
5651
access: isAnonymous()
5752
router:
5853
static-resources:
59-
swagger:
60-
paths: classpath:META-INF/swagger
61-
mapping: /swagger/**
62-
swagger-ui:
63-
paths: classpath:META-INF/swagger/views/swagger-ui
64-
mapping: /swagger-ui/**
6554
public:
6655
paths: classpath:public
6756
mapping: /public/**

app/src/main/resources/swagger/additional-endpoints.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ paths:
88
tags:
99
- Management operations
1010
summary: Health endpoint
11-
description: Returns the current status of the application
11+
description: General health check endpoint
1212
operationId: health
1313
parameters: []
1414
responses:
@@ -29,8 +29,6 @@ components:
2929
HealthResult:
3030
type: object
3131
properties:
32-
name:
33-
type: string
3432
status:
3533
type: string
3634
enum:

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.cache
2+
site

docs/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

0 commit comments

Comments
 (0)