Skip to content

Commit 2df29d7

Browse files
committed
Add documentation site; refocus README and CONTRIBUTING; fix image tags and CI paths
- docs/: VitePress documentation site (overview, architecture, backend, frontend, operations, getting-started install/configuration, bundling, and development) with Mermaid diagrams and per-page Markdown for assistants, plus a GitHub Pages deploy workflow. - README: slimmed to a pitch that points at the docs. - CONTRIBUTING: contribution norms and DCO sign-off; development setup moved to the docs. - Issue template: drop the duplicate security-reporting entry. - CI: tag images :staging on non-release builds and reserve :latest for releases; skip the test and image workflow on docs-only changes. - AGENTS.md: documentation rules and a contribution-verification workflow.
1 parent dbb8c95 commit 2df29d7

31 files changed

Lines changed: 5516 additions & 690 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ contact_links:
33
- name: Ask a setup question
44
url: https://github.com/Ident-1090/Ident/discussions
55
about: Use Discussions for install help, receiver setup questions, and general support.
6-
- name: Report a security vulnerability
7-
url: https://github.com/Ident-1090/Ident/security/advisories/new
8-
about: Please report security issues privately.

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@ name: CI
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- "**/*.md"
8+
- ".gitignore"
9+
- ".github/ISSUE_TEMPLATE/**"
10+
- ".github/workflows/docs.yml"
511
push:
612
branches:
713
- main
814
tags:
915
- "v*"
16+
paths-ignore:
17+
- "docs/**"
18+
- "**/*.md"
19+
- ".gitignore"
20+
- ".github/ISSUE_TEMPLATE/**"
21+
- ".github/workflows/docs.yml"
1022
workflow_dispatch:
1123
inputs:
1224
version:
@@ -425,15 +437,16 @@ jobs:
425437
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
426438
tags: |
427439
type=raw,value=${{ needs.metadata.outputs.version }},enable=${{ needs.metadata.outputs.is_release == 'true' }}
428-
type=raw,value=latest
440+
type=raw,value=latest,enable=${{ needs.metadata.outputs.is_release == 'true' }}
441+
type=raw,value=staging,enable=${{ needs.metadata.outputs.is_release != 'true' }}
429442
- name: Create manifest list and push
430443
id: manifest
431444
working-directory: /tmp/digests
432445
run: |
433446
docker buildx imagetools create \
434447
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
435448
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
436-
digest="$(docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest --format '{{json .Manifest.Digest}}' | tr -d '"')"
449+
digest="$(docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} --format '{{json .Manifest.Digest}}' | tr -d '"')"
437450
echo "digest=$digest" >> "$GITHUB_OUTPUT"
438451
- name: Attest container image
439452
uses: actions/attest-build-provenance@v4

