refactor: organize desktop vs. mobile into separate folders

This commit is contained in:
Arjun Patel
2026-04-29 08:42:56 -07:00
parent 3d9fe67936
commit 3a11a82cd3
194 changed files with 213 additions and 213 deletions
+60
View File
@@ -0,0 +1,60 @@
// Build-time environment selection.
//
// __APP_ENV__ is replaced by Vite via `define` in each vite.*.config.ts. Selected
// via the APP_ENV env var at build/dev time (defaults to 'dev'). `yarn package`,
// `yarn make`, and `yarn release` set APP_ENV=prod.
//
// Firebase web config is public by design (security is enforced via Firestore
// rules + App Check), so both configs live in source. To refresh, run:
// cd infra/gcp/{dev,prod} && terraform output -json firebase_config
declare const __APP_ENV__: "dev" | "prod";
type FirebaseConfig = {
apiKey: string;
appId: string;
authDomain: string;
messagingSenderId: string;
projectId: string;
storageBucket: string;
};
type AppConfig = {
orionUrl: string;
pusherUrl: string;
firebase: FirebaseConfig;
/** Empty string disables Sentry. Same DSN across envs; events are split by `environment` tag. */
sentryDsn: string;
};
const configs: Record<"dev" | "prod", AppConfig> = {
dev: {
orionUrl: "https://orion.dev.flowy.live",
pusherUrl: "wss://pusher.dev.flowy.live/ws",
firebase: {
apiKey: "AIzaSyDF_fbk7tDY9tNxUiOwwi--2nYZWZygMGk",
appId: "1:1006580076785:web:e2a0736d60a78e02b15950",
authDomain: "flowy-dev-440017.firebaseapp.com",
messagingSenderId: "1006580076785",
projectId: "flowy-dev-440017",
storageBucket: "flowy-dev-440017.firebasestorage.app",
},
sentryDsn: "https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
},
prod: {
orionUrl: "https://orion.flowy.live",
pusherUrl: "wss://pusher.flowy.live/ws",
firebase: {
apiKey: "AIzaSyB8it3SKr9DHScHGlpu4uwWicvt8wzjdBg",
appId: "1:68063426854:web:5054f16f50898f5706e9e7",
authDomain: "flowy-prod-440017.firebaseapp.com",
messagingSenderId: "68063426854",
projectId: "flowy-prod-440017",
storageBucket: "flowy-prod-440017.firebasestorage.app",
},
sentryDsn: "https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
},
};
export const appConfig: AppConfig = configs[__APP_ENV__];
export const appEnv: "dev" | "prod" = __APP_ENV__;