import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  // Uploads live in data/, outside public/, so they're served by a route.
  async rewrites() {
    return [{ source: "/media/:name", destination: "/api/media/:name" }];
  },

  // A stray package-lock.json in the user's home directory made Turbopack
  // consider walking up to it; pin the root to this folder instead.
  turbopack: {
    root: __dirname,
  },

  // The little floating "N" build-activity badge Next.js shows in dev mode
  // sits bottom-left and visually collides with our own sidebar there —
  // turned off so it's not mistaken for part of the app's UI.
  devIndicators: false,
};

export default nextConfig;
