https://github.com/arcjet/example-nextjs-bot-protection
An example Next.js site protected by Arcjet bot detection middleware.
https://github.com/arcjet/example-nextjs-bot-protection
arcjet bot-detection developer-tools javascript nextjs nodejs security security-tools typescript
Last synced: about 1 month ago
JSON representation
An example Next.js site protected by Arcjet bot detection middleware.
- Host: GitHub
- URL: https://github.com/arcjet/example-nextjs-bot-protection
- Owner: arcjet
- License: apache-2.0
- Created: 2025-05-18T07:28:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-15T15:26:28.000Z (about 2 months ago)
- Last Synced: 2026-04-15T17:27:23.210Z (about 2 months ago)
- Topics: arcjet, bot-detection, developer-tools, javascript, nextjs, nodejs, security, security-tools, typescript
- Language: CSS
- Homepage:
- Size: 115 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arcjet example: Next.js bot protection
[Arcjet](https://arcjet.com) 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](https://docs.arcjet.com/bot-protection/quick-start) shows how
a page can be protected from automated clients.
## Run locally
1. [Register for a free Arcjet account](https://app.arcjet.com).
2. Install dependencies:
```bash
npm ci
```
3. Rename `.env.local.example` to `.env.local` and add your Arcjet key.
4. Start the dev server
```bash
npm run dev
```
5. Open [http://localhost:3000](http://localhost:3000) in your browser.
## Need help?
Check out [the docs](https://docs.arcjet.com/), [contact
support](https://docs.arcjet.com/support), or [join our Discord
server](https://arcjet.com/discord).
## Contributing
All development for Arcjet examples is done in the
[`arcjet/examples` repository](https://github.com/arcjet/examples).
You are welcome to open an issue here or in
[`arcjet/examples`](https://github.com/arcjet/examples/issues) directly.
However, please direct all pull requests to
[`arcjet/examples`](https://github.com/arcjet/examples/pulls). Take a look at
our
[contributing guide](https://github.com/arcjet/examples/blob/main/CONTRIBUTING.md)
for more information.