major updates to device and links management in admin

This commit is contained in:
user
2026-03-28 15:34:03 +02:00
parent e8c5986df6
commit 6639bcd799
32 changed files with 3304 additions and 496 deletions

View File

@@ -18,7 +18,8 @@ export const settingsSchema = v.object({
internalApiKey: v.string(),
debugKey: v.string(),
processorApiUrl: v.string(),
orchestratorApiUrl: v.string(),
wsScrcpySvcUrl: v.string(),
betterAuthUrl: v.string(),
betterAuthSecret: v.string(),
@@ -32,19 +33,6 @@ export const settingsSchema = v.object({
otelServiceName: v.string(),
otelExporterOtlpHttpEndpoint: v.string(),
// R2/Object Storage settings
r2BucketName: v.string(),
r2Region: v.string(),
r2Endpoint: v.string(),
r2AccessKey: v.string(),
r2SecretKey: v.string(),
r2PublicUrl: v.optional(v.string()),
// File upload settings
maxFileSize: v.number(),
allowedMimeTypes: v.array(v.string()),
allowedExtensions: v.array(v.string()),
});
export type Settings = v.InferOutput<typeof settingsSchema>;
@@ -95,15 +83,11 @@ function loadSettings(): Settings {
internalApiKey: getEnv("INTERNAL_API_KEY"),
debugKey: getEnv("DEBUG_KEY"),
processorApiUrl: getEnv("PROCESSOR_API_URL", "http://localhost:3000"),
appBuilderApiUrl: getEnv(
"APP_BUILDER_API_URL",
"http://localhost:3001",
),
appBuilderAssetsPublicUrl: getEnv(
"APP_BUILDER_ASSETS_PUBLIC_URL",
"http://localhost:3001",
orchestratorApiUrl: getEnv(
"ORCHESTRATOR_API_URL",
"http://localhost:3000",
),
wsScrcpySvcUrl: getEnv("WS_SCRCPY_SVC_URL"),
betterAuthUrl: getEnv("BETTER_AUTH_URL"),
betterAuthSecret: getEnv("BETTER_AUTH_SECRET"),
@@ -122,26 +106,6 @@ function loadSettings(): Settings {
otelExporterOtlpHttpEndpoint: getEnv(
"OTEL_EXPORTER_OTLP_HTTP_ENDPOINT",
),
// R2/Object Storage settings
r2BucketName: getEnv("R2_BUCKET_NAME"),
r2Region: getEnv("R2_REGION", "auto"),
r2Endpoint: getEnv("R2_ENDPOINT"),
r2AccessKey: getEnv("R2_ACCESS_KEY"),
r2SecretKey: getEnv("R2_SECRET_KEY"),
r2PublicUrl: getEnv("R2_PUBLIC_URL") || undefined,
// File upload settings
maxFileSize: getEnvNumber("MAX_FILE_SIZE", 10485760), // 10MB default
allowedMimeTypes: parseCommaSeparated(
getEnv(
"ALLOWED_MIME_TYPES",
"image/jpeg,image/png,image/webp,image/gif,application/pdf,text/plain",
),
),
allowedExtensions: parseCommaSeparated(
getEnv("ALLOWED_EXTENSIONS", "jpg,jpeg,png,webp,gif,pdf,txt"),
),
};
try {