Skip to content
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
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
.obsidian/
bin/
obj/
/Docs/node_modules/
/Docs/.svelte-kit/
/Docs/build/
/Docs/.sveltepress/
# generated locale routes — sources: content/, ADR/, Schemas.md (sync rebuilds them)
/Docs/src/routes/??/
/Docs/src/routes/??-??/
# generated by Docs/scripts/sync-content.ts
/Docs/src/lib/site-locales.ts
# generated into static/ on every build
/Docs/static/sitemap.xml
/Docs/static/??/llms*.txt
/plugins/
/out/
.idea/
Expand All @@ -12,3 +24,4 @@ src/Plugins/Solutions/DevTokens/manifest.json
src/Plugins/Solutions/DevTools/manifest.json
issues/
*.DotSettings.user
Docs/package-lock.json
9 changes: 0 additions & 9 deletions Docs/README.md

This file was deleted.

20 changes: 20 additions & 0 deletions Docs/content/en/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# AuthKit Documentation

Welcome to AuthKit - Developer Authentication & SDK Access Service.

## Overview

AuthKit is a **plugin-based service** for handling **developer authentication, SDK token issuance, and access verification**. It ensures that only authorized developers can access SDK methods and provides a secure, auditable token-based authentication mechanism.

## Quick Links

- [Introduction](/en/guide/introduction/)
- [Quick Start](/en/guide/quick-start/)
- [REST API Reference](/en/reference/rest-api/)
- [Architecture](/en/architecture/adr/)

## Languages

You can read this documentation in:
- [English](/en/)
- [Polski](/pl/)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next]()
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next](./026-plugin-authentication-and-authorization-hooks.md)

# [ADR-025] Keep Plugin Options, OpenAPI, And Marten Integrations Explicit

Expand Down Expand Up @@ -45,4 +45,4 @@ Plugin configuration is isolated and strongly typed. OpenAPI and Marten contribu
- [ADR-023](./023-plugin-application-pipeline-hooks.md) - application integration hooks
- [Issue #11](https://github.com/AuthKits/AuthKit.Server/issues/11) - options, OpenAPI, and Marten integration requirements

[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next]()
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next](./026-plugin-authentication-and-authorization-hooks.md)
39 changes: 39 additions & 0 deletions Docs/content/en/adr/027-devtools-ui-typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./026-plugin-authentication-and-authorization-hooks.md) | [Next](./028-plugin-contract-and-dynamic-loading-architecture.md)

# [ADR-027] Compile The DevTools UI From Modular TypeScript Into A Single Embedded Resource

*2026-09* | Status: accepted

**Tag:** #adr_027

**Date:** 2026-09-16

**Scope:** Plugins.Solutions.DevTools

## Context

The DevTools plugin ships a web UI (Svelte 5 with Tailwind) for exploring gRPC services and invoking methods. Deploying that UI as loose static files would split every release into two artifacts that can drift apart: the server and the interface used to inspect it.

## Problem

A modular TypeScript application does not deploy itself as one file. Without a bundling step the UI would require a static-file hosting story (paths, caching, version matching) on top of the plugin assembly that already carries everything else.

## Decision

The UI builds with `vite build`, collapses to a single self-contained HTML file through `vite-plugin-singlefile`, and is finalized for embedding by `scripts/finalize-ui.mjs`. Type safety is enforced up front with `svelte-check`. The resulting resource travels inside the plugin assembly: one assembly, one UI, always matching the backend it ships with.

## Rejected

- Serving the UI as loose static files next to the plugin assembly.
- Versioning the UI independently from the server it inspects.

## Consequences

Deploying AuthKit never involves a separate static-file step, and the UI version cannot drift from the inspected server. The cost is build-time coupling: UI changes require rebuilding the plugin assembly.

## Related

- [ADR-020](./020-devtools-plugin.md) - DevTools plugin hosting the UI
- [ADR-009](./009-dynamic-plugin-discovery.md) - plugin discovery loading the assembly

[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./026-plugin-authentication-and-authorization-hooks.md) | [Next](./028-plugin-contract-and-dynamic-loading-architecture.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ADR-017: Plugin Contract and Dynamic Loading Architecture
# ADR-028: Plugin Contract and Dynamic Loading Architecture

## Context

Expand Down Expand Up @@ -110,10 +110,10 @@ The `PluginLoader.LoadPlugins()` method signature changed from 2 to 3 required p
Plugins

### Previous
ADR-016: Using Marten and Wolverine as the host infrastructure
ADR-027: Compile The DevTools UI From Modular TypeScript Into A Single Embedded Resource

### Next
N/A (latest in collection)
ADR-029: Expose Structured And Cancellable Plugin Health Results

## Consequences

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next]()
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./028-plugin-contract-and-dynamic-loading-architecture.md) | [Next]()

# [ADR-025] Expose Structured And Cancellable Plugin Health Results
# [ADR-029] Expose Structured And Cancellable Plugin Health Results

*2026-09* | Status: accepted

**Tag:** #adr_025
**Tag:** #adr_029

**Date:** 2026-09-13

