{"id":30559368,"url":"https://github.com/rawnly/shadcn-github-proxy","last_synced_at":"2025-08-28T09:34:48.016Z","repository":{"id":308604689,"uuid":"1033418141","full_name":"rawnly/shadcn-github-proxy","owner":"rawnly","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-07T08:51:28.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-17T19:57:01.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gh-registry.untitled.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawnly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-06T19:32:27.000Z","updated_at":"2025-08-07T08:51:31.000Z","dependencies_parsed_at":"2025-08-06T21:34:35.800Z","dependency_job_id":"0973ceb9-9ecb-4484-8f35-4eabe01e3653","html_url":"https://github.com/rawnly/shadcn-github-proxy","commit_stats":null,"previous_names":["rawnly/shadcn-github-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rawnly/shadcn-github-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fshadcn-github-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fshadcn-github-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fshadcn-github-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fshadcn-github-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawnly","download_url":"https://codeload.github.com/rawnly/shadcn-github-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fshadcn-github-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272477009,"owners_count":24940962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-28T09:34:46.800Z","updated_at":"2025-08-28T09:34:48.006Z","avatar_url":"https://github.com/rawnly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shadcn Registry Proxy\n\nA lightweight proxy service that dynamically fetches component registry files from GitHub repositories, eliminating the need to deploy and maintain your own registry infrastructure.\n\n## Overview\n\nThis service acts as a proxy between shadcn/ui CLI and GitHub repositories containing component registries. Instead of hosting registry files on your own server, it fetches them on-demand from GitHub's raw content URLs with intelligent caching.\n\n## Features\n\n- **Zero Infrastructure**: No need to deploy registry files - fetch directly from GitHub\n- **Intelligent Caching**: In-memory TTL-based caching (1 hour default) with background cleanup\n- **Force Refresh**: Bypass cache with `?force=true` query parameter\n- **Observability**: Built-in OpenTelemetry tracing for monitoring and debugging\n- **Type Safety**: Full TypeScript support with Effect schema validation\n\n## Quick Start\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) runtime\n- GitHub Personal Access Token with repository read permissions\n\n### Installation\n\n```sh\nbun install\n```\n\n### Environment Setup\n\nCreate a `.env` file:\n\n```env\nGH_TOKEN=your_github_personal_access_token # Optional, higher rate limit applies if not provided\nPORT=8000  # Optional, defaults to 8000\n```\n\n### Development\n\n```sh\nbun run dev\n```\n\nThe service will be available at `http://localhost:8000`\n\n## Usage\n\n### API Endpoint\n\n```\nGET /:owner/:repo/:filepath.json\n```\n\n**Parameters:**\n\n- `owner`: GitHub repository owner\n- `repo`: GitHub repository name\n- `filepath`: Path to the JSON file (must end with `.json`)\n\n**Query Parameters:**\n\n- `force`: Set to `true` or `1` to bypass cache and fetch fresh content\n\n### Example\n\n```bash\n# Fetch a component registry file\ncurl https://gh-registry.untitled.dev/shadcn-ui/registry-template/hello-world.json\n\n# Force refresh (bypass cache)\ncurl https://gh-registry.untitled.dev/shadcn-ui/registry-template/hello-world.json?force=true\n\n# nested files\ncurl https://gh-registry.untitled.dev/origin-space/originui/legacy/accordion.json\n```\n\n## Architecture\n\nBuilt with modern TypeScript and functional programming principles:\n\n- **Runtime**: Bun with TypeScript\n- **HTTP Framework**: Hono for lightweight, fast routing\n- **FP Library**: Effect for dependency injection and error handling\n- **Observability**: OpenTelemetry with OTLP trace export\n- **Code Quality**: Biome for formatting and linting\n\n### File Structure\n\n- `src/index.ts` - Main HTTP server with routing and caching logic\n- `src/github.ts` - GitHub API integration service\n- `src/cache.ts` - TTL-based in-memory cache implementation\n- `src/schema.ts` - Type-safe data validation schemas\n- `src/otel.ts` - OpenTelemetry configuration\n\n## Configuration\n\nThe service looks for registry files in the `public/r/` directory of target repositories. This path is currently hardcoded but can be modified in `src/github.ts`.\n\n### Code Quality\n\n```sh\n# Format code\nbunx biome format .\n\n# Lint code\nbunx biome lint .\n\n# Check both formatting and linting\nbunx biome check .\n```\n\n## Deployment\n\nThe service can be deployed to any platform supporting Bun:\n\n1. Set the `GH_TOKEN` environment variable (optional but highly recommended)\n2. Optionally set `PORT` (defaults to 8000)\n3. Run `bun run dev` or build for production\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fshadcn-github-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawnly%2Fshadcn-github-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fshadcn-github-proxy/lists"}