Skip to content

Commit f009301

Browse files
authored
Merge pull request #145 from amikos-tech/feature/documentation-site
Phase 6: Documentation Site
2 parents 8fbc6cb + 02e8447 commit f009301

63 files changed

Lines changed: 5940 additions & 18 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: docs-deploy
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.x'
28+
cache: pip
29+
cache-dependency-path: docs/requirements.txt
30+
31+
- name: Install MkDocs dependencies
32+
run: |
33+
python -m venv .venv
34+
. .venv/bin/activate
35+
python -m pip install -r docs/requirements.txt
36+
37+
- name: Build MkDocs site
38+
run: |
39+
. .venv/bin/activate
40+
python -m mkdocs build --config-file docs/mkdocs.yml --site-dir site
41+
42+
- uses: actions/setup-java@v4
43+
with:
44+
java-version: '8'
45+
distribution: 'temurin'
46+
cache: maven
47+
48+
- name: Generate Javadoc
49+
run: mvn --no-transfer-progress compile javadoc:javadoc
50+
51+
- name: Merge Javadoc into site
52+
run: |
53+
mkdir -p site/api
54+
cp -R target/site/apidocs/. site/api/
55+
56+
- name: Upload site artifact
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: docs-site
60+
path: site
61+
if-no-files-found: error
62+
63+
deploy:
64+
needs: build
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: write
68+
steps:
69+
- name: Download site artifact
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: docs-site
73+
path: site
74+
75+
- name: Deploy combined docs site
76+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
77+
with:
78+
github_token: ${{ secrets.GITHUB_TOKEN }}
79+
publish_dir: site

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ fabric.properties
5757
.idea/httpRequests
5858
.idea/caches/build_file_checksums.ser
5959
**.env
60+
61+
### Claude Code ###
62+
.claude/worktrees/
63+
64+
### MkDocs ###
65+
docs/site/

