Skip to content

Commit 4eaee5d

Browse files
GrabauskasCopilot
andauthored
feat: Refactoring Documentation (#92)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent be319d5 commit 4eaee5d

25 files changed

+671
-258
lines changed

.github/copilot-instructions.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# OneGround Developer Portal - AI Assistant Instructions
2+
3+
## Project Overview
4+
5+
This repository hosts the [dev.oneground.nl](https://dev.oneground.nl) developer portal, built with **Docusaurus 3** (React static site generator). It documents the implementation of Dutch case management APIs (ZGW - Zaakgericht Werken).
6+
7+
## Technology Stack
8+
9+
- **Framework**: Docusaurus 3.x
10+
- **Language**: TypeScript (`.ts`, `.tsx`)
11+
- **UI/Components**: React 19, Infima (CSS framework), custom CSS modules
12+
- **Content**: Markdown/MDX (`.md`, `.mdx`)
13+
- **Formatting**: Prettier
14+
15+
## Critical Workflows
16+
17+
- **Development Server**: `npm start` (Hot reloading enabled)
18+
- **Production Build**: `npm build` (Outputs to `build/`)
19+
- **Formatting**: `npm run format`
20+
- **CRITICAL**: Always run this command before finishing a task. The CI/CD pipeline enforces strict formatting and will fail if code is not formatted with Prettier.
21+
22+
## Project Structure & Architecture
23+
24+
- **Configuration**:
25+
- `docusaurus.config.ts`: Main site config, plugins, presets, and theme config.
26+
- `sidebars.ts`: Documentation sidebar structure.
27+
- **Content**:
28+
- `docs/`: Main documentation files (Markdown/MDX).
29+
- `blog/`: Blog posts (Markdown/MDX).
30+
- `static/`: Static assets (images, robots.txt) - copied directly to build root.
31+
- **Source Code**:
32+
- `src/pages/`: React components that become standalone pages (e.g., `index.tsx` is the homepage).
33+
- `src/components/`: Reusable React components.
34+
- `src/css/custom.css`: Global custom styles (overrides Infima variables).
35+
36+
## Coding Conventions
37+
38+
- **Links**: When linking between documentation pages, use relative file paths (e.g., `[Link](./doc-file.md)`), not URL paths. Docusaurus resolves them automatically.
39+
- **Sidebars**: New documentation pages must be added to `sidebars.ts` unless using autogenerated sidebars (this project uses manual definition).
40+
- **Images**: Place specific images in `static/img` and reference them via `/img/...`.
41+
- **React Components**: Use functional components with TypeScript.
42+
- **Styling**: Prefer updating `src/css/custom.css` for global changes or using CSS modules/Infima utility classes for components.
43+
44+
## Docusaurus Specifics
45+
46+
- **Swizzle**: Use `npm run swizzle` only if you need to deeply customize internal Docusaurus components (avoid if possible).
47+
- **Frontmatter**: Ensure valid frontmatter (id, title, description) in Markdown files.
48+
- **Admonitions**: Use `:::note`, `:::tip`, `:::warning` syntax for callouts.
49+
50+
## Common Tasks
51+
52+
- **Adding a Doc**:
53+
1. Create file in `docs/`.
54+
2. Add entry to `sidebars.ts` in the appropriate category.
55+
3. Run `npm run format`.
56+
- **Adding a Blog Post**:
57+
1. Create file in `blog/` with date prefix `YYYY-MM-DD-title.md`.
58+
2. Run `npm run format`.
59+
60+
## Examples
61+
62+
- **Sidebar Config**: See `sidebars.ts` for nested category structure.
63+
- **Homepage**: See `src/pages/index.tsx`.
64+
- **Config**: See `docusaurus.config.ts` for plugin and preset options.

blog/2025-03-27-integrating-signing-software-with-zgw.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The pattern described here is already implemented and used in production setting
5959

6060
#### Authentication on the ZGW requests
6161

62-
The requests to the ZGW components use the standard authentication for the ZGW API: a JWT generated based on a ClientId and secret. See the [OneGround documentation](/docs/usage-of-clientids) or the general [ZGW documentation](https://vng-realisatie.github.io/gemma-zaken/themas/achtergronddocumentatie/authenticatie-autorisatie) for details.
62+
The requests to the ZGW components use the standard authentication for the ZGW API: a JWT generated based on a ClientId and secret. See the [OneGround documentation](/docs/general/authentication) or the general [ZGW documentation](https://vng-realisatie.github.io/gemma-zaken/themas/achtergronddocumentatie/authenticatie-autorisatie) for details.
6363

6464
#### Authentication on the trigger message
6565

@@ -73,7 +73,7 @@ Before the documents are presented to the signer, this person should authenticat
7373

7474
To initiate the signing process, the TSA or ZAC should post a trigger message to the signing software in this format:
7575

76-
```
76+
```javascript
7777
{
7878
"naam": "...", // Name of signing transaction, can be displayed to the signer(s) by the signing software
7979
"eigenaar": "lisa@breda.dev", // e-mail of user that initiates the signing transaction
@@ -121,7 +121,7 @@ Some details about properties that might not be clear from the description:
121121

122122
If the trigger message is received correctly, the signing software should respond with status code 200 and this message:
123123

124-
```
124+
```jsonc
125125
{
126126
"transaction_id": "2opbDxqSB8BX3137ulqdw2q9_Mw=" // unique id of this signing transaction; format to be determined by the signing software
127127
}
@@ -135,7 +135,7 @@ Note that signing documents is a very asynchronous sequence: it might be several
135135

136136
When signing is completed successfully, the request to the NRC should be:
137137

138-
```
138+
```javascript
139139
{
140140
"kanaal": "documentacties",
141141
"hoofdObject": ""$url"", // ZRC url of the case
@@ -151,7 +151,7 @@ When signing is completed successfully, the request to the NRC should be:
151151

152152
When signing has failed, is cancelled or has otherwise not completed successfully, the request to the NRC should be:
153153

154-
```
154+
```javascript
155155
{
156156
"kanaal": "documentacties",
157157
"hoofdObject": ""$url"", // ZRC url of the case

blog/2025-11-14-oauth2-token-endpoint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ By centralizing token creation, we ensure consistent security practices for all
131131

132132
Of course, we understand that this may require some adjustments on each customer application, so we are still supporting legacy integration during this transition period. Additionally, we are expecting that in the future (like ZGW 2.x) self-signed tokens will be deprecated in favor of centralized OAuth2 flows. Our approach not only enhances security today but also ensures your integration remains compliant and robust for years to come.
133133

134-
You can read more about our implementation and how to use the OAuth2 Token Endpoint in our [ClientID Management and JWT Authentication in OneGround](../docs/usage-of-clientids) documentation.
134+
You can read more about our implementation and how to use the OAuth2 Token Endpoint in our [ClientID Management and JWT Authentication in OneGround](../docs/general/authentication) documentation.
135135

136136
## Conclusion
137137

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Configuration & Tooling"
3+
description: "Guidance on using the OneGround configuration tool for Authorizations, including profiles and best practices."
4+
keywords: ["configuration", "tooling", "authorizations", "profiles", "OneGround", "limitations"]
5+
slug: /authorization/configuration
6+
---
7+
8+
# Configuration & Tooling
9+
10+
:::info OneGround Unlimited Only
11+
The configuration tool described in this section is exclusive to **OneGround Unlimited** (the managed SaaS solution). It is not available in the open-source version of the components.
12+
:::
13+
14+
Authorizations in OneGround Unlimited are managed via the detailed configuration tool. This tool simplifies the assignment of permissions using predefined profiles and enforces specific best practices for stability.
15+
16+
## Authorization Profiles
17+
18+
Instead of manually configuring every granular permission scope, the tool utilizes **Authorization profiles**. These profiles perform two main functions:
19+
20+
1. **Simplification**: They group logical sets of permissions together.
21+
2. **Suggestion**: They guide you toward meaningful authorization sets for common use cases.
22+
23+
## Best Practices
24+
25+
### One Client ID per Application
26+
27+
We strongly advise configuring only **one Client ID per Application**.
28+
29+
- **Reason**: This establishes a clear 1-to-1 relationship between your configuration and the external consumer.
30+
- **Benefit**: It allows you to adjust Authorizations for a specific application without unintended side effects on other consumers sharing the same resource.
31+
32+
### Restrict Permissions (Least Privilege)
33+
34+
Always restrict Authorizations as much as possible.
35+
36+
- **Risk**: Granting broad access (e.g., 'all Authorizations') can have severe consequences, such as an application having the permission to **delete all cases**.
37+
- **Advice**: Only assign the profiles strictly necessary for the application's function.
38+
39+
## Tool Limitations & Design Decisions
40+
41+
The OneGround configuration tool implements specific constraints to ensure system stability.
42+
43+
### Single Client ID Enforcement
44+
45+
While the ZGW API standard allows multiple Client IDs for a single Application entity, our tool restricts this to one. This decision was made to keep the configuration view simple and unambiguous for administrators.
46+
47+
### Case Type Granularity
48+
49+
The tool does **not** support restricting Authorizations to specific Case Types (Zaaktypes).
50+
51+
- **Background**: The API standard supports this feature.
52+
- **Issue**: In previous versions of our tooling, this granularity caused significant maintenance problems. Applications frequently lost access to cases when new versions of a Case Type were published, or conversely, could not access older versions.
53+
- **Solution**: By omitting this granularity in the tool, we ensure consistent access across all versions of a case type, preventing "breaking changes" in permissions during functional updates.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Introduction to Authorizations"
3+
description: "Overview of the ZGW Authorizations (AC) system, managing application permissions and access control."
4+
keywords: [authorizations, introduction, AC, access control, ZGW, API, OneGround, permissions, ClientID]
5+
slug: /authorization/introduction
6+
---
7+
8+
# Introduction to Authorizations
9+
10+
The Authorizations system (often referred to as **AC** or Authorizations Component) is a fundamental part of the ZGW API landscape provided by OneGround. It manages the permissions for client applications, ensuring that they can only access or modify the data they are authorized for within the ZGW APIs (such as Zaken or Documenten).
11+
12+
## How it works
13+
14+
The AC acts as the central authority for checking permissions when an API request is made.
15+
16+
1. **API Call**: A client application makes a request to a ZGW API (e.g., creating a Case), including a **Bearer Token**.
17+
2. **Identification**: The API validates the token and extracts the **Client ID**.
18+
3. **Verification**: The API consults the **AC** to verify if the application associated with that Client ID has the necessary authorizations for the requested operation.
19+
4. **Access**: If a valid authorization exists, the request is processed; otherwise, it is denied.
20+
21+
## Getting Started
22+
23+
To manage access for your applications, you typically use the OneGround configuration tool. The process involves:
24+
25+
1. **Create an Application**: Define a logical application entity in the system.
26+
2. **Assign Client ID**: Link a unique Client ID (from your identity provider) to the application.
27+
3. **Configure Authorizations**: detailed permissions are assigned to the application. OneGround provides "Authorization profiles" to help select meaningful sets of permissions.
28+
29+
> **Best Practice**: We advise using only **one Client ID per Application**. This creates a clear 1-to-1 relationship, making it easier to adjust authorizations for specific consumers without affecting others.
30+
31+
## Key Concepts
32+
33+
- **Applicatie (Application)**: A registry of a consumer system. In the ZGW standard, an application can have multiple Client IDs, but OneGround tooling enforces a simplified model.
34+
- **Client ID**: The unique identifier found in the authentication token (JWT) that identifies the calling software.
35+
- **Autorisatie (Authorization)**: A specific rule granting permission to perform certain actions (scopes) on certain resources.
36+
37+
## Limitations and Advice
38+
39+
When using the OneGround configuration tool, keep the following in mind:
40+
41+
- **One Client ID per App**: While the standard allows multiple, the tool restricts this to simplify configuration and clarity.
42+
- **Granularity**: The tool is designed to prevent "Authorization Hell". While the API technically supports very granular authorizations (e.g., specific case types), the tool focuses on robust, workable profiles to avoid issues where applications lose access to relevant data (e.g., versioning conflicts with case types).
43+
- **Least Privilege**: Always restrict authorizations as much as possible. Giving an application "all Authorizations" might inadvertently grant permission to delete all cases.
44+
45+
## Official Standards (VNG)
46+
47+
The OneGround Authorizations system is implemented according to the standards defined by VNG Realisatie. The official standards provide the complete specification:
48+
49+
- **[VNG Autorisaties Standard](https://vng-realisatie.github.io/gemma-zaken/standaard/autorisaties/)**
50+
The core specification for the Authorizations API (Autorisaties services). It defines how applications and authorizations should be structured and queried.
51+
52+
For further technical details on how to configure authorizations in OneGround, please refer to the specific configuration guides.

docs/authorizations.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/catalogs/ztc-introduction.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "Introduction to Catalogs"
3+
description: "Overview of the ZGW Catalogs (ZTC) system, managing the definitions and blueprints for cases."
4+
keywords: [catalogs, introduction, ZTC, ZGW, API, OneGround, zaaktypen, blueprints]
5+
slug: /catalogs/introduction
6+
---
7+
8+
# Introduction to Catalogs
9+
10+
The Catalogs system (often referred to as **ZTC** or ZaakTypeCatalogus) is a foundational part of the ZGW API landscape provided by OneGround. It acts as the repository for all definitions (metadata) that describe how cases ("Zaken") and related objects should behave.
11+
12+
## How it works
13+
14+
Before an organization can work with cases, they must define _what_ those cases are. The ZTC stores these definitions.
15+
16+
1. **Definition**: An administrator creates a **ZaakType** (Case Type) in the catalog. This defines properties like:
17+
- What phases (Statustypen) the case goes through.
18+
- What documents (InformatieObjectTypen) are relevant.
19+
- What information is recorded (EigenschapTypen).
20+
2. **Execution**: When a client application creates a new Case (via the Zaken API), it must refer to a specific **ZaakType** URL from the ZTC.
21+
3. **Validation**: The Zaken API uses the definition in the ZTC to validate the case data and ensure the process follows the designed workflow.
22+
23+
## Getting Started
24+
25+
To effectively use the ZTC, you typically interact with a management interface or configuration tool to set up your catalogs.
26+
27+
1. **Create a Catalog**: A logical grouping for your definitions (Catalogus).
28+
2. **Design Case Types**: Define the blueprints for your business processes (e.g., "Building Permit Application", "Complaint", "Internal Review").
29+
3. **Publish**: Once a Case Type is finalized, it is published so it can be used by consumer applications.
30+
31+
## Key Concepts
32+
33+
- **Catalogus (Catalog)**: A collection of types. An organization can have one or more catalogs.
34+
- **ZaakType (Case Type)**: The definition of a generic business process (e.g., "Vergunningaanvraag"). It determines the lifecycle and data structure of concrete Cases.
35+
- **InformatieObjectType (Information Object Type)**: The definition of a document type (e.g., "ID Card Copy", "Decision Document").
36+
- **BesluitType (Decision Type)**: The definition of a specific decision that can be taken within a case.
37+
- **StatusType**: Defines a possible state in the lifecycle of a case.
38+
39+
## Official Standards (VNG)
40+
41+
The OneGround Catalogs system is implemented according to the standards defined by VNG Realisatie. The official standards provide the complete specification:
42+
43+
- **[VNG Catalogussen Standard](https://vng-realisatie.github.io/gemma-zaken/standaard/catalogi/)**
44+
The core specification for the Catalogs API (Catalogi services). It defines the resources and relations for case types, document types, and more.
45+
46+
For further technical details, please refer to the specific documentation pages in this section.
File renamed without changes.

0 commit comments

Comments
 (0)