Skip to content

docs: shared frontend architecture and services contract references - #199

Merged
pathscale merged 1 commit into
masterfrom
feat/frontend-reference-docs
Jul 25, 2026
Merged

docs: shared frontend architecture and services contract references#199
pathscale merged 1 commit into
masterfrom
feat/frontend-reference-docs

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Adds the two remaining frontend references, written once here instead of seven times across the apps.

Why shared rather than per-repo

All seven apps (24x.ai, honey.id, pathscale.com, pays.online, support.cafe, web3.trading, nofilter.io) share an identical src/ skeleton — verified, not assumed:

api/ assets/ components/ config/ constants/ features/ hooks/
layouts/ lib/ models/ scripts/ services/ stores/ styles/ utils/

Per-repo copies would be ~90% duplicated, and duplication is how docs rot: someone fixes one and six go stale. Each app instead gets a short Deviations section listing only what differs (companion PRs, one per app).

The two docs

frontend-architecture.md — what belongs in each directory and what does not, the components/ vs features/ split, stores/ vs contexts/, the routing layers, and a "where does this go?" table.

frontend-services-contract.md — the wiring pattern from contract to hook. Deliberately not an endpoint list: those are already machine-readable in each app's docs/*.services.json and any copy here would be stale within a week. Traces GetUsers end to end in honey.id and documents how errors surface via authErrorNormalize.ts.

Two corrections found by reading the code

The plan these were written from described the chain slightly differently. Reading the source contradicted it in two places, and the docs follow the code:

  1. src/api/services/ is generated output, not hand-written wiringsrc/scripts/schema.js emits it — and configure.ts does not read it. The method map it hands the adapter is built from docs/*.services.json directly via buildMethods(). Only one hand-written file in honey.id imports that directory at all.
  2. src/routing/ is not an alternative to src/routes.ts — it imports it. Every app with routing/ also has routes.ts, and both sit on config/routes.ts. "Which one is current?" turns out to be a false choice; they're three stacked layers.

Also worth noting for reviewers: a handful of hand-written files live at the top level of src/models/ (roles.ts, supportCafeChatMessage.ts in honey.id). The never-hand-edit rule covers the generated subdirectories; the docs say so explicitly, since the blanket phrasing would otherwise be wrong.

Verification

Every backtick-quoted path in both docs was checked against the filesystem by script — 35 path claims in these two files, each resolved to the repos that actually contain it. Nothing was classified from a manifest. Cross-doc links resolve, and there is no overlap with ui-usage.md (checked for restated component/theming topics; zero hits).

🤖 Generated with Claude Code

The seven frontend apps (24x.ai, honey.id, pathscale.com, pays.online,
support.cafe, web3.trading, nofilter.io) share a near-identical src/
skeleton, so these are written once here rather than seven times. Each
app keeps only a short "Deviations" section listing what differs.

frontend-architecture.md documents what belongs in each directory and
what does not, the components/ vs features/ split, stores/ vs contexts/,
and the routing layers.

frontend-services-contract.md documents the wiring pattern from contract
to hook — not an endpoint list, since those are already machine-readable
in each app's docs/*.services.json. Traces GetUsers end to end in
honey.id and covers error normalisation.

Two things were corrected against the code while writing:

- src/api/services/ is generated output, not hand-written wiring, and
  configure.ts does not read it — it builds its method map from
  docs/*.services.json directly.
- src/routing/ is not an alternative to src/routes.ts. It imports it.
  Every app with routing/ also has routes.ts, and both sit on
  config/routes.ts.

Every path cited was checked against the filesystem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment is ready!

You can view the preview at: https://pr-ui-preview-199.surge.sh

@pathscale
pathscale merged commit 6a10148 into master Jul 25, 2026
2 checks passed
@pathscale
pathscale deleted the feat/frontend-reference-docs branch July 25, 2026 21:59
pathscale added a commit that referenced this pull request Jul 25, 2026
…#200)

Both files were merged into this public repository while describing seven
private repositories in detail: enumerating them by name, and documenting
their internal directory layouts, file names and per-repo differences.

Removing them from the tree. This does not remove them from this
repository's history, which is a separate decision.

Reverts the content added in #199.

Co-authored-by: meh <no-reply@pathscale.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant