/example-nextjs-bot-protection

An example Next.js site protected by Arcjet bot detection middleware.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Arcjet Logo

Arcjet example: Next.js bot protection

Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.

This is an example Next.js application demonstrating how to protect a Next.js site from bots.

Features

  • Bot protection shows how a page can be protected from automated clients.

Run locally

  1. Register for a free Arcjet account.

  2. Install dependencies:

npm ci
  1. Rename .env.local.example to .env.local and add your Arcjet key.

  2. Start the dev server

npm run dev
  1. Open http://localhost:3000 in your browser.

Need help?

Check out the docs, contact support, or join our Discord server.