Skip to content

Sites and deployment

There are two websites, each its own Vercel project built from the same repository.

Library site Docs
Address besci-skills.vercel.app besci-skills-docs.vercel.app
Vercel project besci-skills besci-skills-docs
Root directory the repository root docs-site
Built by scripts/build_site.py (Python) Astro with Starlight (Node 24)
Settings file vercel.json docs-site/vercel.json
Output site/dist/ docs-site/dist/

Both deploy main to production on every merge. Every pull request gets a preview of each, linked in a comment by Vercel’s bot. Previews need a Vercel login; production doesn’t.

scripts/build_site.py reads the skills, workflows, and taxonomy, and writes a static site with no framework. Besides the pages, it writes:

  • data/catalog.json and data/skills.json, the catalog in machine-readable form;
  • llms.txt, a plain-text index for AI tools;
  • feed.xml, the RSS feed behind What’s new;
  • sitemap.xml.

scripts/vercel_build.sh installs the Python dependencies and runs the builder on Vercel. vercel.json also sets security headers and sends the old /install/, /contribute/, and /about/ addresses to these docs.

Two environment variables change the build. SITE_URL and DOCS_URL set the two sites’ addresses for links and canonical URLs. Page-view analytics are only added on Vercel; set BESCI_ANALYTICS=1 to include them in a local build.

The library site has a few Python functions in api/, which Vercel runs on request.

Function What it does
submit.py Takes a .skill file from the upload form, checks the contributor key, validates it, and opens a pull request.
auth.py Signs people in with Google and keeps a session cookie.
review.py Files an expert review as a GitHub issue.
reviews.py Lists every expert review, grouped by skill, for the skill pages.
ratings.py Stores star ratings and comments, and lets admins hide or delete them.
health.py Checks that the database answers.

They need these environment variables, set in the besci-skills Vercel project:

Variable Used for
SITE_URL The site’s address. Writes from any other origin are refused.
SESSION_SECRET Signs the session cookie. At least 16 characters.
GOOGLE_CLIENT_ID The Google sign-in button.
REVIEW_DOMAINS Email domains whose staff may file expert reviews. Defaults to agency.fund,irrationallabs.com.
REVIEWER_EMAILS Extra individual reviewers, comma-separated.
ADMIN_EMAILS People who may hide or delete ratings.
SUPABASE_URL, SUPABASE_SECRET_KEY The database.
GITHUB_TOKEN, GITHUB_REPO Opening review issues and upload pull requests.
CONTRIBUTOR_KEY The shared key for the upload form.

Sign-ins, ratings, and a log of review and rating events live in a Supabase database. Only the server functions talk to it; the browser never does. The tables are defined in api/schema.sql. Supabase pauses free projects after about a week without use, so the keepalive.yml workflow calls /api/health every three days. If the call fails, the workflow run fails, and GitHub sends its usual failure email.

These pages are Markdown files in docs-site/src/content/docs/. The sidebar is set in docs-site/astro.config.mjs, and the theme is Starlight Nova. docs-site/README.md explains how to add a page and a screenshot.

docs-site/vercel.json gives the docs their own install and build commands. Without it, Vercel would pick up the library site’s vercel.json and try to run the Python build.

The logo is “/besci-skills” in Geist Mono, the library site’s code font, with the slash (as in a Claude Code slash command) in bold and a block cursor after the name, both in the site’s yellow (#F1B505). The letters are drawn as shapes, so the logo looks the same without the font installed. On the library site the logo links home and sits beside the Home tab, and on the home page the cursor blinks three times and then holds (it stays still for readers who turn off motion). The files are site/src/assets/logo.svg (text takes the page’s color) and docs-site/src/assets/logo-light.svg and logo-dark.svg. The favicon, site/src/assets/favicon.svg with a copy at docs-site/public/favicon.svg, is the yellow slash on a dark tile.