pounce/frontend/next.config.js
Yves Gugger 1b1aea6f07 refactor: Terminal Module Restructure (Sprint 2)
- RADAR: dashboard → /terminal/radar
- MARKET: auctions + marketplace → /terminal/market
- INTEL: pricing → /terminal/intel
- WATCHLIST: watchlist + portfolio → /terminal/watchlist
- LISTING: listings → /terminal/listing

All redirects configured for backwards compatibility.
Updated sidebar navigation with new module names.
2025-12-10 21:44:36 +01:00

92 lines
2.3 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// output: 'standalone', // Only needed for Docker deployment
// Redirects from old routes to new Terminal routes
async redirects() {
return [
// Old Command Center routes
{
source: '/command',
destination: '/terminal/radar',
permanent: true,
},
{
source: '/command/:path*',
destination: '/terminal/:path*',
permanent: true,
},
// Dashboard → RADAR
{
source: '/terminal/dashboard',
destination: '/terminal/radar',
permanent: true,
},
// Pricing → INTEL
{
source: '/terminal/pricing',
destination: '/terminal/intel',
permanent: true,
},
{
source: '/terminal/pricing/:tld*',
destination: '/terminal/intel/:tld*',
permanent: true,
},
// Listings → LISTING
{
source: '/terminal/listings',
destination: '/terminal/listing',
permanent: true,
},
// Auctions & Marketplace → MARKET
{
source: '/terminal/auctions',
destination: '/terminal/market',
permanent: true,
},
{
source: '/terminal/marketplace',
destination: '/terminal/market',
permanent: true,
},
// Portfolio → WATCHLIST (combined)
{
source: '/terminal/portfolio',
destination: '/terminal/watchlist',
permanent: true,
},
// Alerts → RADAR (will be integrated)
{
source: '/terminal/alerts',
destination: '/terminal/radar',
permanent: true,
},
// SEO → RADAR (premium feature, hidden for now)
{
source: '/terminal/seo',
destination: '/terminal/radar',
permanent: true,
},
]
},
// Proxy API requests to backend
// This ensures /api/v1/* works regardless of how the server is accessed
async rewrites() {
// Determine backend URL based on environment
const backendUrl = process.env.BACKEND_URL || 'http://127.0.0.1:8000'
return [
{
source: '/api/v1/:path*',
destination: `${backendUrl}/api/v1/:path*`,
},
]
},
}
module.exports = nextConfig