initial commit

This commit is contained in:
-Puter
2026-07-19 02:46:47 +05:30
commit 8033a8edb0
121 changed files with 7845 additions and 0 deletions

17
packages/env/src/native.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
import { createEnv } from "@t3-oss/env-core";
import { z } from "zod";
const convexUrlSchema = (exampleHost: string) =>
z.url().refine((url) => new URL(url).hostname !== exampleHost, {
message: `Replace the ${exampleHost} placeholder before running the app`,
});
export const env = createEnv({
clientPrefix: "EXPO_PUBLIC_",
client: {
EXPO_PUBLIC_CONVEX_URL: convexUrlSchema("example.convex.cloud"),
EXPO_PUBLIC_CONVEX_SITE_URL: convexUrlSchema("example.convex.site"),
},
runtimeEnv: process.env,
emptyStringAsUndefined: true,
});

18
packages/env/src/web.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
import { createEnv } from "@t3-oss/env-core";
import { z } from "zod";
const convexUrlSchema = (exampleHost: string) =>
z.url().refine((url) => new URL(url).hostname !== exampleHost, {
message: `Replace the ${exampleHost} placeholder before running the app`,
});
export const env = createEnv({
clientPrefix: "VITE_",
client: {
VITE_CONVEX_URL: convexUrlSchema("example.convex.cloud"),
VITE_CONVEX_SITE_URL: convexUrlSchema("example.convex.site"),
},
runtimeEnv: (import.meta as any).env,
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
emptyStringAsUndefined: true,
});