Sandbox configuration for Next.js applications with API routes.
cd your-nextjs-project
cp /path/to/watermelon/docs/examples/nextjs/.watermelon.toml ./
watermelon runnpm install
npm run dev
# Visit http://localhost:3000 on your hostIf your API routes call external services, add them to the allowlist:
[network]
allow = [
"registry.npmjs.org",
"api.openai.com", # OpenAI API
"*.supabase.co", # Supabase
"api.stripe.com", # Stripe
]Your .env.local file is automatically available inside the sandbox since it's part of your project. But your host's environment variables are NOT inherited, keeping your system credentials safe.