Skip to content
/ arcjet-js-example Public template

An example Next.js application showing Arcjet security functionality - signup form abuse protection, bot detection, rate limiting & attack protection.

License

Notifications You must be signed in to change notification settings

arcjet/arcjet-js-example

Repository files navigation

Arcjet Logo

Arcjet example app

Arcjet helps developers protect their apps in just a few lines of code. This is an example application demonstrating the use of multiple features.

This example is deployed at https://example.arcjet.com.

Features

  • Signup form protection uses Arcjet's server-side email verification configured to block disposable providers and ensure that the domain has a valid MX record. It also includes rate limiting and bot protection to prevent automated abuse.
  • Bot protection shows how a page can be protected from automated clients.
  • Rate limiting shows the use of different rate limit configurations depending on the authenticated user. A logged-in user can make more requests than an anonymous user.
  • Attack protection demonstrates Arcjet Shield, which detects suspicious behavior, such as SQL injection and cross-site scripting attacks.

Deploy it now

Deploy with Vercel

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. If you want to test the rate limiting authentication, you will also need to add an Auth.js secret and create a GitHub OAuth app.

  2. Start the dev server

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

Stack

About

An example Next.js application showing Arcjet security functionality - signup form abuse protection, bot detection, rate limiting & attack protection.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •