fix: move API keys to .env.local, remove localStorage dual system

Single source of truth: OPENAI_API_KEY in .env.local. Deleted the
apiKeyService class/singleton that stored keys in localStorage.
All server code reads process.env directly. FirstRunModal and
Settings now show .env.local instructions instead of key input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
“BeeRad”
2026-02-06 11:46:41 +11:00
co-authored by Claude Opus 4.6
parent 49ff3678a3
commit 3b04a1bad0
9 changed files with 121 additions and 411 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
import { NextResponse } from 'next/server';
import { checkDatabaseHealth } from '@/services/database';
import { hasValidOpenAiKey } from '@/services/database/descriptionService';
import { hasValidOpenAiKey } from '@/services/storage/apiKeys';
export const runtime = 'nodejs';