Remove unnecessary description and whitespace from nexumi.mdc file

This commit is contained in:
smueller
2026-07-22 11:07:38 +02:00
parent 226379eac5
commit c2271485a5
21 changed files with 415 additions and 2 deletions

3
apps/bot/src/db.ts Normal file
View File

@@ -0,0 +1,3 @@
import { PrismaClient } from '@prisma/client';
export const prisma = new PrismaClient();

17
apps/bot/src/env.ts Normal file
View File

@@ -0,0 +1,17 @@
import { config } from 'dotenv';
import { z } from 'zod';
config();
const EnvSchema = z.object({
NODE_ENV: z.enum(['development', 'test', 'production']).default('development'),
BOT_TOKEN: z.string().min(1),
BOT_CLIENT_ID: z.string().min(1),
DATABASE_URL: z.string().url(),
REDIS_URL: z.string().url(),
LOG_LEVEL: z.string().default('info'),
DEFAULT_LOCALE: z.enum(['de', 'en']).default('de'),
BACKUP_RETENTION_DAYS: z.coerce.number().int().positive().default(14)
});
export const env = EnvSchema.parse(process.env);

6
apps/bot/src/logger.ts Normal file
View File

@@ -0,0 +1,6 @@
import pino from 'pino';
import { env } from './env.js';
export const logger = pino({
level: env.LOG_LEVEL
});

6
apps/bot/src/redis.ts Normal file
View File

@@ -0,0 +1,6 @@
import IORedis from 'ioredis';
import { env } from './env.js';
export const redis = new IORedis(env.REDIS_URL, {
maxRetriesPerRequest: null
});