diff options
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 19 |
1 files changed, 7 insertions, 12 deletions
@@ -5,33 +5,28 @@ cgithub is a lightweight GitHub alternative frontend that scrapes GitHub's serve ## Commands ```bash -# Development (watch mode with hot reload) +# Local dev server (Cloudflare Workers runtime) pnpm run dev -# Production build (bundles to dist/) -pnpm run build +# Deploy to Cloudflare Workers +pnpm run deploy # Run tests pnpm test - -# Cloudflare Workers: local dev and deploy -pnpm run dev:cf -pnpm run deploy:cf ``` ## Architecture -**Stack:** Hono (web framework) + Eta (templating) + TypeScript, bundled with esbuild +**Stack:** Hono (web framework) + Eta (templating) + TypeScript, running on Cloudflare Workers **Source files:** -- `src/app.ts` - Hono routes, shared by both entry points -- `src/index.ts` - Node server entry (supports systemd socket activation via `LISTEN_FDS=1`) +- `src/app.ts` - Hono routes - `src/worker.ts` - Cloudflare Workers entry (config in `wrangler.jsonc`) - `src/scraper.ts` - GitHub HTML fetching and JSON extraction logic -**Templates:** `views/*.eta` - Eta templates with layout inheritance (`layout.eta` as base). On Workers, runtime code generation is disallowed, so `scripts/compile-views.ts` precompiles templates to `src/views.generated.ts` (gitignored, regenerated by the `dev:cf`/`deploy:cf` scripts). +**Templates:** `views/*.eta` - Eta templates with layout inheritance (`layout.eta` as base). On Workers, runtime code generation is disallowed, so `scripts/compile-views.ts` precompiles templates to `src/views.generated.ts` (gitignored, regenerated by the `dev`/`deploy` scripts). -**Static files:** `public/static/*`, served by `@hono/node-server` on Node and by Workers Static Assets on Cloudflare. +**Static files:** `public/static/*`, served by Workers Static Assets. **Routes:** - `GET /:owner` - User or organization profile with pinned repositories |
