Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesPull RequestsActionsSecurityInsightsSettings
✨ AI
More
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.tsBlame93 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 ||
43cf9b0Claude22 "https://crontech.ai/api/hooks/gluecron/push"
fc1817aClaude23 );
24 },
43cf9b0Claude25 /**
26 * Bearer token sent on outbound deploy webhook to Crontech's
27 * `POST /api/hooks/gluecron/push` endpoint. Default empty → header is
28 * omitted and Crontech will reject with 401 (treated as a failed deploy).
29 */
30 get gluecronWebhookSecret() {
31 return process.env.GLUECRON_WEBHOOK_SECRET || "";
32 },
e883329Claude33 get anthropicApiKey() {
34 return process.env.ANTHROPIC_API_KEY || "";
35 },
eb3b81aClaude36 /** HMAC secret used to verify inbound GateTest callback signatures. */
37 get gatetestCallbackSecret() {
38 return process.env.GATETEST_CALLBACK_SECRET || "";
39 },
40 /** Shared HMAC secret for signing outbound GateTest payloads. */
41 get gatetestHmacSecret() {
42 return process.env.GATETEST_HMAC_SECRET || "";
43 },
44 /** Bearer token expected on inbound Crontech deploy-event webhooks. */
45 get crontechEventToken() {
46 return process.env.CRONTECH_EVENT_TOKEN || "";
47 },
48 /** Voyage AI API key for semantic (embedding) code search. */
49 get voyageApiKey() {
50 return process.env.VOYAGE_API_KEY || "";
51 },
24cf2caClaude52 /** Email provider: "log" (dev, writes to stderr) or "resend" (HTTPS). */
53 get emailProvider() {
54 const v = (process.env.EMAIL_PROVIDER || "log").toLowerCase();
55 return v === "resend" ? "resend" : "log";
56 },
57 /** "From" address for outbound email. */
58 get emailFrom() {
59 return process.env.EMAIL_FROM || "gluecron <no-reply@gluecron.local>";
60 },
61 /** Resend API key (only used when EMAIL_PROVIDER=resend). */
62 get resendApiKey() {
63 return process.env.RESEND_API_KEY || "";
64 },
65 /** Canonical base URL for outbound links in emails + webhooks. */
66 get appBaseUrl() {
67 return (process.env.APP_BASE_URL || "http://localhost:3000").replace(
68 /\/+$/,
69 ""
70 );
71 },
2df1f8cClaude72 /**
73 * WebAuthn relying-party ID (domain only, no scheme/port). Derived from
74 * appBaseUrl unless overridden. Passkeys issued for one RP ID can't be
75 * replayed against another, so this must be stable.
76 */
77 get webauthnRpId() {
78 if (process.env.WEBAUTHN_RP_ID) return process.env.WEBAUTHN_RP_ID;
79 try {
80 return new URL(this.appBaseUrl).hostname;
81 } catch {
82 return "localhost";
83 }
84 },
85 /** WebAuthn expected origin (must include scheme + port). */
86 get webauthnOrigin() {
87 return process.env.WEBAUTHN_ORIGIN || this.appBaseUrl;
88 },
89 /** Human-facing RP name shown by the browser. */
90 get webauthnRpName() {
91 return process.env.WEBAUTHN_RP_NAME || "gluecron";
92 },
fc1817aClaude93};