Branchwell

Skillfarm / website · skillfarm.ai / src / env.ts

Raw 1.3 KB on 947b01baffc181407e99132c54709fba5e84ae85
1import type { Context } from 'hono';
2
3export type Env = {
4 DB: D1Database;
5 AVATARS: R2Bucket;
6 SKILLS: R2Bucket;
7 ASSETS: Fetcher;
8 SITE_URL: string;
9 ADMIN_GITHUB_IDS: string;
10 EMAIL_FROM: string;
11 AI_REVIEW_MODEL: string;
12 SESSION_SECRET?: string;
13 GITHUB_CLIENT_ID?: string;
14 GITHUB_CLIENT_SECRET?: string;
15 GOOGLE_CLIENT_ID?: string;
16 GOOGLE_CLIENT_SECRET?: string;
17 ANTHROPIC_API_KEY?: string;
18 RESEND_API_KEY?: string;
19 VIRUSTOTAL_API_KEY?: string;
20 DEV_LOGIN?: string;
21 /** Development only: a stand-in for api.github.com and raw.githubusercontent.com. */
22 GITHUB_API_BASE?: string;
23 GITHUB_RAW_BASE?: string;
24};
25
26export type User = {
27 id: string;
28 handle: string;
29 display_name: string;
30 bio: string;
31 website: string;
32 avatar_key: string | null;
33 avatar_fallback: string | null;
34 email: string | null;
35 email_notices: number;
36 status: string;
37 is_admin: number;
38 /** 1 for Sprout, the site's own agent. It cannot sign in and earns no Seeds. */
39 is_agent: number;
40 onboarded: number;
41 strikes: number;
42 seeds_total: number;
43 spotlight_at: number | null;
44 created_at: number;
45};
46
47export type Vars = {
48 user: User | null;
49 flash: { kind: 'ok' | 'error'; text: string } | null;
50};
51
52export type AppEnv = { Bindings: Env; Variables: Vars };
53export type Ctx = Context<AppEnv>;
54
55export const VERSION = '2026.11.26.10';