Production-ready Next.js boilerplate with: - Runtime env validation (fail-fast on missing vars) - Feature-gated config (S3, Stripe, email, OAuth) - Docker + Coolify deployment pipeline - PostgreSQL + pgvector, MinIO S3, Better Auth - TypeScript strict mode (no ignoreBuildErrors) - i18n (en/es), AI modules, billing, monitoring Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
605 B
TypeScript
27 lines
605 B
TypeScript
import { defineEnv } from "envin";
|
|
import * as z from "zod";
|
|
|
|
import { envConfig, NodeEnv } from "@turbostarter/shared/constants";
|
|
|
|
import { sharedPreset } from "../../utils/env";
|
|
|
|
import type { Preset } from "envin/types";
|
|
|
|
export const preset = {
|
|
id: "polar",
|
|
server: {
|
|
POLAR_ACCESS_TOKEN: z.string(),
|
|
POLAR_WEBHOOK_SECRET: z.string(),
|
|
POLAR_ORGANIZATION_SLUG: z.string().optional(),
|
|
},
|
|
extends: [sharedPreset],
|
|
} as const satisfies Preset;
|
|
|
|
export const env = defineEnv({
|
|
...envConfig,
|
|
...preset,
|
|
shared: {
|
|
NODE_ENV: z.enum(NodeEnv).default(NodeEnv.DEVELOPMENT),
|
|
},
|
|
});
|