Skip to content

feat(datatug-apps): read-only inGitDB/GitHub vault explorer - #32

Merged
trakhimenok merged 1 commit into
mainfrom
fable/ingitdb-vault-source
Jul 2, 2026
Merged

trakhimenok merged 1 commit into
mainfrom
fable/ingitdb-vault-source

Conversation

@trakhimenok

Copy link
Copy Markdown
Contributor

What

Ports the working standalone "inGitDB GitHub vault viewer" (a Vite SPA built in the now-archived sneat-mod-datatug repo, where it could not land) into this rich Angular/Ionic UI, superseding that SPA. It mirrors the patterns of the just-merged Firestore space explorer (#31) — same read-only-by-construction headers, standalone signals-based page, lazy route, and My-page entry point.

How it works

  • VaultExplorerService (libs/datatug/main/src/lib/services/repo/vault-explorer.service.ts) wraps the READ-ONLY subset of @ingitdb/client-github@0.1.2: createIngitDbClient({ token }), loadDatabaseConfig, loadCollectionSchema, loadCollectionRecords, and githubApi.getContents (to probe record dirs for nested subcollections). It never calls a write method (putFile/deleteFile/createCommit or the pending-changes stores).
  • VaultExplorerPageComponent (.../pages/signed-in/vault-explorer/): connect form (owner/repo, branch defaulting to main, optional GitHub token as a password field held in memory only — never persisted), root-collections list from .ingitdb/root-collections.yaml, records table (schema columns_order first, then extra keys), record JSON view with metadata fields stripped, and drill-down into nested subcollections (.../{recordId}/{subcol}/$records/... per dalgo2ingitdb FORMAT.md) with breadcrumbs. Behavior is a 1:1 port of the SPA's ng/src/main.ts — no new features.
  • Routed at /explore-vault (auth-guarded) and linked from the My page next to the Firestore space-explorer entry, labeled as the GitHub / inGitDB variant and marked read-only.

For a GitHub-backed vault there is no Sneat/DataTug server in the read path at all — the browser talks straight to api.github.com with the user's own token, which is the transparency proof behind "own your data".

Dependencies

@ingitdb/client-github@0.1.2 + its peers (axios, idb, @ingr/codec), plus @ingitdb/client@0.1.0 declared directly so its CollectionEntry/CollectionSchema/RecordRow types are nameable in ng-packagr's declaration emit (TS2742 otherwise).

Verification

  • pnpm nx run-many -t lint,test,build — all green (includes new vault-explorer.service.spec.ts)
  • pnpm nx run datatug-app:e2e — 3/3 Playwright tests pass

🤖 Generated with Claude Code

https://claude.ai/code/session_01FV3pbooAc9UPpNdiaJuKve

Port the standalone Vite SPA "inGitDB GitHub vault viewer" (from the
archived sneat-mod-datatug repo, which could not land there) into the
rich Angular UI, mirroring the Firestore space-explorer patterns:

- VaultExplorerService wraps the read-only subset of
  @ingitdb/client-github@0.1.2 (loadDatabaseConfig /
  loadCollectionSchema / loadCollectionRecords / githubApi.getContents)
  and never calls a write method (putFile / deleteFile / createCommit
  or the pending-changes stores).
- VaultExplorerPageComponent (signals, standalone, Ionic) with a
  connect form (owner/repo, branch defaulting to main, optional GitHub
  token as a password field kept in memory only), root-collections
  list, records table, record JSON view, and nested-subcollection
  drill-down with breadcrumbs — behavior ported 1:1 from the SPA's
  ng/src/main.ts.
- Routed at /explore-vault (auth-guarded) and linked from the My page
  next to the Firestore space explorer, labeled read-only.
- Unit tests for the service plus its pure helpers
  (subcollectionNamesFromContents / vaultErrorMessage).

Deps: @ingitdb/client-github@0.1.2 with peers axios/idb/@ingr/codec,
plus @ingitdb/client@0.1.0 directly so its record/schema types are
nameable in ng-packagr's declaration emit (TS2742 otherwise).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FV3pbooAc9UPpNdiaJuKve
@trakhimenok
trakhimenok merged commit 96d80a4 into main Jul 2, 2026
3 checks passed
@trakhimenok
trakhimenok deleted the fable/ingitdb-vault-source branch July 2, 2026 07:11
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