Skip to content

Rebuild libredb.org from the redesign - #48

Merged
cevheri merged 10 commits into
mainfrom
redesign
Aug 29, 2026
Merged

Rebuild libredb.org from the redesign#48
cevheri merged 10 commits into
mainfrom
redesign

Conversation

@cevheri

@cevheri cevheri commented Aug 29, 2026

Copy link
Copy Markdown
Member

Replaces the site with the redesigned build. The toolchain keeps its shape — bun, Astro, the same gate, release-gated deploy — so how this repo is operated does not change.

What to review

The homepage and the product tour. The tour is a page authored at 1920×1080 that scales itself to whatever box it is given, and the design handoff put it in a fixed-height box. Measured in a browser, that left it at 51.7% scale with black bars, and 17.3% on a phone. It now fills a 16:9 box, crops to the tour's own card, and loads a separate bundle below 1023px. docs/DECISIONS.md carries the numbers and the arithmetic behind them.

The blog and the CMS. Posts live in outstatic/content/posts and are read by Astro's glob loader. cms/ is a local-only Next app that commits Markdown straight into this repo; it is never deployed. It needs a cms/.env.local (see cms/.env.local.example).

The gate. bun run gate is typecheck → format → lint → knip → build → tests. The build step is load-bearing: the dist suite reads dist/, and bunfig.toml preloads a check that fails loudly when it is missing. CI adds a Lighthouse accessibility run over five routes and a second job that builds the CMS app.

What this removes

These are on main and nothing is deleted from history:

  • /playground — the WASM SQL playground, with its worker, engine, protocol and tests
  • /privacy-policy, the cookie consent banner, the GitHub star counter, the [section] routes
  • public/logos/deploy/, public/video/, and the docker-compose sync script

/features, /databases, /deploy and /open-source ship as stubs and get rewritten one at a time on top of this.

What was deliberately kept

public/.well-known/ (Flathub and security.txt domain verification), BingSiteAuth.xml, llms.txt, llms-full.txt, humans.txt, and docs/TOOLCHAIN.md — updated where it had gone stale (bun 1.3.14 → 1.4.0, @astrojs/check 0.9.9 → 0.9.10, knip.jsonknip.jsonc).

One correction worth flagging

The CMS was configured against the scratch repository it was built in. site.config.json and cms/.env.local.example now name libredb.github.io, so a save from the dashboard commits here. tests/cms-config.test.ts holds the two in agreement.

Verification

bun install        486 packages  |  cms: 579 packages
bun run gate       astro check 0 errors · prettier clean · oxlint 0 errors
                   knip clean · 12 pages built · 67 tests passed
bun run a11y       97 / 100 / 100 / 100 / 100   (threshold 95)
bun run secrets    clean

Dev server: all 12 routes 200, all six preserved files 200, no horizontal scroll, tour at 69.1% with no black bars on a 1440px viewport.

Known, pre-existing

At 360px the page still scrolls 4px sideways, caused by .scene__box--studio in the flow band. Measured identically before and after this change, so it is not introduced here.

🤖 Generated with Claude Code

Replaces the site with the redesigned build: a new homepage, a blog backed
by an Outstatic CMS, and stub pages for the sections that have not been
rewritten yet. The toolchain is unchanged in shape — bun, Astro, the same
gate — so the operational surface stays where it was.

What is here:

- Homepage rebuilt against the design handoff, with the interactive product
  tour cropped to the tour's own card and a separate bundle for phones.
- Blog: `outstatic/content/posts` authored through the CMS app in `cms/`,
  read by Astro's glob loader, with an RSS feed.
- The gate grew a build step (the dist suite reads `dist/`), Lighthouse
  accessibility over five routes, and knip's entry points now cover Astro
  layouts and the standalone Node scripts.
- `design-system/` is the token source; `src/styles/ds/` is a byte-identical
  vendored copy and a test holds the two together.

What this removes, and where to find it:

- `/playground` (the WASM SQL playground), `/privacy-policy`, the cookie
  consent banner, the GitHub star counter and the `[section]` routes. All of
  it is on `main` and none of it is deleted from history.
- `/features`, `/databases`, `/deploy` and `/open-source` are stubs here;
  they are rewritten one at a time on top of this.
