Skip to content

Export all tenant data to a ZIP - #681

Merged
vdolek merged 4 commits into
masterfrom
claude/project-thread-5ignha
Oct 30, 2026
Merged

vdolek merged 4 commits into
masterfrom
claude/project-thread-5ignha

Conversation

@EvilBrainsBot

@EvilBrainsBot EvilBrainsBot commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Requested by Martin · project thread

Summary

GET /api/export streams the tenant as one ZIP of per-entity JSON documents and files from one REPEATABLE READ snapshot; Settings get the Export section at /settings/export. Any signed-in tenant user may export.

Changes

  • TenantExporter writes the case tree, contacts, labels and export.json; naming, versions, Prague times and streaming are shared with "Stáhnout vše".
  • JSON Schemas in docs/export/v1; SDD-022 is new, SDD-019 and SDD-016 list the section and route.
  • SettingsNav holds the sections as a list, so API tokens and an MCP server for AI agents and integrations #673 adds API tokeny with one line.
  • !stitky.json is written only when labels exist.
  • NJsonSchema (MIT) validates the documents in tests.

Risks

Screenshots

settings-1440
settings-390
settings-export-1440
settings-export-390

Closes #674

https://claude.ai/code/session_01UovdgdN8r8TkYmqabjAfF3


Generated by Claude Code

GET /api/export streams the caller's tenant as one archive: Spisy with the
case tree, acts and files with all versions, Kontakty, Štítky and
export.json. Every document is its own versioned JSON with a schema under
docs/export/v1, so the archive reads without the app.

The export reads one REPEATABLE READ snapshot. It holds only the outline
of cases and acts in memory and reads comments, labels and files one case
or act at a time. Names, version naming, Prague entry times and streaming
come from the "Stáhnout vše" code, now shared through ZipStreamWriter and
FileArchiveLayout's claim helpers. A missing blob is marked in its document
and logged instead of failing the export.

NJsonSchema (MIT) validates the documents in the tests; JsonSchema.Net
moved to a fee-based licence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgdN8r8TkYmqabjAfF3
/settings/export carries the "Exportovat vše" button, which downloads
/api/export the way "Stáhnout vše" does, and the name the archive saves
under. The settings sections come from one SettingsNav list, so a further
section is one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgdN8r8TkYmqabjAfF3
@EvilBrainsBot
EvilBrainsBot requested a review from vdolek as a code owner October 30, 2026 18:55
@github-actions github-actions Bot added the agent-in-progress An agent is working on this pull request label Oct 30, 2026
@EvilBrainsBot EvilBrainsBot self-assigned this Oct 30, 2026
EvilBrainsBot pushed a commit that referenced this pull request Oct 30, 2026

Copy link
Copy Markdown
Member Author

Code Review

  • nothing

Generated by Claude Code

@EvilBrainsBot EvilBrainsBot removed the agent-in-progress An agent is working on this pull request label Oct 30, 2026
@EvilBrainsBot EvilBrainsBot added agent-done Waiting for the owner's review and merge agent-in-progress An agent is working on this pull request and removed agent-done Waiting for the owner's review and merge labels Oct 30, 2026 — with Claude
A cut at 80 UTF-16 units could split an emoji, leaving a lone surrogate
that UTF-8 cannot encode, so the entry name and the path in the JSON
would differ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgdN8r8TkYmqabjAfF3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgdN8r8TkYmqabjAfF3

Copy link
Copy Markdown
Member Author

Code Review

  • /code-review high: an export title cut at 80 characters no longer splits an emoji; the export file name on mobile stays on one line.
  • /security-review: no finding.

Generated by Claude Code

@EvilBrainsBot EvilBrainsBot added agent-done Waiting for the owner's review and merge and removed agent-in-progress An agent is working on this pull request labels Oct 30, 2026 — with Claude
@vdolek
vdolek merged commit 6a2bbfa into master Oct 30, 2026
3 checks passed
@vdolek
vdolek deleted the claude/project-thread-5ignha branch October 30, 2026 20:10
@github-actions github-actions Bot removed the agent-done Waiting for the owner's review and merge label Oct 30, 2026
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.

Export all tenant data to a ZIP

3 participants