···11+# Environment Configuration
22+NODE_ENV="development" # Options: 'development', 'production'
33+PORT="8080" # The port your server will listen on
44+HOST="localhost" # Hostname for the server
55+66+# CORS Settings
77+CORS_ORIGIN="http://localhost:*" # Allowed CORS origin, adjust as necessary
88+99+# Rate Limiting
1010+COMMON_RATE_LIMIT_WINDOW_MS="1000" # Window size for rate limiting (ms)
1111+COMMON_RATE_LIMIT_MAX_REQUESTS="20" # Max number of requests per window per IP
···11+import { z } from "zod";
22+33+export const commonValidations = {
44+ id: z
55+ .string()
66+ .refine((data) => !Number.isNaN(Number(data)), "ID must be a numeric value")
77+ .transform(Number)
88+ .refine((num) => num > 0, "ID must be a positive number"),
99+ // ... other common validations
1010+};