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
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@btravstack/website"]
}
53 changes: 53 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Website

# Builds apps/website (VitePress) and publishes it to GitHub Pages.
# Requires: repo Settings → Pages → Source = "GitHub Actions".

on:
push:
branches: [main]
paths:
- "apps/website/**"
- "packages/theme/**"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- ".github/workflows/deploy-website.yml"
Comment on lines +9 to +14
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment; don't cancel an in-progress production deploy.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
Comment on lines +33 to +36
- run: pnpm install --frozen-lockfile
# turbo builds @btravstack/theme first (the website depends on it)
- run: pnpm turbo run build --filter=@btravstack/website
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: apps/website/.vitepress/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

# Publishes @btravstack/theme to npm via changesets.
#
# Auth uses npm Trusted Publishing (OIDC) — no NPM_TOKEN. Prerequisites:
# 1. The @btravstack scope/org exists on npmjs.com.
# 2. @btravstack/theme has a Trusted Publisher configured pointing at this
# repo + this workflow file (.github/workflows/release.yml).
# 3. Repo secret RELEASE_PAT (classic PAT with `repo`, or fine-grained with
# Contents + Pull requests read/write) so the "Version Packages" PR fires CI.

on:
push:
branches: [main]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_PAT }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
Comment on lines +30 to +33
# npm Trusted Publishing (OIDC) requires npm >= 11.5.1
- run: npm install -g npm@latest
- run: pnpm install --frozen-lockfile
Comment on lines +34 to +36
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm run release
commit: "chore: release packages"
title: "chore: release packages"
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules/
dist/
.turbo/
*.tsbuildinfo

# VitePress
apps/website/.vitepress/cache/
apps/website/.vitepress/dist/

.DS_Store
Empty file removed .nojekyll
Empty file.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# btravstack web

Turborepo for the btravstack website and its shared VitePress theme.

```
packages/theme/ @btravstack/theme — shared VitePress theme + design tokens (published to npm)
apps/website/ the btravstack landing site (VitePress) → deployed to GitHub Pages
```

## Develop

```sh
pnpm install
pnpm dev # runs the website dev server (builds the theme on demand)
pnpm build # builds the theme, then the website
```

## How it fits together

- **`@btravstack/theme`** wraps VitePress's default theme with the btravstack
design tokens (beetroot brand, Montserrat + JetBrains Mono, light/dark
surfaces). Every btravstack site — this website and the `amqp-contract` /
`temporal-contract` / `unthrown` docs — depends on it, so they all share one
look. It's built with `tsdown` and published to npm via `.github/workflows/release.yml`
(changesets + npm Trusted Publishing).
- **`apps/website`** is a VitePress site that consumes the theme via
`workspace:*` and is deployed to GitHub Pages by `.github/workflows/deploy-website.yml`.

## Releasing the theme

Add a changeset (`pnpm changeset`), merge to `main`; the Release workflow opens
a version PR and, when merged, publishes `@btravstack/theme`. Consumers bump the
dependency to adopt it.
51 changes: 51 additions & 0 deletions apps/website/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { defineConfig } from "vitepress";

const SITE_TITLE = "btravstack";
const SITE_DESCRIPTION =
"Type-safe building blocks for the TypeScript backend: contracts for AMQP & Temporal, and errors as values.";
const SITE_URL = "https://btravstack.github.io";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: SITE_TITLE,
titleTemplate: "An expressive, robust TypeScript backend",
description: SITE_DESCRIPTION,
lang: "en-US",
// user/org site (btravstack.github.io) is served from the domain root
base: "/",
cleanUrls: true,
sitemap: { hostname: SITE_URL },

head: [
["link", { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
["link", { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:title", content: `${SITE_TITLE} — an expressive, robust TypeScript backend` }],
["meta", { property: "og:description", content: SITE_DESCRIPTION }],
["meta", { property: "og:url", content: `${SITE_URL}/` }],
["meta", { property: "og:image", content: `${SITE_URL}/og-btravstack.png` }],
["meta", { name: "twitter:card", content: "summary_large_image" }],
["meta", { name: "twitter:image", content: `${SITE_URL}/og-btravstack.png` }],
],

themeConfig: {
logo: { light: "/logos/btravstack-light.svg", dark: "/logos/btravstack-dark.svg" },
nav: [
{ text: "Packages", link: "/#packages" },
{
text: "Docs",
items: [
{ text: "amqp-contract", link: "https://btravstack.github.io/amqp-contract/" },
{ text: "temporal-contract", link: "https://btravstack.github.io/temporal-contract/" },
{ text: "unthrown", link: "https://btravstack.github.io/unthrown/" },
],
},
],
socialLinks: [{ icon: "github", link: "https://github.com/btravstack" }],
footer: {
message: "Type-safe building blocks for the TypeScript backend. Released under the MIT License.",
copyright: "© 2026 Benoit Travers · betterave 🇫🇷",
},
search: { provider: "local" },
},
});
3 changes: 3 additions & 0 deletions apps/website/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Theme from "@btravstack/theme";

export default Theme;
39 changes: 39 additions & 0 deletions apps/website/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: home

hero:
name: btravstack
text: An expressive, robust TypeScript backend
tagline: Type-safe building blocks for Node — contracts for your messaging and workflows, and a principled way to handle errors. Define things once, let the types flow everywhere.
image:
light: /logos/btravstack-light.svg
dark: /logos/btravstack-dark.svg
alt: btravstack
actions:
- theme: brand
text: Explore on GitHub
link: https://github.com/btravstack

features:
- icon:
light: /logos/amqp-contract-light.svg
dark: /logos/amqp-contract-dark.svg
title: amqp-contract
details: Type-safe contracts for AMQP & RabbitMQ. Define exchanges, queues and messages once — get types and runtime validation on both ends, reliable retries with DLQs, and AsyncAPI 3.0 generation.
link: https://btravstack.github.io/amqp-contract/
linkText: Read the docs
- icon:
light: /logos/temporal-contract-light.svg
dark: /logos/temporal-contract-dark.svg
title: temporal-contract
details: Type-safe contracts for Temporal.io. End-to-end types and automatic validation across workflows, activities and clients, with Result / Future error handling.
link: https://btravstack.github.io/temporal-contract/
linkText: Read the docs
- icon:
light: /logos/unthrown-light.svg
dark: /logos/unthrown-dark.svg
title: unthrown
details: Explicit errors as values, with a separate defect channel for the unexpected. Only a true defect ever throws, and only at unwrap. Zero runtime dependencies.
link: https://btravstack.github.io/unthrown/
linkText: Read the docs
---
20 changes: 20 additions & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@btravstack/website",
"version": "0.0.0",
"private": true,
"type": "module",
"description": "btravstack landing site",
"license": "MIT",
"author": "Benoit TRAVERS",
"scripts": {
"build": "vitepress build .",
"dev": "vitepress dev .",
"preview": "vitepress preview ."
},
"dependencies": {
"@btravstack/theme": "workspace:*"
},
"devDependencies": {
"vitepress": "catalog:"
}
}
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions apps/website/public/logos/amqp-contract-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/website/public/logos/btravstack-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/website/public/logos/btravstack-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/website/public/logos/temporal-contract-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/website/public/logos/unthrown-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed assets/favicon-32.png
Binary file not shown.
Loading