docs: add ADRs, architecture refresh, what-is-what, and doc index - #5
Merged
Conversation
Consolidates the docs around three new entry points and collapses seven
stale or duplicate root-level markdown files into the canonical
docs/ tree. Aimed at the open-source contributor influx and the
intern onboarding cohort.
New content:
- docs/README.md — task-oriented doc index ("I want to understand /
use / contribute / operate / sell UnSearch") replacing the implicit
"open the docs folder and guess" UX.
- docs/what-is-what.md — directory-by-directory component map, plain-
language layer diagram, glossary of recurring terms (DO, KV, D1,
tier, namespace, drop-in, persona), naming conventions, and a
"where does that live?" cheat sheet for common changes.
- docs/adr/ — Architecture Decision Records. Eight records covering
the past decisions a new contributor would otherwise have to
reverse-engineer:
0001 Cloudflare-native edge architecture
0002 SearXNG as the meta-search aggregator
0003 Tavily-compatible drop-in API surface
0004 Workers AI with tiered model selection
0005 Apache 2.0 + self-hostable from day one
0006 Monorepo layout with apps/* and workers/
0007 Python SDK ships sync + async clients
0008 Honest feature-status policy (shipped / in beta / planned)
Each ADR follows a MADR-style template (Context / Decision /
Consequences / Alternatives considered) so future supersessions
link cleanly.
- docs/adr/README.md — index + the format guide for writing the next
ADR.
Rewrites:
- docs/architecture.md — replaced the stale 58-endpoint / 27,500-LOC
snapshot of the v1 FastAPI-only architecture with the current v2.0
Cloudflare-native picture: edge worker (Hono on Workers), FastAPI
Container, the four Durable Objects (RateLimiter, TopicMonitor,
ResearchAgent, SessionManager), the data-placement table (what
lives in D1 vs KV vs R2 vs Vectorize vs origin Postgres), end-to-
end request lifecycle examples for the cache-hit, cache-miss,
research-agent, and topic-monitor cases, and the honest tech-debt
callouts from docs/roadmap.md.
Deletes (7 files):
- DEPLOYMENT.md — 0 incoming refs, superseded by docs/deployment/*.
- DEPLOYMENT_GUIDE.md — 1 ref from IMPLEMENTATION_SUMMARY.md which
is also deleted; superseded by docs/deployment/*.
- DOCKER-COMPOSE-README.md — 0 incoming refs, content covered by
the top-level docker-compose.yml header comments.
- ENV_VARIABLES.md — newer version (with the docs-scrub fix from
earlier in this branch's history) synced into the canonical
docs/configuration/env-variables.md before deletion.
- IMPLEMENTATION_SUMMARY.md — stale (referenced "packages/shared/"
which doesn't exist), 0 incoming refs.
- stripe_webhook_setup.md — byte-identical to
docs/configuration/stripe-webhook.md.
- webhook_events_explained.md — byte-identical to
docs/configuration/webhook-events.md.
README.md and CHANGELOG.md updated to reflect the new structure;
README no longer dual-links ENV_VARIABLES.md and the docs/configuration/
copy. CHANGELOG records the deletions explicitly so anyone landing
on a dead link can find the new path.
No code touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates the docs around three new entry points and collapses seven stale or duplicate root-level markdown files into the canonical
docs/tree. Aimed at the open-source contributor influx and the intern onboarding cohort — they should be able to find what they need without trial and error.New content
docs/README.md— doc entry pointTask-oriented ("I want to understand / use / contribute / operate / sell UnSearch") replacing the implicit "open the docs folder and guess" UX.
docs/what-is-what.md— component mapapp/vsapps/backend/dual layoutdocs/adr/— Architecture Decision RecordsEight ADRs covering the past decisions a new contributor would otherwise have to reverse-engineer:
apps/*andworkers/Each ADR follows a MADR-style template — Context / Decision / Consequences / Alternatives considered — so future supersessions link cleanly. The README explains when to write an ADR and the status taxonomy (Accepted / Superseded by ADR-XXXX / Deprecated).
Rewrites
docs/architecture.mdReplaced the stale 58-endpoint / 27,500-LOC snapshot of the v1 FastAPI-only architecture with the current v2.0 Cloudflare-native picture:
docs/roadmap.mdDeletes (7 files)
DEPLOYMENT.mddocs/deployment/DEPLOYMENT_GUIDE.mdIMPLEMENTATION_SUMMARY.md(also deleted); superseded bydocs/deployment/DOCKER-COMPOSE-README.mddocker-compose*.ymlENV_VARIABLES.mddocs/configuration/env-variables.mdbefore deletionIMPLEMENTATION_SUMMARY.mdpackages/shared/which doesn't exist; 0 incoming refsstripe_webhook_setup.mddocs/configuration/stripe-webhook.mdwebhook_events_explained.mddocs/configuration/webhook-events.mdVerified zero dangling references to any of the deleted paths before deletion.
Stats
22 files changed: +869 / −2219 lines
Test plan
docs/README.mdand click each linked pathgit log -- DEPLOYMENT.mdetc. still work for anyone who needs the deleted historyWhy now
Two interns onboarding this week. The first thing they'll do is read the docs.