System AI

This commit is contained in:
Joey Yakimowich-Payne 2026-01-15 19:39:38 -07:00
commit a7ad1e9bba
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
10 changed files with 271 additions and 13 deletions

View file

@ -156,8 +156,8 @@ CORS_ORIGIN=https://${KABOOT_DOMAIN}
NODE_ENV=production
LOG_REQUESTS=true
# System AI (optional - for quiz generation without user's own key)
VITE_API_KEY=${GEMINI_API_KEY}
# System AI (optional - server-side quiz generation)
GEMINI_API_KEY=${GEMINI_API_KEY}
EOF
print_success "Created .env"
@ -216,17 +216,18 @@ fi
print_step "Building frontend with production URLs..."
BUILD_ENV="VITE_API_URL=https://${KABOOT_DOMAIN} VITE_AUTHENTIK_URL=https://${AUTH_DOMAIN} VITE_OIDC_CLIENT_ID=kaboot-spa VITE_OIDC_APP_SLUG=kaboot"
VITE_API_URL="https://${KABOOT_DOMAIN}" \
VITE_AUTHENTIK_URL="https://${AUTH_DOMAIN}" \
VITE_OIDC_CLIENT_ID="kaboot-spa" \
VITE_OIDC_APP_SLUG="kaboot" \
npm run build --silent 2>/dev/null || npm run build
if [ -n "$GEMINI_API_KEY" ]; then
BUILD_ENV="$BUILD_ENV VITE_API_KEY=$GEMINI_API_KEY"
print_success "System AI enabled with provided Gemini key"
print_success "System AI will be available (key configured for backend)"
else
print_warning "No Gemini API key provided - users must configure their own"
fi
eval "$BUILD_ENV npm run build --silent 2>/dev/null || $BUILD_ENV npm run build"
print_success "Frontend built"
echo ""