Expand Down Expand Up @@ -71,4 +71,4 @@ contract validator invokes the new method and rejects an empty result collection
- [Issue #14](https://github.com/AuthKits/AuthKit.Server/issues/14) - structured plugin health result
- [Issue #15](https://github.com/AuthKits/AuthKit.Server/issues/15) - multiple results and cancellation

[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./024-plugin-lifecycle-and-hosted-services.md) | [Next]()
[ADR Home](../../README.md) | [Category Index](./README.md) | [Previous](./028-plugin-contract-and-dynamic-loading-architecture.md) | [Next]()
3 changes: 2 additions & 1 deletion Docs/ADR/README.md → Docs/content/en/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ The table below shows the architecture areas and their current scope.
| [ADR-014](./014-error-responses-via-middleware.md) | Render HTTP Errors As RFC 7807 Problem Details Via Middleware | Host | accepted | 2026-08-26 |
| [ADR-015](./015-keycloak-external-jwt-authority.md) | Use Keycloak As The External JWT Authority | Host | accepted | 2026-08-26 |
| [ADR-016](./016-marten-and-wolverine-infrastructure.md) | Use Marten And Wolverine As Host Infrastructure | Host | accepted | 2026-08-26 |
| [ADR-017](./017-Plugin-Contract-and-Dynamic-Loading-Architecture.md) | Define The Plugin Contract And Dynamic Loading Architecture | Plugins | accepted | 2026-09-11 |
| [ADR-017](./017-api-key-credential-extraction-strategies.md) | Define API Key Credential Extraction Strategies | Host | accepted | 2026-09-11 |
| [ADR-018](./018-security-scheme-contract-explicit-handling.md) | Handle Security Scheme Contract Values Explicitly | Plugins | accepted | 2026-09-11 |
| [ADR-019](./019-plugin-metadata-attribute.md) | Declare Plugin Identity Through The PluginMetadata Attribute | Plugins | accepted | 2026-09-11 |
Expand All @@ -78,6 +77,8 @@ The table below shows the architecture areas and their current scope.
| [ADR-025](./025-plugin-options-openapi-and-marten-integrations.md) | Keep Plugin Options, OpenAPI, And Marten Integrations Explicit | Plugins | accepted | 2026-09-12 |
| [ADR-026](./026-plugin-authentication-and-authorization-hooks.md) | Configure Plugin Authentication And Authorization Through Host Security Infrastructure | Plugins | accepted | 2026-09-12 |
| [ADR-027](./027-devtools-ui-typescript.md) | Compile The DevTools UI From Modular TypeScript Into A Single Embedded Resource | Plugins | accepted | 2026-09-16 |
| [ADR-028](./028-plugin-contract-and-dynamic-loading-architecture.md) | Define The Plugin Contract And Dynamic Loading Architecture | Plugins | accepted | 2026-09-11 |
| [ADR-029](./029-structured-plugin-health-contract.md) | Expose Structured And Cancellable Plugin Health Results | Plugins | accepted | 2026-09-13 |

## Relationships Between Areas

Expand Down
113 changes: 113 additions & 0 deletions Docs/content/en/guide/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Configuration

AuthKit is configured through environment variables and `appsettings.json`.

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `KEYCLOAK_URL` | Keycloak base URL | `http://keycloak:8080` |
| `KEYCLOAK_REALM` | Keycloak realm | `authz` |
| `KEYCLOAK_CLIENT_ID` | Keycloak client ID | `workspace-authz` |
| `KEYCLOAK_CLIENT_SECRET` | Keycloak client secret | _required_ |
| `DEV_CERT_PATH` | Path to dev HTTPS certificate (pfx) | `/root/certs/devcert.pfx` |
| `DEV_CERT_PASSWORD` | Password for dev certificate | _empty_ |
| `DEV_CERT_PORT_REST` | Kestrel REST listener port | `5000` |
| `DEV_CERT_PORT_GRPC` | Kestrel gRPC listener port | `5001` |

## Key Configuration Sections

### Connection Strings

```json
{
"ConnectionStrings": {
"Marten": "Host=authdev-db;Port=5432;Database=AuthDev;Username=postgres;Password=postgres"
}
}
```

### Encryption

```json
{
"Encryption": {
"AES_MASTER_KEY": "your-256-bit-base64-encoded-aes-master-key"
}
}
```

### Server

```json
{
"Server": {
"Host": "http://0.0.0.0:8080",
"Issuer": "https://authkit.local"
}
}
```

### AuthKit Settings

Per-plugin scoped sections under `Plugins` (e.g. DevTokens):

```json
{
"Plugins": {
"authkit.devtokens": {
"MaxDeveloperTokens": 3
}
},
"AuthKit": {
"PluginsPath": "./plugins"
}
}
```

### Service Discovery

```json
{
"ServiceDiscovery": {
"EnableLogging": false,
"AllowedNamespaces": [".Services", ".Repositories"],
"ExcludedNamespaces": [".DTO", ".Entity"],
"AllowedLayers": ["Core", "Host"],
"SkipInterfaces": true,
"SkipExceptions": true,
"Lifetime": "Scoped"
}
}
```

## Wolverine

Command/query handling, validation, and durability live on their own page: [Wolverine](/infrastructure/wolverine/).

## Marten

Document store, plugin schemas, and sessions live on their own page: [Marten + PostgreSQL](/infrastructure/marten/).

## Custom Configuration

Create an `appsettings.Production.json` for production settings:

```json
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"Plugins": {
"authkit.devtokens": {
"MaxDeveloperTokens": 10
}
}
}
```

:::note
The `appsettings.json` in the project root provides sensible defaults for development.
:::
Loading
Loading