Getting Started
Running Locally
Run NextBento in development mode.
Start the Dev Server
pnpm dev
Or with npm:
npm run dev
The app will be available at http://localhost:3000.
Port Configuration
Default port is 3000. To use a different port:
pnpm dev -- -p 3001
What Runs
- Next.js dev server — Fast refresh, hot module replacement
- API routes — Available at
/api/* - Middleware — Runs on every request (auth, CORS, rate limiting)
Common Issues
Port already in use
# Find process on port 3000 (macOS/Linux)
lsof -i :3000
# Kill it or use a different port
pnpm dev -- -p 3001
Module not found
Clear cache and reinstall:
rm -rf .next node_modules
pnpm install
pnpm dev
Supabase connection errors
Ensure .env.local has correct Supabase URL and keys. Check Supabase Setup.
Stripe webhooks locally
Use Stripe CLI to forward webhooks:
stripe listen --forward-to localhost:3000/api/webhooks/stripe
Copy the webhook secret to STRIPE_WEBHOOK_SECRET.
Auth redirect loops
Clear cookies for localhost and ensure NEXT_PUBLIC_APP_URL matches your dev URL (e.g. http://localhost:3000).
Build for Production
pnpm build
pnpm start
This runs an optimized production build. Use for local production testing before deploy.