- `public/logos/deploy/`, `public/video/` and the docker-compose sync went
  with the pages that used them.

Kept from the previous site: `public/.well-known/` (Flathub and security.txt
domain verification), `BingSiteAuth.xml`, `llms.txt`, `llms-full.txt`,
`humans.txt` and `docs/TOOLCHAIN.md`.

The CMS now points at this repository rather than the scratch one it was
built in, so a save from the dashboard commits here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread scripts/lighthouse-gate.mjs Fixed
Comment thread scripts/lighthouse-gate.mjs Fixed
Comment thread scripts/lighthouse-gate.mjs Fixed
Comment thread scripts/og/build-og.mjs Fixed
Comment thread scripts/og/build-og.mjs Fixed
Comment thread scripts/og/build-og.mjs Fixed
cevheri and others added 9 commits August 29, 2026 04:09
Both `scripts/lighthouse-gate.mjs` and `scripts/og/build-og.mjs` stand up a
throwaway HTTP server over `dist/` and read the file the request names. The
OG builder had no traversal guard at all — verified:

    /../../../../../../etc/passwd  ->  ../../../../../etc/passwd

The a11y gate did guard, by stripping leading `../` after normalising, and
that held; but it is a scrub, and a scrub has to be right about every
encoding. Both now resolve the path and assert it is inside the resolved
root, which is a comparison rather than a promise about string handling.

A malformed percent-escape used to throw out of the async handler; it now
404s like any other miss.

Neither server is reachable off the machine — both bind 127.0.0.1 on an
ephemeral port and live for seconds — so the practical exposure was small.
It was still a real escape, and CodeQL was right to flag it (PR #48).

`resolve` is imported aliased: both files also use Promise executors whose
own `resolve` shadowed it, inside the code deciding whether a request
escapes the served directory.

Verified: `bun run a11y` passes over five routes and the OG builder still
renders its card.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Introduces a new interactive playground for LibreDB, allowing users to run commands directly in their browser. The playground includes a command input area, a results grid, and an activity log. Additionally, a cheatsheet component has been added to provide users with ready-to-run commands grouped by namespace. The playground is backed by OPFS for persistent storage, enhancing the user experience with real-time command execution.

Also updates package.json and bun.lock to include the new dependency "@libredb/libredb" version 0.2.2.
- Bump version from 0.9.66 to 0.13.4 in site.config.json and update related references.
- Introduce a new Cookie Consent component to manage user consent for analytics tracking.
- Add support for a new database engine, LibreDB, expanding the total to seventeen engines.
- Enhance the deployment options with additional channels, increasing the total to thirty-three.
- Update the FAQ and home page to reflect the new engine and deployment options.
- Revise the Lighthouse audit script to include more routes for improved performance tracking.
- Introduced a new page at /docker-compose to display the complete docker-compose.example.yml for LibreDB Studio.
- Added a new endpoint to serve the docker-compose file directly for easy access.
- Updated site configuration and various components to include references to the new docker-compose page.
- Removed language support from posts and components, standardizing to English.
- Simplified the schema for posts by removing the language field.
- Updated tests to ensure the integrity of the docker-compose file and its documentation.
- Updated the sitemap integration to exclude retired URLs based on the new `redirectPaths` data.
- Revised the site description in `site.config.json` to reflect the addition of a new database engine, increasing the total to thirteen.
- Added new routes to the configuration for better site navigation.
- Removed outdated documentation files related to LLMs from the public directory.
- Added explicit max-width for single-column prose in `security.astro` to enhance readability.
- Updated CSS rules in `doc.css` to enforce max-width for single-column blocks, ensuring line length is consistent with the rest of the page.
…test site

- Introduced a new Netlify configuration file (`netlify.toml`) to manage deployment settings for the test site, ensuring it does not interfere with the production site.
- Created a GitHub Actions workflow (`deploy-test.yml`) to automate the deployment of the test site to Netlify on pushes to the main branch, allowing for real-time previews of changes.
- Updated tests to verify the separation of test and production deployment triggers, ensuring that merging pull requests does not inadvertently publish to production.
@cevheri
cevheri merged commit 359c096 into main Aug 29, 2026
5 checks passed
@cevheri
cevheri deleted the redesign branch August 29, 2026 12:14
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.

2 participants