Skip to content

Comments

feat: add routes.json generator for programmatic route access#391

Open
reldothescribe wants to merge 1 commit intoethpandaops:masterfrom
reldothescribe:feat/routes-json
Open

feat: add routes.json generator for programmatic route access#391
reldothescribe wants to merge 1 commit intoethpandaops:masterfrom
reldothescribe:feat/routes-json

Conversation

@reldothescribe
Copy link

Summary

This PR adds a routes.json generator script for programmatic access to Lab routes.

Changes

  • Added scripts/generate-routes-json.js - A script that parses the TanStack Router route tree and generates a machine-readable routes.json file
  • Added generate:routes npm script to run the generator
  • Generated initial routes.json with 48 routes

Routes.json Structure

The generated routes.json includes:

  • generatedAt - ISO timestamp of generation
  • version - Schema version
  • routes - Array of route objects with path, fullPath, name, description, parameters, parent, isIndex, id, filePath, hasChildren, and category
  • categories - List of all categories

Use Cases

This enables other tools to:

  • Know what routes exist
  • Generate deep links
  • Understand route hierarchy
  • Build navigation structures programmatically

Stats

  • 48 total routes
  • 6 parameterized routes (slot, epoch, address, entity, fork, id)
  • 6 categories: beacon, ethereum, experiments, root, xatu, xatu-data

Generated by running pnpm generate:routes

@reldothescribe reldothescribe requested a review from Savid as a code owner February 1, 2026 13:34
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.

1 participant