.github/workflows/docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- ".github/workflows/docs.yml"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow one concurrent deployment; let an in-progress run finish.
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
defaults:
25+
run:
26+
working-directory: docs
27+
steps:
28+
- uses: actions/checkout@v6
29+
- uses: pnpm/action-setup@v6
30+
with:
31+
version: 10.29.2
32+
- uses: actions/setup-node@v6
33+
with:
34+
node-version: 24
35+
cache: pnpm
36+
cache-dependency-path: docs/pnpm-lock.yaml
37+
- run: pnpm install --frozen-lockfile
38+
- run: pnpm docs:build
39+
env:
40+
DOCS_BASE: /Ident/
41+
- uses: actions/configure-pages@v5
42+
- uses: actions/upload-pages-artifact@v4
43+
with:
44+
path: docs/.vitepress/dist
45+
46+
deploy:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
steps:
53+
- uses: actions/deploy-pages@v4
54+
id: deployment

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ identd/web/*
2020
# Generated receiver fixture output.
2121
fixtures/receiver-sample/
2222

23+
# Documentation site.
24+
docs/node_modules/
25+
docs/.vitepress/dist/
26+
docs/.vitepress/cache/
27+
2328
# Local working instructions for this release-prep checkout.
2429
CLAUDE.local.md
2530
AGENTS.override.md

AGENTS.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,44 @@ Use placeholders such as `receiver.local`, `YOUR_LAT`, `YOUR_LON`, and
2121

2222
## Documentation Rules
2323

24+
The repository has a documentation site under `docs/`. Every change must keep it
25+
true. This is not optional: before a change is finished, verify the doc pages that
26+
describe the affected area still match the code, and update them in the same
27+
change whenever behavior, design, configuration, install shape, interfaces, or
28+
network access move. A change that leaves a doc page wrong is not complete until
29+
the page is fixed. The writing conventions for the site, including how to verify
30+
claims against the code, live in `docs/AGENTS.md`.
31+
2432
- Write for receiver owners first, then add technical detail.
2533
- Keep install commands minimal and copyable.
2634
- Mention optional network access when a feature calls outside the receiver.
2735
- Do not compare Ident directly to other projects in public docs.
2836
- Keep examples generic enough for readsb, ultrafeeder, dump1090-fa, and
2937
PiAware users. Use stack-specific examples only in stack-specific sections.
3038

39+
### Docs as the plan
40+
41+
The docs are the design surface for a change, not an afterthought written at the
42+
end. The lifecycle is:
43+
44+
- In the plan phase, write the doc for the change first, as the design. A human
45+
reads that doc as the plan and reviews it before the work proceeds.
46+
- While the work is in progress, the doc may carry a task breakdown or todo list
47+
for that change, so the plan and the work stay in one place.
48+
- At delivery, none of that may remain. The published docs are camera-ready: no
49+
todo lists, no task breakdowns, no "planned" or "in progress" scaffolding. They
50+
describe what exists. Track unfinished follow-ups outside the published docs.
51+
3152
## Development Rules
3253

3354
- Keep changes focused.
3455
- Add tests for behavior changes.
3556
- Weigh per-frame and render-path cost. Prefer identity-stable selector
3657
outputs, avoid hot-loop allocations, and skip imperative updates (`setData`,
3758
GPU uploads) when inputs are unchanged.
38-
- Update docs when configuration, install shape, privacy behavior, or network
39-
access changes.
59+
- Every change includes documentation verification and update: confirm the docs
60+
for the affected area still match, and update them in the same change. See the
61+
Documentation Rules above.
4062
- Do not choose or change the project license without maintainer approval.
4163

4264
## State and Data Rules

CONTRIBUTING.md

Lines changed: 37 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,55 @@
11
# Contributing to Ident
22

33
Ident is built for people running their own ADS-B receivers. Good contributions
4-
keep that audience in mind: the app should be understandable for receiver
5-
owners, predictable for operators, and straightforward to install on common
6-
receiver hosts.
4+
keep that audience in mind: the app should be understandable for receiver owners,
5+
predictable for operators, and straightforward to install on common receiver
6+
hosts.
77

8-
## Before You Open an Issue
8+
By participating, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
99

10-
Search existing issues and discussions first. If the problem is a security
11-
issue, do not open a public issue; use the private reporting link in
12-
[SECURITY.md](SECURITY.md).
10+
## Reporting issues
1311

14-
Please do not include private station details in public issues.
12+
Search the existing issues and discussions first. For a security issue, do not
13+
open a public issue; use
14+
[private vulnerability reporting](https://github.com/Ident-1090/Ident/security/advisories/new).
1515

16-
Avoid sharing:
16+
Do not include private station details in public issues: feeder keys or claim
17+
tokens, exact receiver coordinates, home or location hints, private hostnames or
18+
tunnel URLs, or screenshots that reveal where you are. Use placeholders such as
19+
`receiver.local`, `YOUR_LAT`, `YOUR_LON`, and `YOUR_FEEDER_ID`.
1720

18-
- feeder keys or claim tokens
19-
- exact receiver coordinates
20-
- home address or location hints
21-
- private hostnames, tunnel URLs, or local network names
22-
- screenshots that reveal private location details
21+
For install and compatibility reports, include the Ident version, your decoder and
22+
where it writes `aircraft.json`, which optional files exist (`receiver.json`,
23+
`stats.json`, `outline.json`), the operating system and hardware, the install
24+
method, the browser and device used for the UI, and any relevant `identd` logs.
25+
For UI issues, crop or redact screenshots that reveal your location.
2326

24-
Use placeholders such as `receiver.local`, `YOUR_LAT`, `YOUR_LON`, and
25-
`YOUR_FEEDER_ID` when an example needs a value.
27+
## Pull requests
2628

27-
## Good Bug Reports
29+
Keep pull requests focused. A small change with clear behavior, tests, and docs is
30+
easier to review than a broad change that mixes unrelated work.
2831

29-
For install and compatibility issues, include:
32+
- Include tests for behavior changes.
33+
- Update the docs when install, configuration, network access, or user-facing
34+
behavior changes.
35+
- Do not add a new external service without documenting the network access.
36+
- Do not add station-specific examples or private deployment assumptions.
37+
- Keep receiver data read-only by default; document and justify any write path.
3038

31-
- Ident version
32-
- receiver JSON source: readsb native, dump1090-fa native including PiAware, or
33-
dump978-fa native including SkyAware978
34-
- operating system and hardware model
35-
- install method: binary, Docker, systemd, Debian package, or source
36-
- path where `aircraft.json` is written
37-
- which optional files exist, such as `receiver.json`, `stats.json`, or
38-
`outline.json`
39-
- browser and device used for the UI
40-
- relevant `identd` logs
39+
For local setup, builds, the checks to run, and the pre-commit hook, see the
40+
[Development guide](https://ident-1090.github.io/Ident/development).
4141

42-
For UI issues, screenshots are useful. Crop or redact anything that reveals a
43-
private receiver location.
42+
## Developer Certificate of Origin
4443

45-
## Pull Requests
46-
47-
Keep pull requests focused. A small change with clear behavior, tests, and docs
48-
is easier to review than a broad change that mixes unrelated work.
49-
50-
Expected baseline:
51-
52-
- include tests for behavior changes
53-
- update docs when install, configuration, network access, or user-facing
54-
behavior changes
55-
- avoid introducing new external services without documenting network access
56-
- do not add station-specific examples or private deployment assumptions
57-
- keep receiver data read-only by default; document and justify any write path
58-
59-
Before opening a pull request, run the checks that apply to your change.
60-
61-
```sh
62-
cd ident
63-
pnpm test
64-
pnpm build
65-
66-
cd ../identd
67-
go test ./...
68-
```
69-
70-
If you cannot run a relevant check, say which check you skipped and why.
71-
72-
### Wire Schemas
73-
74-
Ident-owned WebSocket and HTTP payload schemas live in `schemas/ident/`. They
75-
are generated from the Go wire structs with `github.com/google/jsonschema-go`.
76-
77-
Refresh schemas after changing a wire struct:
44+
Contributions are accepted under the
45+
[Developer Certificate of Origin](https://developercertificate.org/) (DCO). It
46+
certifies that you wrote the contribution, or otherwise have the right to submit
47+
it under the project's license. You agree to it by signing off each commit:
7848

7949
```sh
80-
cd identd
81-
IDENT_UPDATE_SCHEMAS=1 go test . -run TestIdentSchemasAreCurrent -count=1
82-
go test . -run TestIdentSchemasAreCurrent -count=1
50+
git commit -s
8351
```
8452

85-
The normal Go test fails when a committed schema is stale, so CI and the local
86-
pre-commit hook both enforce freshness.
87-
88-
### Pre-commit hook
89-
90-
The hook lives at `ident/.husky/pre-commit` and runs three checks: `gofmt`
91-
against `identd/`, `pnpm check-ident-schemas` (the schema-freshness check
92-
above), and `pnpm exec lint-staged` (biome formatting of staged JS/TS/JSON).
93-
Husky installs the hook from `ident/package.json`'s `prepare` script, so you
94-
need to have run `pnpm install` inside `ident/` at least once for the hook to
95-
fire. If your commit fails with "gofmt would rewrite", run `gofmt -w identd/`
96-
and re-stage.
97-
98-
## Development Notes
99-
100-
The release architecture is:
101-
102-
- `ident/`: React web UI
103-
- `identd/`: Go service and embedded release binary
104-
- `packaging/`: Docker, systemd, and package assets
105-
106-
Development can run the frontend and service separately. Release builds embed
107-
the web UI into `identd`.
108-
109-
### Internal configuration
110-
111-
These environment variables exist for development, testing, and operator
112-
overrides. They are intentionally kept out of the user-facing README so the
113-
common installation flow stays short.
114-
115-
- `IDENT_RELAY_ROUTE_UPSTREAM` — base URL of the airline route lookup
116-
service (default: `https://adsb.im/api/0/routeset`)
117-
- `IDENT_RELAY_ROUTE_TTL_SEC` — how long Ident caches a successful route
118-
lookup before re-querying (default: 5 minutes)
119-
- `IDENT_RELAY_ROUTE_BATCH_MS` — debounce window for coalescing per-callsign
120-
lookups into one upstream request (default: 250 ms)
121-
- `IDENT_UPDATE_API_URL` — GitHub-style releases endpoint Ident polls for
122-
update checks (default: `https://api.github.com`)
123-
- `IDENT_UPDATE_TIMEOUT_SEC` — HTTP timeout for a single update check
124-
(default: 10 s)
125-
126-
### Diagnostics
127-
128-
`identd` keeps diagnostics in a TTL-backed store in `identd/diagnostics.go`.
129-
Identity is `(channel, code, scope)` — re-emitting with the same identity
130-
refreshes the entry's TTL and updates mutable fields (severity, message,
131-
action) without producing a duplicate. The store publishes the full snapshot
132-
on the `ident.diagnostics.v1` channel; the frontend replaces its local set
133-
each time.
134-
135-
Operationally relevant behaviors:
136-
137-
- Capacity is bounded (200 entries by default). When the cap is reached, the
138-
oldest entry is evicted, the eviction is logged with `slog.Warn`
139-
(`diagnostics: cap reached, dropping oldest`, attributes `channel`, `code`,
140-
`scope`, `severity`, `ageSec`), and the store publishes a self-describing
141-
`diagnostics.store.capacity_exceeded` warning so the UI also shows the
142-
saturation.
143-
- TTLs are picked at the emission site. Sustained conditions re-emit on a
144-
poll cadence and refresh their TTL; transient events use a 5-minute
145-
visibility window; persistent notices use `WithTTL(0)` and stay until
146-
process restart.
147-
- Receiver-derived conditions (producer not classifiable, upstream-type
148-
override mismatch) re-emit every 5 minutes from
149-
`ReemitReceiverConditions` in `identd/producer_status.go` so a static but
150-
misconfigured `receiver.json` doesn't let the diagnostic age out of the
151-
15-minute window.
152-
153-
### Capability gating
154-
155-
`ident.capabilities.v1` reports which fields the current producer can supply
156-
(`producer_provided`, `ident_derived`, or `unavailable`). The status bar omits
157-
rows whose capability is `unavailable` rather than rendering them blank.
158-
Observed capabilities are sticky across receiver reingest with the same
159-
producer kind, and reset on a producer-kind transition — the merge rule is in
160-
`producer_status.go:mergeStrongerCapabilities`. The intent is to avoid row
161-
flicker when a single sample is missing a field; downgrade only happens when
162-
the producer itself changes.
163-
164-
### Wire schemas
165-
166-
The eight Ident-owned wire envelopes are generated under `schemas/ident/`:
167-
`ident.aircraft.v1`, `ident.status.v1`, `ident.capabilities.v1`,
168-
`ident.diagnostics.v1`, `ident.rangeOutline.v1`, `ident.config.v1`,
169-
`ident.routes.v1`, `ident.replay.availability.v1`. The `Refresh schemas after
170-
changing a wire struct` section above is the source of truth for regenerating
171-
them.
172-
173-
## Documentation Style
174-
175-
Write for receiver owners first, then add the technical detail maintainers need.
176-
177-
- prefer concrete receiver workflows over abstract feature language
178-
- use placeholders for station-specific values
179-
- mention when a feature depends on an optional file or outside service
180-
- keep install commands minimal and copyable
181-
- do not compare Ident directly to other projects in public docs
53+
This adds a `Signed-off-by: Your Name <you@example.com>` line to the commit
54+
message, using the name and email from your Git configuration. The full
55+
certificate is at <https://developercertificate.org/>.

0 commit comments

Comments
 (0)