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.tsBlame77 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 },
24cf2caClaude36 /** Email provider: "log" (dev, writes to stderr) or "resend" (HTTPS). */
37 get emailProvider() {
38 const v = (process.env.EMAIL_PROVIDER || "log").toLowerCase();
39 return v === "resend" ? "resend" : "log";
40 },
41 /** "From" address for outbound email. */
42 get emailFrom() {
43 return process.env.EMAIL_FROM || "gluecron <no-reply@gluecron.local>";
44 },
45 /** Resend API key (only used when EMAIL_PROVIDER=resend). */
46 get resendApiKey() {
47 return process.env.RESEND_API_KEY || "";
48 },
49 /** Canonical base URL for outbound links in emails + webhooks. */
50 get appBaseUrl() {
51 return (process.env.APP_BASE_URL || "http://localhost:3000").replace(
52 /\/+$/,
53 ""
54 );
55 },
2df1f8cClaude56 /**
57 * WebAuthn relying-party ID (domain only, no scheme/port). Derived from
58 * appBaseUrl unless overridden. Passkeys issued for one RP ID can't be
59 * replayed against another, so this must be stable.
60 */
61 get webauthnRpId() {
62 if (process.env.WEBAUTHN_RP_ID) return process.env.WEBAUTHN_RP_ID;
63 try {
64 return new URL(this.appBaseUrl).hostname;
65 } catch {
66 return "localhost";
67 }
68 },
69 /** WebAuthn expected origin (must include scheme + port). */
70 get webauthnOrigin() {
71 return process.env.WEBAUTHN_ORIGIN || this.appBaseUrl;
72 },
73 /** Human-facing RP name shown by the browser. */
74 get webauthnRpName() {
75 return process.env.WEBAUTHN_RP_NAME || "gluecron";
76 },
fc1817aClaude77};