Files
hristudio/src/env.js
Sean O'Connor 433c1c4517 docs: consolidate and restructure documentation architecture
- Remove outdated root-level documentation files
  - Delete IMPLEMENTATION_STATUS.md, WORK_IN_PROGRESS.md, UI_IMPROVEMENTS_SUMMARY.md, CLAUDE.md

- Reorganize documentation into docs/ folder
  - Move UNIFIED_EDITOR_EXPERIENCES.md → docs/unified-editor-experiences.md
  - Move DATATABLE_MIGRATION_PROGRESS.md → docs/datatable-migration-progress.md
  - Move SEED_SCRIPT_README.md → docs/seed-script-readme.md

- Create comprehensive new documentation
  - Add docs/implementation-status.md with production readiness assessment
  - Add docs/work-in-progress.md with active development tracking
  - Add docs/development-achievements.md consolidating all major accomplishments

- Update documentation hub
  - Enhance docs/README.md with complete 13-document structure
  - Organize into logical categories: Core, Status, Achievements
  - Provide clear navigation and purpose for each document

Features:
- 73% code reduction achievement through unified editor experiences
- Complete DataTable migration with enterprise features
- Comprehensive seed database with realistic research scenarios
- Production-ready status with 100% backend, 95% frontend completion
- Clean documentation architecture supporting future development

Breaking Changes: None - documentation restructuring only
Migration: Documentation moved to docs/ folder, no code changes required
2025-08-04 23:54:47 -04:00

65 lines
2.0 KiB
JavaScript

import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
/**
* Specify your server-side environment variables schema here. This way you can ensure the app
* isn't built with invalid env vars.
*/
server: {
AUTH_SECRET:
process.env.NODE_ENV === "production"
? z.string()
: z.string().optional(),
DATABASE_URL: z.string().url(),
NODE_ENV: z
.enum(["development", "test", "production"])
.default("development"),
// Minio/S3 Configuration
MINIO_ENDPOINT: z.string().optional(),
MINIO_REGION: z.string().optional(),
MINIO_ACCESS_KEY: z.string().optional(),
MINIO_SECRET_KEY: z.string().optional(),
MINIO_BUCKET_NAME: z.string().optional(),
},
/**
* Specify your client-side environment variables schema here. This way you can ensure the app
* isn't built with invalid env vars. To expose them to the client, prefix them with
* `NEXT_PUBLIC_`.
*/
client: {
// NEXT_PUBLIC_CLIENTVAR: z.string(),
},
/**
* You can't destruct `process.env` as a regular object in the Next.js edge runtimes (e.g.
* middlewares) or client-side so we need to destruct manually.
*/
runtimeEnv: {
AUTH_SECRET: process.env.AUTH_SECRET,
DATABASE_URL: process.env.DATABASE_URL,
NODE_ENV: process.env.NODE_ENV,
// Minio/S3 Configuration
MINIO_ENDPOINT: process.env.MINIO_ENDPOINT,
MINIO_REGION: process.env.MINIO_REGION,
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
MINIO_BUCKET_NAME: process.env.MINIO_BUCKET_NAME,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
* useful for Docker builds.
*/
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
/**
* Makes it so that empty strings are treated as undefined. `SOME_VAR: z.string()` and
* `SOME_VAR=''` will throw an error.
*/
emptyStringAsUndefined: true,
});