Documentation for Tessera
The self-hosted file courier for sharing files, notes, and links with a retrieval code.
This repository contains the documentation site for Tessera. It explains how to use and operate Tessera; implementation details and source-level design notes belong in the main repository.
Documentation is maintained in English, 日本語, 繁體中文, and 简体中文.
- Getting started
- How the site is built
- Repository layout
- Localization
- Homepage screenshots
- API reference
- Writing documentation
- Validation
- License
- Node.js compatible with the versions required by the project dependencies
- pnpm
pnpm install
pnpm devOpen http://localhost:4000.
| Command | Purpose |
|---|---|
pnpm dev |
Start the local development server on port 4000 |
pnpm build |
Build the production site into .vercel/output |
pnpm start |
Preview the production build |
pnpm types:check |
Run the TypeScript type check |
pnpm lint |
Run Oxlint |
pnpm fmt |
Format with Oxfmt |
The site uses Fumadocs with TanStack Start, powered by Vite.
- TanStack Start provides the application and routing.
- Fumadocs provides the documentation UI and MDX integration.
- Vite drives development and production builds.
- Fumadocs OpenAPI generates API reference pages from the checked-in OpenAPI contract.
Important
This is a TanStack Start project, not a Next.js application. Routes live in src/routes/; do not apply Next.js-specific Fumadocs setup instructions without adapting them to this stack.
.
├── content/
│ └── docs/
│ ├── en/ # English documentation
│ ├── ja/ # Japanese documentation
│ ├── zh-TW/ # Traditional Chinese documentation
│ └── zh-CN/ # Simplified Chinese documentation
├── openapi/
│ └── tessera.json # OpenAPI contract used to generate the API reference
├── public/
│ └── landing/ # Homepage screenshots of the real app, one folder per app locale
└── src/
├── routes/ # TanStack Start routes
└── components/
└── mdx.tsx # Registered MDX components
The (core)/meta.json file in each locale controls the ordering of the core guide. API introduction pages live under each locale's api/ section.
Each language has its own URL prefix. For example:
- English:
/en/docs/shares - 日本語:
/ja/docs/shares - 繁體中文:
/zh-TW/docs/shares - 简体中文:
/zh-CN/docs/shares
The unprefixed /docs/* paths redirect to English.
When changing user-facing documentation:
- Update every locale in the same change.
- Keep terminology and page structure consistent across translations.
- Use locale-prefixed paths for internal documentation links.
- Check that links point to pages that exist in the target locale.
The homepage shows screenshots of the real app, not redrawn components. They live in public/landing/<locale>/ as WebP: the upload page, the result (also a wide one for the hero), the share page on desktop and on a phone, the admin dashboard, and three link-preview cards the server drew (og-photo, og-locked, og-snippet, fetched from /s/<code>/og.png with site.language set to the locale). The server cannot draw link previews in Simplified Chinese yet, so zh-CN reuses the zh-TW cards; everything else has its own set.
Retake them when the app's UI changes: run the current main image, switch to dark mode and the orange accent, upload a picture, and capture each of them in en, ja, zh-TW and zh-CN. A share page that previews an image spends a retrieval each time it is opened, so shoot it from a share with no download limit. The QR code in the result shots is swapped for one that opens https://koimsurai.com before capturing; keep that when retaking them.
The API reference is generated at build time from openapi/tessera.json. This file is a copy of the contract in the main Tessera repository.
After updating the API contract in the main repository, refresh the copy from the documentation repository root:
cp ../tessera/openapi.json openapi/tessera.jsonReview the resulting API reference after rebuilding. Avoid manually duplicating generated endpoint details in the guide: the guide explains behaviour, while the generated reference documents the contract.
Write for the person trying to complete a task or understand a behaviour.
- Verify behaviour against source code. Check configuration defaults in
config.rsand runtime behaviour in the relevant handlers. - Explain outcomes, not just endpoints. Describe what a user or operator should expect; leave exact request and schema details to the API reference.
- Keep prose direct. Prefer short sentences, consistent terminology, and concrete examples.
- Make warnings actionable. A callout should explain a specific consequence or decision, not repeat a generic reminder.
- Keep translations in sync. A documentation change is not complete until all supported locales are updated.
The components registered in src/components/mdx.tsx are available in MDX:
| Component | Use |
|---|---|
Callout |
Highlight an important note or consequence |
Steps |
Present a sequence of actions |
Files |
Show file-oriented content |
Tabs |
Group alternative instructions |
TypeTable |
Present structured type information |
Accordion |
Hide optional details until needed |
Cards |
Present grouped navigation or related content |
Mermaid |
Render a diagram as SVG during the build |
For Mermaid diagrams, use the registered <Mermaid chart="..." /> component and put the diagram definition on its own line. Confirm the rendered output in the production build; do not assume an MDX component rendered correctly just because the build completed.
Before submitting a documentation change, run:
pnpm build
pnpm types:check
pnpm lint
pnpm fmt:checkYou can also check the generated HTML for component tags that were accidentally left as escaped text:
grep -o '</\?\(Callout\|Steps\|Files\|Tabs\|TypeTable\|Accordions\?\|Mermaid\)' \
.vercel/output/static/*/docs/*/index.htmlAny output may indicate a component name typo or an MDX component that was not processed. Inspect the affected page before merging.
- Tessera source code: github.com/Limatura/tessera
- Reporting a security issue, or contributing to Tessera itself: see SECURITY.md and CONTRIBUTING.md in the main repository.
- The documentation under
content/is licensed under CC BY 4.0. - The site's source code is licensed under the MIT License.
openapi/tessera.jsonis copied from the main repository and stays under its license, AGPL-3.0.