Contributing
Project structure
The repository holds both programs, their tests, the build scripts, the Homebrew formula and this site.
The repository
app/
├── Checkout/ a Git checkout, and the instance Rift serves it as
├── Commands/ the CLI; router:* lives in Commands/Router
│ └── Concerns/ step rendering and router steps shared by commands
├── Config/ rift.yaml, the global router config and the init template
├── Contracts/ interfaces
├── Dashboard/ the snapshot rift dash shows, as JSON, and finding rift-dash
├── Docker/ the Docker CLI, Compose files and the container runner
├── Enums/ presets, hook stages, and checkout and container states
├── Env/ .env projection, host ports, name resolution and addresses
├── Exceptions/ errors the user can act on
├── Providers/ container bindings
├── Router/ the shared Caddy router, its admin API and its CA
└── Support/ terminal output
dash/ rift-dash, the Go program that draws rift dash
├── cmd/rift-dash/ its main, which only hands over to internal/app
├── internal/ app, the rift client, the snapshot contract, jobs, system and ui
└── testdata/ snapshot.json, the contract fixture both sides are tested against
docker/ the development images and the binary build scripts
docs/ this documentation site
Formula/ the Homebrew formula, as this repository is its own tap
tests/
├── Feature/ commands, and classes that use a Laravel facade
├── Helpers/ shared test helpers, loaded by tests/Pest.php
└── Unit/ plain classes, mirroring app/
Commands receive their dependencies through handle() method injection. Bindings live in AppServiceProvider.
The documentation site
This site is built with Next.js (opens in a new tab) and Markdoc (opens in a new tab), from the Syntax template by Tailwind Plus (opens in a new tab). It is a static export: a folder of HTML files, with no server.
docs/
├── src/app/page.md the introduction, at /
├── src/app/docs/<slug>/ one page.md per page, at /docs/<slug>
├── src/lib/navigation.ts the sidebar
├── src/markdoc/tags.js the tags pages can use, such as callout
├── src/components/ the layout, header, search and other components
└── scripts/copy-assets.mjs copies the dashboard demo from .github/
Add or change a page
Write the page as Markdown in
docs/src/app/docs/<slug>/page.md, starting with its frontmatter:--- title: Hooks nextjs: metadata: title: Hooks description: One sentence for search engines and link previews. ---Add it to the sidebar in
docs/src/lib/navigation.ts.Preview it with
make docs:dev, then check it withmake docs:buildandmake docs:lint.
Search indexes every page at build time, so a new page needs nothing else.
Markdoc tags
| Tag | Use it for |
|---|---|
{% callout %} | A note beside the text, with type="warning" for a warning. |
{% quick-links %} | A grid of {% quick-link /%} cards linking to other pages. |
{% figure /%} | An image with a caption. |
The site's template code is covered by the Tailwind Plus licence in docs/LICENSE.md, not by Rift's MIT licence.