Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
fb672f4
initial reference section creation and configuration
Ethan-Arrowood Feb 19, 2026
78eca4b
v4 docs reference plan init
Ethan-Arrowood Feb 19, 2026
ad55dce
update plans
Ethan-Arrowood Feb 19, 2026
95752e6
create migration context dir
Ethan-Arrowood Feb 19, 2026
241f8cb
Configure build system for major-version-reorg branch
Ethan-Arrowood Feb 19, 2026
021d800
docs: migrate CLI section to v4 consolidated reference (#439)
Ethan-Arrowood Feb 23, 2026
af96a72
GraphQL Querying Migration (#440)
Ethan-Arrowood Feb 24, 2026
2c59970
Studio Migration (#441)
Ethan-Arrowood Feb 24, 2026
c6c99e5
Fastify Routes Migration (#442)
Ethan-Arrowood Feb 24, 2026
d3af5dd
format
Ethan-Arrowood Feb 24, 2026
c204af0
update map progress statusses
Ethan-Arrowood Feb 24, 2026
9bee99e
update workflow to do preview deploys for new files paths
Ethan-Arrowood Feb 24, 2026
dc64a23
Merge remote-tracking branch 'origin/main' into major-version-reorg
Ethan-Arrowood Feb 24, 2026
cd47bee
Environment Variables Migration (#444)
Ethan-Arrowood Feb 25, 2026
fa4d2f3
HTTP section migration (#446)
Ethan-Arrowood Feb 26, 2026
2d5d293
Static Files Migration (#445)
Ethan-Arrowood Mar 2, 2026
5271417
Logging Section Migration (#450)
Ethan-Arrowood Mar 4, 2026
5fa1767
Analytics Section Migration (#451)
Ethan-Arrowood Mar 10, 2026
e46a359
MQTT Section Migration (#449)
Ethan-Arrowood Mar 11, 2026
3758021
Security and Users & Roles Sections Migration (#452)
Ethan-Arrowood Mar 17, 2026
372eec3
update plan docs
Ethan-Arrowood Mar 17, 2026
77b2120
correct links
Ethan-Arrowood Mar 17, 2026
91181d8
clean up version annotations
Ethan-Arrowood Mar 17, 2026
ac8b9c9
REST Section Migration (#457)
Ethan-Arrowood Mar 18, 2026
3508aab
Database Section Migration (#458)
Ethan-Arrowood Mar 26, 2026
625fa2b
Resources Section Migration (#459)
Ethan-Arrowood Mar 27, 2026
273d839
follow up edits from reviews
Ethan-Arrowood Mar 27, 2026
7359fcb
Components Section Migration (#460)
Ethan-Arrowood Mar 27, 2026
ef09307
Replication Section Migration (#461)
Ethan-Arrowood Mar 27, 2026
4f7fc1e
Operations API Migration (#462)
Ethan-Arrowood Mar 27, 2026
ffc57e0
Configuration Section Migration (#463)
Ethan-Arrowood Mar 27, 2026
92ef6d5
update plan docs and add custom functions and sql pages
Ethan-Arrowood Mar 27, 2026
4f3fa63
clean up progress before starting on other fixes
Ethan-Arrowood Mar 30, 2026
dd8fc4f
Link resolution (#467)
Ethan-Arrowood Mar 30, 2026
13e1f53
Cross reference updates (#468)
Ethan-Arrowood Mar 30, 2026
99bf4d8
checkpoint before deleting old content files
Ethan-Arrowood Mar 30, 2026
4876445
delete old docs content
Ethan-Arrowood Mar 30, 2026
0ebea43
copy new content to reference/
Ethan-Arrowood Mar 30, 2026
5e84ecf
finish redirects
Ethan-Arrowood Mar 31, 2026
7c62241
remove paginator for reference section
Ethan-Arrowood Mar 31, 2026
2604af4
Merge remote-tracking branch 'origin' into major-version-reorg
Ethan-Arrowood Mar 31, 2026
2a4da0c
touch up sidebar styles
Ethan-Arrowood Mar 31, 2026
a7fe14e
copy to v5 sidebar
Ethan-Arrowood Mar 31, 2026
8f740b7
add index pages
Ethan-Arrowood Mar 31, 2026
9aee72d
format
Ethan-Arrowood Mar 31, 2026
21b72c9
start on some new dev docs
Ethan-Arrowood Mar 31, 2026
e32a2bf
add version badge and update docs
Ethan-Arrowood Mar 31, 2026
99da88e
update dev docs for new VersionBadge
Ethan-Arrowood Mar 31, 2026
add5740
fix config
Ethan-Arrowood Mar 31, 2026
256de66
fix config to throw on broken links
Ethan-Arrowood Mar 31, 2026
7085d65
update contrib and simplify readme
Ethan-Arrowood Mar 31, 2026
77065b7
add ai generated retro for future reflection
Ethan-Arrowood Mar 31, 2026
918f82c
remove planning documents
Ethan-Arrowood Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/workflows/pr-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types: [opened, synchronize, reopened, closed]
# Temporarily disable the file filter so we get preview deploys for reference docs migration PRs
# paths:
# - 'reference/**'
# - 'reference_versioned_docs/**'
#. - 'reference_versioned_sidebars/**'
# - 'reference_versions.json'
# - 'docs/**'
# - 'fabric/**'
# - 'learn/**'
Expand Down
193 changes: 186 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,203 @@ npm run dev
4. Format your code:

```bash
npm run format
npm run format:write
```

5. Push changes to a branch and create a pull request

## Site Organization

This site is powered by Docusaurus and leverages the file-system based versioning capabilities of the framework.
This site is powered by Docusaurus. The documentation is split into four distinct sections, each serving a different purpose and configured as its own Docusaurus plugin instance.

There are two directories where actual documentation content lives.
### The Four Sections

The first, `docs/` contains the "latest" or "next" version of the documentation. We do not publish or render this directory, and the content here is meant to represent on-going development.
| Section | URL | Purpose |
| ----------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Learn** | `/learn` | Guides, tutorials, and conceptual introductions. How-to content that walks users through a goal. |
| **Reference** | `/reference/vN` | Complete technical reference for every feature, API, configuration option, and operation. Versioned by major Harper version. |
| **Release Notes** | `/release-notes` | Changelog for every Harper release. Organized by major version codename (e.g. `v4-tucker`). |
| **Fabric** | `/fabric` | Documentation for Harper's managed cloud platform. Separate from the core Harper product docs. |

The second, `versioned_docs` contains all of the specific Harper version documentation organized by minor version. The latest version within this directory maps to the default path on the site. For example, if the latest version is `versioned_docs/version-4.6/` then the page https://docs.harperdb.io/docs/getting-started/first-harper-app maps to the file `site/versioned_docs/version-4.6/getting-started/first-harper-app.md`. And for the previous 4.5 version the page http://localhost:3000/docs/4.5/getting-started/first-harper-app can be found at `site/versioned_docs/version-4.5/getting-started/first-harper-app.md`.
**Rule of thumb**: if it explains _how something works_ or _what something does_, it belongs in Reference. If it explains _how to accomplish something_, it belongs in Learn. New feature documentation always goes in Reference first; Learn guides can link to it.

Depending on the specific change, you may need to make updates to similar files across multiple version directories as well as the root `docs/`.
### Section Configuration Map

The site organization is ever evolving so make sure to revisit this file over time to stay up to date with the latest structure.
Each section maps to specific source directories and config files:

#### Learn

| Item | Location |
| ------------- | ------------------------------------------ |
| Content | `learn/` |
| Sidebar | `sidebarsLearn.ts` |
| Plugin config | `docusaurus.config.ts` → plugin id `learn` |

Learn is non-versioned. All content lives directly in `learn/` organized into categories that match the sidebar.

#### Reference

| Item | Location |
| --------------------- | ------------------------------------------------------- |
| Current (v5) content | `reference/` |
| Archived (v4) content | `reference_versioned_docs/version-v4/` |
| Current sidebar | `sidebarsReference.ts` |
| v4 sidebar | `reference_versioned_sidebars/version-v4-sidebars.json` |
| Version list | `reference_versions.json` |
| Plugin config | `docusaurus.config.ts` → plugin id `reference` |

Reference is versioned by major Harper version. The `reference_versions.json` file lists all archived versions — currently `["current", "v4"]`. The `current` version maps to `v5` (the in-progress next major) and is not published; `v4` is the default displayed version.

To cut a new version snapshot (e.g. when v5 ships), run:

```bash
node scripts/cut-version.js
```

#### Release Notes

| Item | Location |
| ------------- | -------------------------------------------------- |
| Content | `release-notes/` |
| Sidebar | `sidebarsReleaseNotes.ts` |
| Plugin config | `docusaurus.config.ts` → plugin id `release-notes` |

Release notes are non-versioned in the Docusaurus sense — major version organization is handled manually via subdirectories (`v4-tucker/`, `v3-monkey/`, etc.). The sidebar uses `autogenerated` directives so new files are picked up automatically. See the [Release Notes Process](#release-notes-process) section for the full workflow.

#### Fabric

| Item | Location |
| ------------- | ------------------------------------------- |
| Content | `fabric/` |
| Sidebar | `sidebarsFabric.ts` |
| Plugin config | `docusaurus.config.ts` → plugin id `fabric` |

Fabric is non-versioned. It documents the managed cloud platform independently of the Harper core product.

---

### Reference Section Structure

The Reference section is organized as a flat list of feature-based sections — no deep nesting. Each top-level section corresponds to one Harper feature or subsystem.

#### Section Layout

Every section follows this pattern:

```
reference/
└── {feature}/
├── overview.md # General introduction, architecture, concepts
├── configuration.md # Config options specific to this feature (if applicable)
├── api.md # JS/programmatic API reference (if applicable)
└── operations.md # Operations API operations for this feature (if applicable)
```

Not every section needs all four files — some features only warrant an `overview.md`. The filenames above are conventions, not requirements.

#### Section Order

Sections are ordered in the sidebar by who needs them first:

1. **Data & Application** — Database, Resources, Components
2. **Access & Security** — REST, HTTP, Security, Users & Roles
3. **Setup & Operation** — CLI, Configuration, Operations API
4. **Features** — Logging, Analytics, MQTT, Static Files, Environment Variables, Replication, GraphQL Querying, Studio, Fastify Routes
5. **Legacy** — Deprecated or discouraged features

#### Sidebar Headers

Reference sidebar headers use `className: "reference-category-header"` for compact styling. This is set on each category entry in the sidebar config. Do not use `learn-category-header` in reference sidebars.

#### Legacy Section

Deprecated or discouraged features belong in `reference/legacy/` (current) or `reference_versioned_docs/version-v4/legacy/` (v4). Each legacy page should briefly explain what the feature was and direct users to the modern alternative.

---

### Version Annotations

Because the Reference section consolidates all minor versions of a major into one document, features are annotated inline to indicate when they were introduced or changed.

Use the `<VersionBadge>` component. It is registered globally and requires no import in `.md` or `.mdx` files.

```mdx
<VersionBadge version="v4.3.0" />
<VersionBadge type="changed" version="v4.5.0" />
<VersionBadge type="deprecated" version="v4.2.0" />
```

The `type` prop defaults to `"added"`, so the most common case is just `version`. Place the badge on its own line directly below the heading it describes:

**New feature:**

```mdx
## Relationships

<VersionBadge version="v4.3.0" />

The `@relation` directive allows you to define relationships between tables...
```

**Changed behavior:**

```mdx
### Default Port

<VersionBadge type="changed" version="v4.5.0" />

The default MQTT port changed from 9925 to 9933.
In previous versions of v4, the default was 9925.
```

**Deprecated feature:**

```mdx
## SQL Querying

<VersionBadge type="deprecated" version="v4.2.0" />

SQL is still supported but discouraged. See [Database](../database/overview.md) for modern alternatives.
```

**Configuration option** (inline in a list):

```mdx
- `logger.level` — Log level; _Default_: `"info"` (Added in: v4.1.0)
```

For inline config option annotations inside list items, plain text `(Added in: vX.Y.Z)` is fine — using the component mid-sentence is awkward. Reserve `<VersionBadge>` for standalone placement after headings.

If the introduction version is inferred rather than confirmed by release notes, append a note:

```mdx
<VersionBadge version="v4.3.0" /> (inferred from version comparison, needs verification)
```

## Known Issues

### `docusaurus serve` 404s on `/docs/4.X` paths

`docusaurus serve` uses `serve-handler`, which treats ending URL path segments containing a singular dot (e.g. `4.6`) as file extensions rather than directory names. This causes `/docs/4.6` to 404 locally even though the redirect page exists at `build/docs/4.6/index.html`. This doesn't apply to nested paths such as `/docs/4.6/developers`.

A fix has been submitted upstream at https://github.com/vercel/serve-handler/pull/230. Once it merges and Docusaurus upgrades its dependency, the local patch can be removed.

In the meantime, if you need to test these redirects locally, apply a change in `node_modules/serve-handler/src/index.js` around line 608 where you clear the `stats` variable from `lstat` if it is a directory so it falls through to the nested `index.html`.

```js
if (path.extname(relativePath) !== '') {
try {
stats = await handlers.lstat(absolutePath);
if (stats && stats.isDirectory()) {
stats = null;
}
} catch (err) {
if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') {
return internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
}
}
}
```

## Release Notes Process

Expand Down
81 changes: 1 addition & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Harper Documentation

Documentation website for [Harper](https://harpersystems.dev), a fullstack, serverful Node.js application platform.
Documentation website for [Harper](https://harper.fast), a fullstack, serverful Node.js application platform.

Powered by [Docusaurus](https://docusaurus.io/).

Expand All @@ -11,82 +11,3 @@ This documentation site is open source!
If you notice something out-of-place or have suggestions for improvement, please feel free to submit an issue and/or a pull request. Make sure to follow the relevant bug report and content/feature request templates.

For more information on contributing, follow the [contribution guide](CONTRIBUTING.md).

## 🚀 Quick Start

```bash
# Install dependencies
npm install

# Start development server
npm start
# Opens at http://localhost:3000

# Build for production
npm run build

# Serve production build locally
npm run serve
```

## 📁 Directory Structure

```text
├── docs/ # Main documentation content
├── static/ # Static assets
│ ├── img/ # Site images and logos (versioned)
│ └── js/ # JavaScript files
├── src/ # React components and custom pages
│ ├── css/ # Custom styles
│ └── pages/ # Custom pages
├── versioned_docs/ # Documentation for previous versions
├── versioned_sidebars/ # Sidebar configurations for versions
├── docusaurus.config.ts # Main Docusaurus configuration
├── sidebars.ts # Sidebar navigation structure
├── redirects.ts # URL redirects configuration
└── versions.json # Version configuration
```

## 🛠️ Development

### Running Locally

```bash
# Start the development server with hot reload
npm start

# Clear cache if you encounter issues
npm run clear
```

The development server runs at `http://localhost:3000` and automatically reloads when you make changes.

### Other Commands

```bash
# Type checking
npm run typecheck

# Format code
npm run format

# Clean all generated files and caches
npm run clear
```

## 📋 Cutting a New Version

When releasing a new version of Harper documentation:

```bash
# Cut a new version (e.g., 4.7)
npm run version
```

This will:

1. Copy current docs to versioned_docs/version-4.7
2. Copy current sidebars to versioned_sidebars
3. Update versions.json

After cutting a version, update `docusaurus.config.ts` to set the new `lastVersion`.
10 changes: 0 additions & 10 deletions docs/administration/_category_.json

This file was deleted.

32 changes: 0 additions & 32 deletions docs/administration/administration.md

This file was deleted.

Loading