No description
  • Svelte 49.1%
  • mdsvex 32.6%
  • TypeScript 8%
  • CSS 6.1%
  • JavaScript 2.2%
  • Other 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-28 09:30:12 +01:00
.forgejo/workflows chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
.vscode Project init 2026-04-02 19:32:27 +02:00
scripts feat: code-review fixes - SSR changelog, error page, a11y, smaller docs bundle (0.6.0) 2026-10-15 21:11:21 +02:00
src feat: code-review fixes - SSR changelog, error page, a11y, smaller docs bundle (0.6.0) 2026-10-15 21:11:21 +02:00
static feat: code-review fixes - SSR changelog, error page, a11y, smaller docs bundle (0.6.0) 2026-10-15 21:11:21 +02:00
.dockerignore chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
.env.example feat(changelog): add SSR /changelog timeline page (#6) 2026-05-05 22:01:25 +02:00
.gitignore chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
.mcp.json Project init 2026-04-02 19:32:27 +02:00
.npmrc Project init 2026-04-02 19:32:27 +02:00
.nvmrc chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
.prettierignore ci: ignore .pnpm-store so lint does not scan the container's pnpm store 2026-06-04 21:27:17 +02:00
.prettierrc Project init 2026-04-02 19:32:27 +02:00
CLAUDE.md chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
compose.yaml chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
Dockerfile fix(security): patch HIGH/CRITICAL image vulnerabilities 2026-10-26 21:42:41 +01:00
eslint.config.js Project init 2026-04-02 19:32:27 +02:00
LICENSE Replace LICENSE with verbatim FSF AGPL-3.0 text 2026-05-30 20:49:55 +02:00
package.json feat: code-review fixes - SSR changelog, error page, a11y, smaller docs bundle (0.6.0) 2026-10-15 21:11:21 +02:00
pnpm-lock.yaml feat: code-review fixes - SSR changelog, error page, a11y, smaller docs bundle (0.6.0) 2026-10-15 21:11:21 +02:00
pnpm-workspace.yaml Project init 2026-04-02 19:32:27 +02:00
README.md chore(infra): buildable image as non-root, pinned CI, docs 2026-10-15 21:11:21 +02:00
svelte.config.js feat: add documentation section 2026-06-12 21:07:25 +02:00
tsconfig.json Project init 2026-04-02 19:32:27 +02:00
vite.config.ts Project init 2026-04-02 19:32:27 +02:00

rollnote-website

The rollnote marketing site and user documentation (roll-note.com), built with SvelteKit 2 / Svelte 5, Tailwind CSS 4 and mdsvex (docs pages are .svx). @sveltejs/adapter-node produces a small Node server: almost every page is prerendered at build time, /changelog is rendered per request from the rollnote-api changelog, and /health answers the container healthcheck.

Prerequisites

  • Node.js 24+ (.nvmrc; engines is enforced through .npmrc)
  • pnpm, the version pinned by packageManager (corepack enable)

Setup

pnpm install
cp .env.example .env   # public URLs, see below
pnpm dev               # http://localhost:5173

Environment

All three variables are public and inlined at build time through $env/static/public (src/lib/config.ts), so they must be set when building:

Variable Production value Used for
PUBLIC_SITE_URL https://roll-note.com canonical URLs, sitemap, JSON-LD
PUBLIC_APP_URL https://app.roll-note.com every "open the app" / signup CTA
PUBLIC_API_URL https://api.roll-note.com /changelog (release notes)

Scripts

pnpm dev       # Vite dev server
pnpm build     # production build -> build/ (run with `node build`)
pnpm preview   # preview the production build
pnpm check     # svelte-kit sync + svelte-check
pnpm lint      # prettier --check . + eslint
pnpm format    # prettier --write .
pnpm api:types # regenerate src/lib/api/schema.d.ts from ../rollnote-api/openapi.json

Deployment

Dockerfile builds the site with Node 24 (alpine) and ships only the adapter-node output (build/ + package.json, no node_modules). The server runs as the node user on port 3000 and exposes GET /health.

The public URLs are build args with the production values as defaults (.env never enters the build context). compose.yaml forwards PUBLIC_SITE_URL, PUBLIC_APP_URL and PUBLIC_API_URL from the shell or a compose .env, so a self-hosted build only needs those set:

docker compose up -d --build
# or: docker build --build-arg PUBLIC_SITE_URL=https://www.example.org ... .

The container runs read-only (tmpfs /tmp), with no-new-privileges, all capabilities dropped, CPU/memory/pid limits and log rotation, on the external websites network.

Security headers (CSP, HSTS, X-Frame-Options, Referrer-Policy, Permissions-Policy) are set by the reverse proxy, not by this server: prerendered pages are served straight from disk by adapter-node before any SvelteKit hook runs, so a handle hook could never add them.

CI

.forgejo/workflows/test.yml runs when the run-ci label is added to a PR: lint, svelte-check, a drift check of the generated API types against rollnote-api's openapi.json, the production build, a gitleaks secret scan and a Docker image build (not pushed).