Skip to content
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Deploys the Docusaurus docs site to GitHub Pages on push to main (or manual
# dispatch). Served from https://wso2.github.io/dpdp-accelerator/.
name: Docs publish

on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/docs-publish.yml'
workflow_dispatch:

permissions:
contents: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
# Full history so showLastUpdateTime can read per-file git dates.
fetch-depth: 0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: docs

- name: Build Docusaurus site
run: npm run build
working-directory: docs
env:
BASE_URL: /dpdp-accelerator/

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ pom.xml.releaseBackup
**/frontend/npm/
npm-debug.log*

# Docusaurus (docs site build output and cache)
docs/.docusaurus/
docs/build/

# Accelerator overlay: the exploded webapp and OSGi bundle jars are generated
# at package time.
**/carbon-home/repository/deployment/server/webapps/
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ mvn clean install
This builds the consent portal (frontend + backend WAR) and packages
`wso2-dpdpiam-accelerator-<version>.zip` under
`dpdp-accelerator/accelerators/dpdp-is/target/` — ready to unzip inside
`<IS_HOME>`. See [`docs/setup-guide.md`](docs/setup-guide.md) for
`<IS_HOME>`. See [`docs/content/setup-guide.md`](docs/content/setup-guide.md) for
installation.

## Documentation

- [`docs/setup-guide.md`](docs/setup-guide.md) — installing the accelerator
The `docs/` directory is a [Docusaurus](https://docusaurus.io/) site whose
content lives in `docs/content/`. Run `npm install` then `npm run start` inside
`docs/` to preview it locally.

- [`docs/content/setup-guide.md`](docs/content/setup-guide.md) — installing the accelerator
and starting the Identity Server.
- [`docs/configuration-guide.md`](docs/configuration-guide.md) — registering
- [`docs/content/configuration-guide.md`](docs/content/configuration-guide.md) — registering
the consent portal application on a running Identity Server.
- [`docs/event-notification-guide.md`](docs/event-notification-guide.md) —
- [`docs/content/event-notification-guide.md`](docs/content/event-notification-guide.md) —
creating topics and webhook subscriptions, publishing events, and inspecting
delivery history.
- [`docs/localization-guide.md`](docs/localization-guide.md) — correcting UI
- [`docs/content/localization-guide.md`](docs/content/localization-guide.md) — correcting UI
wording and localizing Purposes/Elements on a running deployment.
- [`docs/release-guide.md`](docs/release-guide.md) — cutting a release with the
- [`docs/content/release-guide.md`](docs/content/release-guide.md) — cutting a release with the
Release builder workflow.

## Roles
Expand All @@ -43,5 +47,5 @@ Assign every portal user one of these two roles per tenant (Console →
| `dpdp-consent-user` | Regular users, to manage their own consents. |
| `dpdp-consent-admin` | Administrators, to manage other people's consents and the purpose/element catalog. |

See [`docs/configuration-guide.md`](docs/configuration-guide.md#4-assign-portal-roles)
See [`docs/content/configuration-guide.md`](docs/content/configuration-guide.md#4-assign-portal-roles)
for details.
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Configuring the Consent Portal application
sidebar_position: 2
---

# Configuring the Consent Portal application

Complete this after installing the accelerator and starting the Identity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Using Event Notifications
sidebar_position: 3
---

# Using Event Notifications

Complete this after installing the accelerator, configuring the Consent Portal,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Localizing the Consent Portal
sidebar_position: 4
---

# Localizing the Consent Portal

Complete this after [`configuration-guide.md`](configuration-guide.md). This
Expand Down
9 changes: 7 additions & 2 deletions docs/release-guide.md → docs/content/release-guide.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
title: Release guide
sidebar_position: 5
---

# Release guide

How to cut a release of the DPDP accelerator, and what the pipeline does on your behalf.

Releases are built by the **Release builder** workflow
([`.github/workflows/release-builder.yml`](../.github/workflows/release-builder.yml)). It is
([`.github/workflows/release-builder.yml`](https://github.com/wso2/dpdp-accelerator/blob/main/.github/workflows/release-builder.yml)). It is
dispatched by hand — nothing releases on a push or a merge.

## What a release produces
Expand Down Expand Up @@ -89,7 +94,7 @@ prepare ─┬─ e2e ──┐
non-prerelease off `main`. Everything downstream reads its outputs rather than
re-deriving them.
- **e2e** — the same suite that gates a PR, via the reusable
[`e2e.yml`](../.github/workflows/e2e.yml). Skippable with `run_e2e: off`.
[`e2e.yml`](https://github.com/wso2/dpdp-accelerator/blob/main/.github/workflows/e2e.yml). Skippable with `run_e2e: off`.
- **build** — `versions:set`, then `mvn clean install`, then asserts the zip exists at the
exact expected path. That assertion is also what proves `versions:set` reached every
module.
Expand Down
7 changes: 6 additions & 1 deletion docs/setup-guide.md → docs/content/setup-guide.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Setting up the DPDP Identity Server Accelerator
sidebar_position: 1
---

# Setting up the DPDP Identity Server Accelerator

Gets the Identity Server running with the consent portal deployed. Complete
Expand Down Expand Up @@ -31,7 +36,7 @@ mvn clean install

Run from the repository root — this produces
`dpdp-accelerator/accelerators/dpdp-is/target/wso2-dpdpiam-accelerator-<version>.zip`.
See the [repository README](../README.md#build) for details.
See the [repository README](https://github.com/wso2/dpdp-accelerator#build) for details.

## 3. Extract the accelerator

Expand Down
104 changes: 104 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// @ts-check
const { themes: prismThemes } = require('prism-react-renderer');

const baseUrl = process.env.BASE_URL || '/dpdp-accelerator/';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'WSO2 DPDP Accelerator Documentation',
tagline: 'Documentation for the WSO2 DPDP (Digital Personal Data Protection) Accelerator',
favicon: 'img/favicon.svg',
url: 'https://wso2.github.io',
baseUrl,
organizationName: 'wso2',
projectName: 'dpdp-accelerator',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
themes: [
[
'@easyops-cn/docusaurus-search-local',
{
hashed: true,
language: ['en'],
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
docsRouteBasePath: 'docs',
indexBlog: false,
indexPages: true,
searchBarShortcutHint: false,
},
],
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'content',
routeBasePath: 'docs',
sidebarPath: './sidebars.js',
editUrl: 'https://github.com/wso2/dpdp-accelerator/edit/main/docs/content/',
showLastUpdateTime: true,
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/logo.svg',
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
navbar: {
title: 'WSO2 DPDP Accelerator',
logo: {
alt: 'WSO2 DPDP Accelerator',
src: 'img/logo.svg',
srcDark: 'img/logo-dark.svg',
},
items: [
{ to: '/docs/setup-guide', label: 'Guides', position: 'left' },
{
href: 'https://github.com/wso2/dpdp-accelerator',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Guides',
items: [
{ label: 'Setup', to: '/docs/setup-guide' },
{ label: 'Configuration', to: '/docs/configuration-guide' },
{ label: 'Event Notifications', to: '/docs/event-notification-guide' },
{ label: 'Localization', to: '/docs/localization-guide' },
{ label: 'Release', to: '/docs/release-guide' },
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} WSO2 LLC. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['java', 'bash', 'json', 'yaml', 'toml', 'markup'],
},
}),
};

module.exports = config;
Loading
Loading