- Removed custom admin endpoint from
src/server/index.ts - Updated
src/server/ai/gemini.tsto use Devvit settings - Added settings configuration to
devvit.json - Updated all documentation
- Build successful with no errors
- No TypeScript diagnostics
npx devvit settings set apiKey "YOUR_GEMINI_API_KEY"Get your API key from: https://aistudio.google.com/app/apikey
npx devvit settings listYou should see:
apiKey: ********** (set)
# Build and upload
npm run deploy
# Or do it manually:
npm run build
npx devvit upload- Upload a document through the UI
- Check if AI analysis runs automatically
- Verify description and summary are generated
# View logs for your app
npx devvit logs YOUR_SUBREDDIT --since 5mLook for:
[Gemini] Client initialized successfully[Analysis] Starting document analysis- No "API key not configured" errors
-
Verify the setting is set:
npx devvit settings list
-
If not set, run:
npx devvit settings set apiKey "YOUR_KEY"
-
Re-upload if needed:
npx devvit upload
This means the Devvit SDK version might not support settings. Check:
npm list @devvit/webShould be a recent version that supports settings.
This deployment migrates from Redis-based API key storage to Devvit's built-in settings system:
- Before: Custom admin endpoint + Redis storage
- After: CLI-based settings management
See GEMINI_SETTINGS_MIGRATION.md for full details.
All checks passed! You can now:
- Set the API key:
npx devvit settings set apiKey - Upload:
npx devvit upload - Test the analysis feature
- ✅
GEMINI_API_KEY_SETUP.md- Setup instructions - ✅
GEMINI_SETTINGS_MIGRATION.md- Migration details - ✅
.kiro/specs/gemini-analysis/- Spec documents - ✅
PRE_DEPLOYMENT_CHECKLIST.md- This file