.planning/PROJECT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ The repository already contains substantial v2 implementation under `src/main/ja
6161
| Keep Java 8 + synchronous API as hard constraints for this milestone | Minimizes adoption friction and migration risk | — Pending |
6262

6363
---
64-
*Last updated: 2026-03-20 — Phase 1 complete (ERGO-01, ERGO-02). Row-based result access and WhereDocument DSL shipped. Next: Phase 2 (Collection API Extensions).*
64+
*Last updated: 2026-03-25 — Phase 6 complete (DOC-01 through DOC-06). Documentation site with 12 guide pages, MkDocs Material theme, CI deployment, and Javadoc integration shipped. Next: Phase 7 (Working Examples).*

.planning/ROADMAP.md

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ Decimal phases appear between their surrounding integers in numeric order.
1717
- [x] **Phase 3: Search API** — Implement the Search endpoint with ranking expressions, field projection, groupBy, and read levels. (completed 2026-03-22)
1818
- [ ] **Phase 4: Embedding Ecosystem** — Add sparse/multimodal interfaces, reranking, new providers, and embedding registry.
1919
- [ ] **Phase 5: Cloud Integration Testing** — Build cloud parity test suites for search, schema/index, and array metadata. (gap closure in progress)
20-
- [ ] **Phase 6: Documentation Site** — Build a rich documentation site with API surfaces, examples, and feature guides (similar to chroma-go docs).
20+
- [x] **Phase 6: Documentation Site** — Build a rich documentation site with API surfaces, examples, and feature guides (similar to chroma-go docs). (completed 2026-03-24)
2121
- [ ] **Phase 7: Working Examples** — Add full working examples for all major features (similar to chroma-go examples/).
22+
- [ ] **Phase 8: API DX Improvements** — Add Consumer lambda overloads for collection creation and Schema convenience factories (#143, #144).
23+
- [ ] **Phase 9: Logging Bridges** — Implement SLF4J and JUL bridges for ChromaLogger (#141, #142).
24+
- [ ] **Phase 10: Documentation Update** — Refresh docs site with DX improvements, logging bridges, and any API changes from Phases 8-9.
2225

2326
## Phase Details
2427

@@ -118,13 +121,23 @@ Phase 4 can execute in parallel with Phases 1-3 (independent).
118121

119122
### Phase 6: Documentation Site
120123

121-
**Goal:** Build a rich documentation site (similar to amikos-tech/chroma-go) covering all library features, API surfaces, and usage examples.
122-
**Requirements**: TBD
124+
**Goal:** Build a rich documentation site (similar to amikos-tech/chroma-go) covering all library features, API surfaces, and usage examples, deployed to java.chromadb.dev via GitHub Pages.
125+
**Requirements**: [DOC-01, DOC-02, DOC-03, DOC-04, DOC-05, DOC-06]
123126
**Depends on:** Phases 1-5 (documents features built in earlier phases)
124-
**Plans:** 0 plans
127+
**Success Criteria** (what must be TRUE):
128+
1. MkDocs Material site builds with `--strict` flag without errors.
129+
2. All 12 guide pages have rich content with snippet-included Java code examples (v2 API only).
130+
3. GitHub Actions workflow deploys MkDocs + Javadoc to GitHub Pages on push to main.
131+
4. Custom domain java.chromadb.dev configured via CNAME file.
132+
5. Examples section stubbed with 7 topic directories for Phase 7.
133+
6. User visually approves the site via local `mkdocs serve`.
134+
**Plans:** 4/4 plans complete
125135

126136
Plans:
127-
- [ ] TBD (run /gsd:plan-phase 6 to break down)
137+
- [x] 06-01-PLAN.md — MkDocs scaffold, config, homepage, CI workflow, Javadoc plugin upgrade
138+
- [x] 06-02-PLAN.md — Core guide pages (client, auth, records, filtering, search, embeddings) with snippet files
139+
- [x] 06-03-PLAN.md — Advanced guide pages (cloud-features, schema, id-generators, transport, logging, migration) with snippet files
140+
- [x] 06-04-PLAN.md — Examples section stubs, nav expansion, and visual verification checkpoint
128141

129142
### Phase 7: Working Examples
130143

@@ -135,3 +148,50 @@ Plans:
135148

136149
Plans:
137150
- [ ] TBD (run /gsd:plan-phase 7 to break down)
151+
152+
### Phase 8: API DX Improvements
153+
154+
**Goal:** Reduce builder boilerplate in the most common API paths — collection creation gets Consumer lambda overloads, and Schema gets mid-level factory methods to flatten deep nesting.
155+
**Requirements**: TBD
156+
**Depends on:** Phase 6 (docs merged first)
157+
**Issues:** #143, #144
158+
**Success Criteria** (what must be TRUE):
159+
1. User can call `client.getOrCreateCollection("name", opts -> opts.embeddingFunction(ef))` without explicit `.builder()/.build()`.
160+
2. User can create a common HNSW schema with a single factory method instead of 5 nested builders.
161+
3. Existing `.builder().build()` API remains unchanged for backwards compatibility.
162+
4. All new overloads have unit tests.
163+
**Plans:** 0 plans
164+
165+
Plans:
166+
- [ ] TBD (run /gsd:plan-phase 8 to break down)
167+
168+
### Phase 9: Logging Bridges
169+
170+
**Goal:** Provide out-of-the-box ChromaLogger implementations for SLF4J (covers Logback) and java.util.logging so users get transport-level logging without writing their own bridge.
171+
**Requirements**: TBD
172+
**Depends on:** Nothing (independent)
173+
**Issues:** #141, #142
174+
**Success Criteria** (what must be TRUE):
175+
1. `Slf4jChromaLogger.create()` routes ChromaLogger events to SLF4J with structured fields.
176+
2. `JulChromaLogger.create()` routes ChromaLogger events to java.util.logging.
177+
3. SLF4J is an optional/provided dependency (not pulled transitively).
178+
4. Both bridges have unit tests.
179+
**Plans:** 0 plans
180+
181+
Plans:
182+
- [ ] TBD (run /gsd:plan-phase 9 to break down)
183+
184+
### Phase 10: Documentation Update
185+
186+
**Goal:** Refresh the documentation site with new API patterns from Phases 8-9 — Consumer overloads, Schema factories, logging bridge usage — and incorporate any corrections from user feedback.
187+
**Requirements**: TBD
188+
**Depends on:** Phases 8, 9
189+
**Success Criteria** (what must be TRUE):
190+
1. Guide pages updated with Consumer lambda examples alongside existing builder examples.
191+
2. Logging page updated with SLF4J and JUL bridge usage examples.
192+
3. Schema page updated with convenience factory examples.
193+
4. `mkdocs build --strict` passes.
194+
**Plans:** 0 plans
195+
196+
Plans:
197+
- [ ] TBD (run /gsd:plan-phase 10 to break down)

.planning/STATE.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
gsd_state_version: 1.0
33
milestone: v1.5
44
milestone_name: milestone
5-
status: "Phase 05 shipped — PR #140"
6-
stopped_at: Completed 05-cloud-integration-testing-05-03-PLAN.md
7-
last_updated: "2026-03-23T13:51:04.103Z"
5+
status: "Phase 06 shipped — PR #145"
6+
stopped_at: "Completed 06-04 Task 1; checkpoint:human-verify at Task 2"
7+
last_updated: "2026-04-01T10:06:39.889Z"
88
progress:
9-
total_phases: 10
10-
completed_phases: 9
11-
total_plans: 24
12-
completed_plans: 24
9+
total_phases: 14
10+
completed_phases: 12
11+
total_plans: 31
12+
completed_plans: 31
1313
---
1414

1515
# Project State
@@ -19,11 +19,11 @@ progress:
1919
See: .planning/PROJECT.md (updated 2026-03-17)
2020

2121
**Core value:** Java developers can integrate Chroma quickly and safely with a predictable, strongly-typed client that behaves consistently across environments.
22-
**Current focus:** Phase 05cloud-integration-testing
22+
**Current focus:** Phase 06documentation-site
2323

2424
## Current Position
2525

26-
Phase: 05
26+
Phase: 07
2727
Plan: Not started
2828

2929
## Performance Metrics
@@ -70,6 +70,10 @@ Plan: Not started
7070
| Phase 03-search-api P03 | 90 | 2 tasks | 7 files |
7171
| Phase 05-cloud-integration-testing P02 | 4 | 2 tasks | 1 files |
7272
| Phase 05 P03 | 5 | 1 tasks | 1 files |
73+
| Phase 06-documentation-site P01 | 3 | 2 tasks | 24 files |
74+
| Phase 06-documentation-site P03 | 7 | 2 tasks | 11 files |
75+
| Phase 06-documentation-site P02 | 4 | 2 tasks | 12 files |
76+
| Phase 06-documentation-site P04 | 5 | 1 tasks | 9 files |
7377

7478
## Accumulated Context
7579

@@ -142,6 +146,15 @@ Recent decisions affecting current work:
142146
- [Phase 05-cloud-integration-testing]: CLOUD-01 search parity tests: GroupBy results via rows() only; ReadLevel WAL uses isolated collection without polling; RRF auto-skipped with Assume.assumeTrue false documenting server limitation; filter matrix 8 sub-scenarios inline; pagination client validation throws IllegalArgumentException before HTTP
143147
- [Phase 05-cloud-integration-testing]: Embedding projection assertion loosened to accept null or [[null]]: server returns [[null]] for unselected embeddings
144148
- [Phase 05-cloud-integration-testing]: WAL read-level test uses isolated 3D collection (col) instead of 4D seedCollection to avoid dimension mismatch
149+
- [Phase 06-documentation-site]: java-examples/index.md placed inside docs_dir (docs/docs/java-examples/) — MkDocs only serves content from docs_dir; placing outside caused strict-mode build failure
150+
- [Phase 06-documentation-site]: api/ nav entry uses api/index.md placeholder so mkdocs build --strict passes; actual Javadoc deployed by CI into api/ path over this placeholder
151+
- [Phase 06-documentation-site]: maven-javadoc-plugin upgraded from 2.9.1 to 3.11.2 with doclint=none and source=8 for modern HTML5 Javadoc output and Java 8 compatibility
152+
- [Phase 06-documentation-site]: Migration page uses pymdownx.tabbed for v1/v2 side-by-side examples — v1 code is the designated exception per D-11; all other pages are v2-only
153+
- [Phase 06-documentation-site]: ChromaLoggers is package-private; logging docs expose only ChromaLogger interface and ChromaLogger.noop() as the public API surface
154+
- [Phase 06-documentation-site]: SearchExample uses Search.builder() + collection.search().searches(...) pattern to expose full Knn/Rrf/Search type hierarchy
155+
- [Phase 06-documentation-site]: All guide pages use --8<-- named section snippet inclusions (no inline copy-pasted code blocks) per D-09
156+
- [Phase 06-documentation-site]: Examples stubs use 'coming soon' admonition with link to relevant guide page — Phase 7 fills content without touching nav config
157+
- [Phase 06-documentation-site]: mkdocs.yml Examples nav uses section syntax with java-examples/index.md as section index per navigation.indexes feature
145158

146159
### Roadmap Evolution
147160

@@ -159,6 +172,6 @@ None.
159172

160173
## Session Continuity
161174

162-
Last session: 2026-03-23T13:27:48.062Z
163-
Stopped at: Completed 05-cloud-integration-testing-05-03-PLAN.md
175+
Last session: 2026-03-24T15:42:20.817Z
176+
Stopped at: Completed 06-04 Task 1; checkpoint:human-verify at Task 2
164177
Resume file: None

.planning/phases/06-documentation-site/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)