Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v5
with:
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

# A renamed page used to take six cross-links down with it, silently.
- name: Check internal links
run: pnpm check:links
32 changes: 32 additions & 0 deletions .github/workflows/env-drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Environment drift

# The module repos change daily and these docs did not, which is how Librarian
# shipped a sign-in requirement the docs never mentioned. This reads each
# module's .env.example straight from its repo and fails when a variable is
# missing here.

on:
push:
branches: [main]
pull_request:
paths:
- 'src/content/docs/modules/**'
- 'scripts/check-env-drift.mjs'
- '.github/workflows/env-drift.yml'
# Upstream can drift without anything changing in this repo.
schedule:
- cron: '17 6 * * 1'
workflow_dispatch:

jobs:
env-drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v5
with:
node-version: 24

- name: Compare documented environment variables against each repo
run: node scripts/check-env-drift.mjs
97 changes: 97 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Working on these docs

This is the documentation site for the Coral ecosystem, at
[docs.getcoral.dev](https://docs.getcoral.dev). Astro + Starlight, deployed to
Vercel.

## The one rule

**Verify every factual claim against the source repository before you write it.**

These docs once described Encore as a working music-request app while its `src/`
was the unmodified template, listed six Librarian features that had no code
behind them at all, and omitted `LIBRARIAN_REQUIRE_LOGIN=true` — a default that
stops a first-run user dead. All of it read plausibly. None of it was true.

Repos are at `github.com/Get-Coral/<name>`, and usually checked out locally
alongside this one. Before documenting a feature, an environment variable or a
flag:

```bash
grep -rn "FEATURE_OR_VAR" ../<repo>/src
```

If it is not in the code, it does not go in the docs. A README is evidence, not
proof — several of them are stale in ways the code is not.

Where the two disagree, the code wins, and the README is worth an upstream
issue.

## Division of labour with getcoral.dev

- **getcoral.dev owns *why***: positioning, comparisons, what a module is for.
- **These docs own *how***: install, configure, operate, troubleshoot.

A module page opens with one self-contained sentence saying what the thing is
and what it needs, then goes operational. Link the marketing page under
*Related* rather than restating its pitch.

## Module status

`src/lib/modules.ts` records a status per module — `shipping`, `early` or
`scaffold` — and it drives the JSON-LD, the OG cards and the homepage. Every
module page repeats it in an aside near the top.

It exists so a reader can tell Aurora from Encore without cloning both. Keep it
honest: the repo changes first, this file follows. If a module gains a feature,
do not promote its status in anticipation.

Do not document planned work as though it ships. If it matters, put it in the
status aside as an explicit "not built yet".

## Page skeleton

Module pages follow the same order, so a reader learns it once:

1. One-sentence definition
2. Status aside (and any safety aside — auth defaults, data loss, cost)
3. Requirements
4. Running it (Docker first — that is how people actually deploy these)
5. Environment reference, as a table, marked *verified against `<repo>/.env.example`*
6. How it behaves — the parts that surprise people
7. From source
8. Related

## Checks

```bash
pnpm build
pnpm check:links # internal links resolve (needs a build first)
pnpm check:env # documented env vars match each repo's .env.example
```

`pnpm check:env` fetches `.env.example` from each module repo on GitHub and
fails when a variable is missing here. It is one-directional on purpose: docs
legitimately describe variables that code reads but `.env.example` omits, such
as `HOST` and `PORT`.

Variables that are declared upstream but read by nothing live in `KNOWN_DEAD` in
`scripts/check-env-drift.mjs`, each with a reason. Documenting them would imply
they work.

## SEO and structured data

Handled centrally; you should not need to touch it for a content change.

- `src/lib/site.ts` — URLs, names, `sameAs`. Nothing else should hardcode a domain.
- `src/lib/schema.ts` — the JSON-LD `@graph`. The `Organization` and `WebSite`
`@id`s deliberately point at `getcoral.dev` so both hosts resolve to **one**
entity rather than two with the same name.
- `src/components/Head.astro` — emits the graph, the OG tags and the fonts.
- `src/pages/[...slug]/og.png.ts` — one social card per page, rasterised at build.
- `src/pages/llms.txt.ts`, `llms-full.txt.ts`, `robots.txt.ts`,
`.well-known/api-catalog.ts` — machine-readable surfaces.

Frontmatter `description` becomes the meta description, the OG description and
the `llms.txt` entry. Write it as a standalone sentence under ~155 characters —
not "Get started with X".
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Elian Van Cutsem

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pnpm install
pnpm dev
```

Accessible at `http://localhost:3000`
Accessible at `http://localhost:4321`

### Build for production

Expand Down Expand Up @@ -101,11 +101,14 @@ vercel

Documentation is organized into sections:

- **Getting Started** - Intro to Coral ecosystem
- **Modules** - Individual module guides (Aurora, Fathom, Librarian, KAPOW)
- **Libraries** - SDK and library documentation (Jellyfin API Client)
- **Getting Started** - Intro, the Docker Compose stack, the CLI, module contracts
- **Modules** - Aurora, Tide, Librarian, Fathom, Marquee, KAPOW!, Encore
- **Libraries** - Jellyfin API client, Coral UI, published npm packages
- **Contributing** - How to contribute and build new modules

Before editing content, read [AGENTS.md](./AGENTS.md) — particularly the rule
about verifying claims against the source repositories.

## Adding Content

### Create a new page
Expand Down Expand Up @@ -145,9 +148,17 @@ sidebar: [
![Alt text](../../assets/image.png)
```

## Checks

```bash
pnpm build
pnpm check:links # internal links resolve (run after a build)
pnpm check:env # documented env vars match each module repo's .env.example
```

## Styling

Uses Tailwind CSS v4 and Starlight's component library:
Uses Starlight's component library, themed through `src/styles.css`:

```markdown
import { Card, CardGrid, Aside } from '@astrojs/starlight/components';
Expand Down
4 changes: 0 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwindcss from '@tailwindcss/vite';

// https://astro.build/config
export default defineConfig({
site: 'https://docs.getcoral.dev',
vite: {
plugins: [tailwindcss()],
},
integrations: [
starlight({
title: 'Coral Docs',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"check:links": "node scripts/check-links.mjs",
"check:env": "node scripts/check-env-drift.mjs"
},
"dependencies": {
"@astrojs/starlight": "^0.38.3",
"@tailwindcss/vite": "^4.0.0",
"astro": "^6.0.1",
"sharp": "^0.34.2",
"tailwindcss": "^4.0.0"
"sharp": "^0.34.2"
}
}
}
Loading
Loading