Files
tessera/src/config.ts
Gjermund Høsøien Wiggen 1c92f488f7 merge: inbound email processing from worktree/ageless-shale
Merge the mail.tm transport and email processing pipeline into main.
- Transport-agnostic email processor with mail.tm polling transport
- POST /mailgate webhook endpoint
- User/queue/ticket resolvers with stub user auto-creation
- Queue mail_alias column for email routing
- Migration renumbered to 0021 to follow main's 0019/0020

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:42:37 +02:00

23 lines
919 B
TypeScript

import { z } from 'zod/v4';
const configSchema = z.object({
DATABASE_URL: z.string().min(1),
SERVER_HOST: z.string().default('127.0.0.1'),
SERVER_PORT: z.coerce.number().int().positive().default(8080),
SMTP_HOST: z.string().default('localhost'),
SMTP_PORT: z.coerce.number().int().positive().default(587),
SMTP_USER: z.string().optional(),
SMTP_PASS: z.string().optional(),
SMTP_FROM: z.string().default('tessera@localhost'),
UPLOAD_DIR: z.string().default('./data/uploads'),
JWT_SECRET: z.string().default('tessera-dev-secret-change-in-production'),
// Inbound email
MAIL_TRANSPORT: z.enum(['mailtm', 'webhook', 'none']).default('none'),
MAILTM_POLL_SECONDS: z.coerce.number().int().positive().default(30),
MAILTM_ADDRESS: z.string().optional(),
MAILTM_ACCOUNT_ID: z.string().optional(),
MAILTM_TOKEN: z.string().optional(),
});
export const config = configSchema.parse(process.env);