Files
kima-hub/frontend/next.config.ts
T
Your Name f2a443c6e3 v1.4.0: sequential enrichment, GPU auto-detection, repo cleanup
- Run audio analysis and vibe embedding phases sequentially to prevent
  resource contention (CPU/memory) from concurrent analyzers
- Auto-detect GPU availability in both audio analyzers (CUDA/ROCm)
- Fix false lite mode detection on startup by checking analyzer scripts
  on disk before falling back to heartbeat/DB checks
- Fix Dockerfile NEXT_PUBLIC_BACKEND_URL and frontend rewrite proxy
- Route enrichment failures through notification system instead of
  persistent error banner
- Remove playback error banner from player components
- Reduce enrichment cycle interval from 6h to 2h
- Comprehensive repo cleanup: remove 127 decorative comment dividers
  across 17 files, clean verbose comments, harden .gitignore, remove
  tracked docs from git

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 09:59:51 -06:00

108 lines
3.1 KiB
TypeScript

import type { NextConfig } from "next";
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const nextConfig: NextConfig = {
// Allow dev origins for local network testing
allowedDevOrigins: [
"http://127.0.0.1:3030",
"http://127.0.0.1",
"127.0.0.1",
"http://localhost:3030",
"http://localhost",
"localhost",
],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn-images.dzcdn.net",
pathname: "/**",
},
{
protocol: "https",
hostname: "e-cdns-images.dzcdn.net",
pathname: "/**",
},
{
protocol: "https",
hostname: "lastfm.freetls.fastly.net",
pathname: "/**",
},
{
protocol: "https",
hostname: "lastfm-img2.akamaized.net",
pathname: "/**",
},
{
protocol: "http",
hostname: "localhost",
port: "3006",
pathname: "/**",
},
{
protocol: "http",
hostname: "127.0.0.1",
port: "3006",
pathname: "/**",
},
{
protocol: "https",
hostname: "assets.pippa.io",
pathname: "/**",
},
{
protocol: "https",
hostname: "assets.fanart.tv",
pathname: "/**",
},
{
protocol: "https",
hostname: "is1-ssl.mzstatic.com",
pathname: "/**",
},
],
formats: ["image/avif", "image/webp"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
minimumCacheTTL: 60 * 60 * 24 * 7, // Cache for 7 days
dangerouslyAllowSVG: true,
},
reactStrictMode: true,
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
],
},
];
},
// Proxy API requests to backend (for Docker all-in-one container)
// Use NEXT_PUBLIC_BACKEND_URL if set (build-time), otherwise default to localhost:3006
// At runtime, Next.js will proxy /api/* requests to the backend
async rewrites() {
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || "http://127.0.0.1:3006";
return [
{
source: "/api/:path*",
destination: `${backendUrl}/api/:path*`,
},
{
source: "/health",
destination: `${backendUrl}/health`,
},
];
},
};
export default withBundleAnalyzer(nextConfig);