Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

config.ts

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

config.tsBlame87 lines · 1 contributor
fc1817aClaude1import { join } from "path";
2
3export const config = {
4 get port() {
5 return Number(process.env.PORT || 3000);
6 },
7 get databaseUrl() {
8 return process.env.DATABASE_URL || "";
9 },
10 get gitReposPath() {
11 return process.env.GIT_REPOS_PATH || join(process.cwd(), "repos");
12 },
13 get gatetestUrl() {
a4e1564Claude14 return process.env.GATETEST_URL || "https://gatetest.ai/api/events/push";
fc1817aClaude15 },
e883329Claude16 get gatetestApiKey() {
17 return process.env.GATETEST_API_KEY || "";
18 },
fc1817aClaude19 get crontechDeployUrl() {
20 return (
21 process.env.CRONTECH_DEPLOY_URL ||
ba93444Claude22 "https://crontech.ai/api/webhooks/gluecron-push"
fc1817aClaude23 );
24 },
43cf9b0Claude25 /**
ba93444Claude26 * BLK-016 — only fire the Crontech deploy webhook for pushes to this
27 * `<owner>/<name>`. Every other repo's push is ignored. Override per
28 * environment via `CRONTECH_REPO`.
29 */
30 get crontechRepo() {
31 return process.env.CRONTECH_REPO || "ccantynz-alt/crontech";
32 },
33 /**
34 * Shared HMAC secret for the outbound deploy webhook to Crontech's
35 * `POST /api/webhooks/gluecron-push` endpoint. Used to compute the
36 * `X-Gluecron-Signature: sha256=<hex>` header on every fire. Default
37 * empty → header is omitted and Crontech will reject with 401 (treated
38 * as a failed deploy).
43cf9b0Claude39 */
40 get gluecronWebhookSecret() {
41 return process.env.GLUECRON_WEBHOOK_SECRET || "";
42 },
e883329Claude43 get anthropicApiKey() {
44 return process.env.ANTHROPIC_API_KEY || "";
45 },
24cf2caClaude46 /** Email provider: "log" (dev, writes to stderr) or "resend" (HTTPS). */
47 get emailProvider() {
48 const v = (process.env.EMAIL_PROVIDER || "log").toLowerCase();
49 return v === "resend" ? "resend" : "log";
50 },
51 /** "From" address for outbound email. */
52 get emailFrom() {
53 return process.env.EMAIL_FROM || "gluecron <no-reply@gluecron.local>";
54 },
55 /** Resend API key (only used when EMAIL_PROVIDER=resend). */
56 get resendApiKey() {
57 return process.env.RESEND_API_KEY || "";
58 },
59 /** Canonical base URL for outbound links in emails + webhooks. */
60 get appBaseUrl() {
61 return (process.env.APP_BASE_URL || "http://localhost:3000").replace(
62 /\/+$/,
63 ""
64 );
65 },
2df1f8cClaude66 /**
67 * WebAuthn relying-party ID (domain only, no scheme/port). Derived from
68 * appBaseUrl unless overridden. Passkeys issued for one RP ID can't be
69 * replayed against another, so this must be stable.
70 */
71 get webauthnRpId() {
72 if (process.env.WEBAUTHN_RP_ID) return process.env.WEBAUTHN_RP_ID;
73 try {
74 return new URL(this.appBaseUrl).hostname;
75 } catch {
76 return "localhost";
77 }
78 },
79 /** WebAuthn expected origin (must include scheme + port). */
80 get webauthnOrigin() {
81 return process.env.WEBAUTHN_ORIGIN || this.appBaseUrl;
82 },
83 /** Human-facing RP name shown by the browser. */
84 get webauthnRpName() {
85 return process.env.WEBAUTHN_RP_NAME || "gluecron";
86 },
fc1817aClaude87};