Guidance for AI coding agents working on this repository.
backloop.dev provides HTTPS on localhost for local development:
- DNS: any subdomain of
*.backloop.devresolves to127.0.0.1and::1. - A publicly shared wildcard SSL certificate for
*.backloop.dev(Let's Encrypt), renewed weekly and published on https://backloop.dev. - Certificates are not bundled in the npm package: they are downloaded from
https://backloop.dev/pack.jsonat install time (postinstall) and refreshed at runtime when close to expiry.
The apex domain backloop.dev is the only exception: it points to the certificate download page (GitHub Pages).
| Path | What it is |
|---|---|
nodejs/ |
The backloop.dev npm package: Node API (httpsOptions*), CLI static server, reverse proxy, multi-host config server, cert updater. Most of the code and docs live here. |
vitejs/ |
The vite-plugin-backloop.dev npm package: thin Vite plugin wrapping nodejs/. |
renew/ |
Certificate renewal infrastructure (Let's Encrypt + Gandi DNS). Runs via GitHub workflow; needs secrets (ACME_ACCOUNT_*, GANDI_API_TOKEN). Do not modify unless explicitly asked. |
.github/workflows/ |
Scheduled certificate renewal. |
branch gh-pages |
The https://backloop.dev website: cert files, pack.json, llms.txt, robots.txt. Jekyll-rendered README. |
branch renew-gh-pages |
Publishing target used by the renewal job. |
There is no root package.json: nodejs/, vitejs/ and renew/ are independent npm projects.
cd nodejs
npm install
npm test # Node.js built-in test runner (Node 18+ required)
npm run lint # eslint with neostandardvitejs/ has no tests; renew/ cannot be run without production secrets.
npm installinnodejs/triggerspostinstall: node bin/update.js, which needs network access to fetchhttps://backloop.dev/pack.json. In a sandboxed/offline environment, install withnpm install --ignore-scriptsand pre-seed certificates by pointingBACKLOOP_DEV_CERTS_DIRto a directory containing a validpack.json.src/check.jsexits the process if the certs directory does not exist. The default isnodejs/certs/(kept by.gitkeep).- The private key is published split in two files (
backloop.dev-key.part1.pem+part2); concatenate them to get the usable key.pack.jsoncarries them askey1+key2. - The published cert is intentionally public (it only secures loopback traffic); do not "fix" this by treating it as a leaked secret.
- License: BSD-3-Clause. Source files carry a
@licenseheader, managed via.licenser.yml. - Lint style: neostandard (no semicolon-free style — run
npm run lintbefore committing). nodejs/CHANGELOG.mdis updated for every release; version lives innodejs/package.json.vitejs/depends onbackloop.devwith a^range — when releasing a breaking change innodejs/, also update and releasevitejs/.- Keep
nodejs/README.mdthe canonical documentation; the root README and the website only summarize and link to it.
When user-facing behavior changes, update all that apply:
nodejs/README.md(canonical docs, shipped to npm)nodejs/AGENTS.mdandvitejs/AGENTS.md(shipped to npm)- Root
README.md gh-pagesbranch:README.md,llms.txt,llms-full.txt(the website)