Skip to content

Commit ebe92d4

Browse files
committed
update docs, introduce home page for documentation, bump snapshot version
1 parent 70d1063 commit ebe92d4

6 files changed

Lines changed: 117 additions & 3 deletions

File tree

docs/_data/navigation.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
main:
22
- title: "Documentation"
3-
url: /introduction/
3+
url: /documentation/
44
- title: "Blog"
55
url: /blog/
66
- title: "Contact"
@@ -19,6 +19,10 @@ docs:
1919
url: /write-operations/
2020
- title: "Request/Response Examples"
2121
url: /request-response-examples/
22+
- title: "AI-Assisted Development"
23+
children:
24+
- title: "AI-Assisted Development"
25+
url: /ai-assisted-development/
2226
- title: "Framework Internals"
2327
children:
2428
- title: "Project Structure"

docs/ai-assisted-development.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: "AI-Assisted Development"
3+
permalink: /ai-assisted-development/
4+
---
5+
6+
JsonApi4j is built to work well with AI coding agents. The repository ships two first-class,
7+
version-controlled assets — one for people **building apps with** the framework, and one for people
8+
**contributing to** it — so your AI assistant has accurate, framework-specific context instead of
9+
guessing from generic Java knowledge.
10+
11+
### Building apps with the framework — the Claude Code plugin
12+
13+
The project publishes an official **[Claude Code](https://claude.com/claude-code) plugin** that bundles
14+
the `jsonapi4j` skill. Once installed, your agent knows how to model and build a JSON:API service the
15+
framework's way.
16+
17+
Install it from any project that depends on JsonApi4j:
18+
19+
```text
20+
/plugin marketplace add MoonWorm/jsonapi4j
21+
/plugin install jsonapi4j@jsonapi4j
22+
```
23+
24+
The first command registers this repository as a plugin marketplace; the second installs the plugin
25+
from it. The skill **auto-activates** whenever you work in a codebase that uses JsonApi4j — detected
26+
from imports under `pro.api4.jsonapi4j`, the `@JsonApiResource` / `@JsonApiRelationship` /
27+
`@JsonApiResourceOperation` annotations, or a `/jsonapi` root path.
28+
29+
It covers the full surface a typical service needs:
30+
31+
- **Resources, relationships, and operations** — the three-part anatomy, lightweight relationship refs
32+
vs. full DTOs, and the composite operation interfaces.
33+
- **Compound documents**`?include=` resolution, `cd.mapping`, and multi-hop traversal.
34+
- **Performance** — N+1-safe relationship resolution, batch operations, and `filter[id]` batching.
35+
- **Validation, access control, and configuration** — the fluent validators, per-field authorization,
36+
and the `jsonapi4j.*` properties.
37+
- **Testing** — black-box RestAssured patterns, including the port setup that compound-document tests
38+
require.
39+
40+
The skill uses progressive disclosure — a lean entry point plus on-demand reference files — and points
41+
at real, runnable code in the framework's [sample apps](https://github.com/MoonWorm/jsonapi4j/tree/main/examples)
42+
and the pages on this site. You don't need to check out the framework source: add the dependency, install
43+
the plugin, and build in your own repository.
44+
45+
### Contributing to the framework — AGENTS.md
46+
47+
For working **on** JsonApi4j itself, the repository root carries a committed
48+
[`AGENTS.md`](https://github.com/MoonWorm/jsonapi4j/blob/main/AGENTS.md) (with a nested
49+
[`docs/AGENTS.md`](https://github.com/MoonWorm/jsonapi4j/blob/main/docs/AGENTS.md) for documentation-site
50+
work). [`AGENTS.md`](https://agents.md/) is an emerging cross-tool standard, so the same context is
51+
picked up by Claude Code, Cursor, GitHub Copilot, Codex, and other agents.
52+
53+
It is a lean router, not a manual — it gives an agent the few things it can't cheaply derive:
54+
55+
- **Build, test, and verify commands** — including the policy of keeping the shared test suite green
56+
across all three sample apps (Spring Boot, Quarkus, Servlet).
57+
- **A module map** and the dependency direction.
58+
- **Load-bearing conventions** — commit format, the extension points (overridable default beans, the
59+
plugin SPI), and a handful of non-obvious gotchas.
60+
- **Pointers** to the deeper docs, so it knows where to read more.
61+
62+
### Why it matters
63+
64+
The value isn't "the AI writes your API for you." It's that an agent equipped with this context produces
65+
**consistent, spec-compliant code that follows the framework's idioms** — relationship refs instead of
66+
heavy DTOs, includes wired through `cd.mapping`, N+1-safe resolution, and the correct test setup —
67+
rather than plausible-looking Java that fights the framework. Less review friction, fewer subtle bugs.
68+
69+
### Links
70+
71+
- Plugin source: [`claude-code-plugin/`](https://github.com/MoonWorm/jsonapi4j/tree/main/claude-code-plugin)
72+
- Contributor context: [`AGENTS.md`](https://github.com/MoonWorm/jsonapi4j/blob/main/AGENTS.md)
73+
- Repository: [github.com/MoonWorm/jsonapi4j](https://github.com/MoonWorm/jsonapi4j)

docs/documentation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "Documentation"
3+
permalink: /documentation/
4+
layout: single
5+
sidebar:
6+
classes: wide
7+
---
8+
9+
Welcome to the JsonApi4j documentation. New here? Start with the
10+
**[Quick Start Guide](/getting-started/)**. Otherwise, browse the full table of contents below.
11+
12+
{% for group in site.data.navigation.docs %}
13+
## {{ group.title }}
14+
15+
{% for item in group.children %}- [{{ item.title }}]({{ item.url }})
16+
{% endfor %}
17+
{% endfor %}

docs/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ header:
77
actions:
88
- label: "Get Started"
99
url: /getting-started/
10+
- label: "Browse Docs"
11+
url: /documentation/
1012
- label: "View on GitHub"
1113
url: "https://github.com/MoonWorm/jsonapi4j"
1214
- label: "Maven Central"
@@ -36,6 +38,17 @@ feature_row_dx:
3638
excerpt: "No JPA or Hibernate required. Works with SQL, NoSQL, REST clients, in-memory stores, or any data source you bring."
3739
- title: "Parallel Execution"
3840
excerpt: "Relationship resolution, compound document fetching, and batch operations run concurrently. Supports virtual threads (Project Loom) for maximum throughput."
41+
42+
feature_row_ai:
43+
- title: "Official Claude Code Plugin"
44+
excerpt: "Install the plugin and your AI agent instantly knows how to design resources, relationships, operations, compound documents, validation, and tests — right in your own project."
45+
url: /ai-assisted-development/
46+
btn_label: "Learn More"
47+
btn_class: "btn--primary"
48+
- title: "Works With Any AI Tool"
49+
excerpt: "A committed `AGENTS.md` gives Claude Code, Cursor, GitHub Copilot, and Codex the same project context — build commands, conventions, and module map."
50+
- title: "Knows the Idioms"
51+
excerpt: "Not generic Java scaffolding — agents follow framework patterns: lightweight relationship refs, N+1-safe includes, `cd.mapping`, and the right testing setup."
3952
---
4053

4154
## Choose Your Stack
@@ -74,6 +87,13 @@ feature_row_dx:
7487

7588
{% include feature_row id="feature_row_dx" %}
7689

90+
<div class="dark-band" markdown="0">
91+
<h2>Built to Pair With Your AI Agent</h2>
92+
<p class="dark-band__subtitle">An official Claude Code plugin and a cross-tool <code>AGENTS.md</code> — so your AI assistant builds spec-compliant APIs the framework's way. <a href="/ai-assisted-development/">Learn more →</a></p>
93+
</div>
94+
95+
{% include feature_row id="feature_row_ai" %}
96+
7797
<div class="pipeline-band" markdown="0">
7898
<h3>Request Processing Pipeline</h3>
7999
<p>Every incoming API request flows through a well-defined <strong>processing pipeline</strong> — from data retrieval through relationship resolution to final document composition. At each stage, registered <a href="/plugins/">plugins</a> can inspect, mutate, or short-circuit the request using the Visitor pattern.</p>

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</modules>
2020

2121
<properties>
22-
<jsonapi4j.version>1.8.5</jsonapi4j.version>
22+
<jsonapi4j.version>1.8.6-SNAPSHOT</jsonapi4j.version>
2323

2424
<jakarta.servlet-api.version>6.1.0</jakarta.servlet-api.version>
2525

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<properties>
5454
<!--project revision-->
55-
<revision>1.8.5</revision>
55+
<revision>1.8.6-SNAPSHOT</revision>
5656

5757
<!--spting/web-->
5858
<spring.version>5.3.14</spring.version>

0 commit comments

Comments
 (0)