No description https://txlog.rda.run
  • JavaScript 98.3%
  • Makefile 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-09 19:19:37 -03:00
.github feat: add GitHub Copilot instructions for VitePress documentation site 2025-09-22 20:25:07 -03:00
docs docs: expand and improve server documentation with new guides and architecture details. 2026-05-09 19:19:37 -03:00
functions feat: enhance version fetching with caching and fallback behavior for agent and server components 2025-10-01 19:28:13 -03:00
.gitignore feat: Atualiza as dependências do site 2025-09-01 14:05:53 -03:00
Makefile Add Makefile with commands for local site execution 2025-02-05 02:18:25 +00:00
package-lock.json chore: update vitepress to alpha.17 and add mermaid dependency 2026-04-21 22:03:14 -03:00
package.json chore: update vitepress to alpha.17 and add mermaid dependency 2026-04-21 22:03:14 -03:00
README.md chore: upgrade VitePress to v2 alpha and update installation instructions in README. 2026-01-27 22:45:55 -03:00

txlog.rda.run

This repository contains Cloudflare Workers functions to dynamically fetch and display the latest version badges for the Txlog Agent and Server components on the txlog.rda.run website.

Setup Instructions

0. Install dependencies

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 24
npm add -D vitepress@next

1. Create GitHub Personal Access Token

  1. Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click "Generate new token (classic)"
  3. Give it a descriptive name like "txlog-version-badge"
  4. Select expiration (recommend 1 year)
  5. No scopes needed - leave all checkboxes unchecked (we only need public repo access)
  6. Click "Generate token"
  7. Copy the token immediately (it won't be shown again)

2. Configure Environment Variable for Cloudflare Pages/Workers

# Set environment variable in Cloudflare dashboard
GITHUB_TOKEN=ghp_your_token_here

3. Optional: KV Cache Setup

For even better performance, you can set up a KV store:

  1. Create a KV namespace called "txlog-cache"
  2. Bind it to the CACHE environment variable in your Pages settings

Fallback Behavior

Even without the token, the functions now have improved fallback behavior:

  • Returns hardcoded versions when API fails (v1.6.3 for agent, v1.12.1 for server)
  • Implements client-side caching with Cache-Control headers
  • Graceful degradation instead of error messages

Current Hardcoded Fallback Versions

  • Agent: v1.6.3
  • Server: v1.12.1

Update these in the functions if newer versions are released and the API is still failing.

Run dev server locally

npx vitepress dev docs