Blame · Line-by-line history
CLAUDE.md
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| fc1817a | 1 | # gluecron |
| 2 | ||
| 3 | AI-native code intelligence platform — git hosting, automated CI, and green ecosystem enforcement. | |
| 4 | ||
| 5 | ## Stack | |
| 6 | ||
| 7 | - **Runtime:** Bun | |
| 8 | - **Framework:** Hono (with JSX for server-rendered views) | |
| 9 | - **Database:** Drizzle ORM + Neon (PostgreSQL) | |
| 10 | - **Git:** Smart HTTP protocol via git CLI subprocesses | |
| 11 | ||
| 12 | ## Development | |
| 13 | ||
| 14 | ```bash | |
| 15 | bun install # install dependencies | |
| 16 | bun dev # start dev server (hot reload) | |
| 17 | bun test # run tests | |
| 18 | bun run db:migrate # run database migrations | |
| 19 | ``` | |
| 20 | ||
| 21 | ## Architecture | |
| 22 | ||
| 23 | ``` | |
| 24 | src/ | |
| 25 | index.ts Entry point (Bun server) | |
| 26 | app.ts Hono app composition | |
| 27 | lib/config.ts Environment config (getters, reads env at access time) | |
| 28 | db/ | |
| 29 | schema.ts Drizzle schema (users, repositories, ssh_keys) | |
| 30 | index.ts Lazy DB connection (proxy pattern) | |
| 31 | migrate.ts Migration runner | |
| 32 | git/ | |
| 33 | repository.ts Git operations (tree, blob, commits, diff, branches) | |
| 34 | protocol.ts Smart HTTP protocol (pkt-line, service RPC) | |
| 35 | hooks/ | |
| 36 | post-receive.ts GateTest + Crontech webhooks on push | |
| 37 | routes/ | |
| 38 | git.ts Git HTTP endpoints (clone/push) | |
| 39 | api.ts REST API (repo CRUD, setup) | |
| 40 | web.tsx Web UI (file browser, commits, diffs) | |
| 41 | views/ | |
| 42 | layout.tsx HTML shell + CSS | |
| 43 | components.tsx UI components (file table, commit list, diff viewer) | |
| 44 | ``` | |
| 45 | ||
| 46 | ## Integrations | |
| 47 | ||
| 48 | - **GateTest:** POST `https://gatetest.ai/api/scan/run` on every `git push` | |
| 49 | - **Crontech:** POST `https://crontech.ai/api/trpc/tenant.deploy` on push to main | |
| 50 | ||
| 51 | ## Environment Variables | |
| 52 | ||
| 53 | See `.env.example` for required variables. Key ones: | |
| 54 | - `DATABASE_URL` — Neon PostgreSQL connection string | |
| 55 | - `GIT_REPOS_PATH` — directory for bare git repos (default: `./repos`) | |
| 56 | - `PORT` — HTTP port (default: 3000) |