diff --git a/README.md b/README.md index cef8f4d83..a420ce4e5 100644 --- a/README.md +++ b/README.md @@ -23,31 +23,32 @@ for JS. ## Quick start -- **Bun?** Use the [`@arcjet/bun`](https://www.npmjs.com/package/@arcjet/bun) - package. -- **Next.js?** Use the - [`@arcjet/next`](https://www.npmjs.com/package/@arcjet/next) package with our - [Next.js quick start guide](https://docs.arcjet.com/get-started/nextjs). -- **Node.js?** Use the - [`@arcjet/node`](https://www.npmjs.com/package/@arcjet/node) package with our - [Node.js quick start guide](https://docs.arcjet.com/get-started/nodejs). -- **SvelteKit?** Use the - [`@arcjet/sveltekit`](https://www.npmjs.com/package/@arcjet/sveltekit) - package. +- **Bun?** Use the [`@arcjet/bun`][npm-bun] package. +- **Next.js?** Use the [`@arcjet/next`][npm-next] package with our [Next.js + quick start guide][next-quick-start]. +- **Node.js?** Use the [`@arcjet/node`][npm-node] package with our [Node.js + quick start guide][node-quick-start]. +- **SvelteKit?** Use the [`@arcjet/sveltekit`][npm-sveltekit] package. ## Get help -[Join our Discord server](https://discord.gg/TPra6jqZDC) or [reach out for -support](https://docs.arcjet.com/support). +[Join our Discord server][discord-invite] or [reach out for support][support]. ## Examples -- [Next.js rate limits](https://github.com/arcjet/arcjet-js/tree/main/examples/nextjs-14-app-dir-rl) -- [Next.js email validation](https://github.com/arcjet/arcjet-js/tree/main/examples/nextjs-14-app-dir-validate-email) -- [Protect NextAuth login routes](https://github.com/arcjet/arcjet-js/tree/main/examples/nextjs-14-nextauth-4) -- [OpenAI chatbot protection](https://github.com/arcjet/arcjet-js/tree/main/examples/nextjs-14-openai) -- [Express.js rate limits](https://github.com/arcjet/arcjet-js/tree/main/examples/nodejs-express-rl) -- ... [more examples](https://github.com/arcjet/arcjet-js/tree/main/examples) +- [Next.js rate limits](./examples/nextjs-14-app-dir-rl) +- [Next.js email validation](./examples/nextjs-14-app-dir-validate-email) +- [Bun rate limits](./examples/bun-rl) +- [Protect NextAuth login routes](./examples/nextjs-14-nextauth-4) +- [OpenAI chatbot protection](./examples/nextjs-14-openai) +- [Express.js rate limits](./examples/nodejs-express-rl) +- [SvelteKit](./examples/sveltekit) +- ... [more examples](./examples) + +### Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). ## Usage @@ -55,16 +56,14 @@ Read the docs at [docs.arcjet.com][arcjet-docs]. ### Next.js rate limit example -The [Arcjet rate -limit](https://docs.arcjet.com/rate-limiting/concepts) example below +The [Arcjet rate limit][rate-limit-concepts-docs] example below applies a token bucket rate limit rule to a route where we identify the user based on their ID e.g. if they are logged in. The bucket is configured with a maximum capacity of 10 tokens and refills by 5 tokens every 10 seconds. Each request consumes 5 tokens. -See the [Arcjet Next.js rate limit -documentation](https://docs.arcjet.com/rate-limiting/quick-start/nextjs) for -details. +See the [Arcjet Next.js rate limit documentation][next-rate-limit-quick-start] +for details. ```ts import arcjet, { tokenBucket } from "@arcjet/next"; @@ -102,12 +101,11 @@ export async function GET(req: Request) { ### Node.js bot protection example -The [Arcjet bot protection](https://docs.arcjet.com/bot-protection/concepts) -example below will return a 403 Forbidden response for all requests from clients -we are sure are automated. +The [Arcjet bot protection][bot-protection-concepts-docs] example below will +return a 403 Forbidden response for all requests from clients we are sure are +automated. -See the [Arcjet Node.js bot protection -documentation](https://docs.arcjet.com/bot-protection/quick-start/nodejs) for +See the [Arcjet Node.js bot protection documentation][node-bot-quick-start] for details. ```ts @@ -194,6 +192,20 @@ This repository follows the [Arcjet Security Policy][arcjet-security]. Licensed under the [Apache License, Version 2.0][apache-license]. [arcjet]: https://arcjet.com +[npm-bun]: https://www.npmjs.com/package/@arcjet/bun +[npm-next]: https://www.npmjs.com/package/@arcjet/next +[next-quick-start]: https://docs.arcjet.com/get-started/nextjs +[npm-node]: https://www.npmjs.com/package/@arcjet/node +[node-quick-start]: https://docs.arcjet.com/get-started/nodejs +[npm-sveltekit]: https://www.npmjs.com/package/@arcjet/sveltekit +[discord-invite]: https://discord.gg/TPra6jqZDC +[support]: https://docs.arcjet.com/support +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example +[rate-limit-concepts-docs]: https://docs.arcjet.com/rate-limiting/concepts +[next-rate-limit-quick-start]: https://docs.arcjet.com/rate-limiting/quick-start/nextjs +[bot-protection-concepts-docs]: https://docs.arcjet.com/bot-protection/concepts +[node-bot-quick-start]: https://docs.arcjet.com/bot-protection/quick-start/nodejs [arcjet-docs]: https://docs.arcjet.com/ [arcjet-support]: https://docs.arcjet.com/support [arcjet-security]: https://docs.arcjet.com/security diff --git a/arcjet-bun/README.md b/arcjet-bun/README.md index f609c5a39..381b32699 100644 --- a/arcjet-bun/README.md +++ b/arcjet-bun/README.md @@ -22,6 +22,11 @@ against common attacks. This is the [Arcjet][arcjet] SDK for [Bun.sh][bun-sh]. +## Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). + ## Installation ```shell @@ -110,6 +115,8 @@ Licensed under the [Apache License, Version 2.0][apache-license]. [arcjet]: https://arcjet.com [bun-sh]: https://bun.sh/ +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example [rate-limit-concepts-docs]: https://docs.arcjet.com/rate-limiting/concepts [shield-concepts-docs]: https://docs.arcjet.com/shield/concepts [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/arcjet-next/README.md b/arcjet-next/README.md index 935b2af61..91592608d 100644 --- a/arcjet-next/README.md +++ b/arcjet-next/README.md @@ -22,13 +22,17 @@ against common attacks. This is the [Arcjet][arcjet] SDK for the [Next.js][next-js] framework. -**Looking for our Node.js SDK?** Check out the -[`@arcjet/node`](https://www.npmjs.com/package/@arcjet/node) package. +**Looking for our Node.js SDK?** Check out the [`@arcjet/node`][alt-sdk] +package. ## Getting started -Visit [docs.arcjet.com](https://docs.arcjet.com/get-started/nextjs) to get -started. +Visit [docs.arcjet.com][next-sdk-docs] to get started. + +## Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). ## Installation @@ -38,16 +42,13 @@ npm install -S @arcjet/next ## Rate limit example -The [Arcjet rate -limit](https://docs.arcjet.com/rate-limiting/concepts) example below -applies a token bucket rate limit rule to a route where we identify the user -based on their ID e.g. if they are logged in. The bucket is configured with a -maximum capacity of 10 tokens and refills by 5 tokens every 10 seconds. Each -request consumes 5 tokens. +The [Arcjet rate limit][rate-limit-concepts-docs] example below applies a token +bucket rate limit rule to a route where we identify the user based on their ID +e.g. if they are logged in. The bucket is configured with a maximum capacity of +10 tokens and refills by 5 tokens every 10 seconds. Each request consumes 5 +tokens. -See the [Arcjet rate limit -documentation](https://docs.arcjet.com/rate-limiting/quick-start/nextjs) for -details. +See the [Arcjet rate limit documentation][rate-limit-quick-start] for details. ```ts import arcjet, { tokenBucket } from "@arcjet/next"; @@ -85,12 +86,11 @@ export async function GET(req: Request) { ## Shield example -[Arcjet Shield](https://docs.arcjet.com/shield/concepts) protects your -application against common attacks, including the OWASP Top 10. You can run -Shield on every request with negligible performance impact. +[Arcjet Shield][shield-concepts-docs] protects your application against common +attacks, including the OWASP Top 10. You can run Shield on every request with +negligible performance impact. -See the [Arcjet Shield -documentation](https://docs.arcjet.com/shield/quick-start/nextjs) for details. +See the [Arcjet Shield documentation][shield-quick-start] for details. ```ts import arcjet, { shield } from "@arcjet/next"; @@ -129,5 +129,12 @@ Licensed under the [Apache License, Version 2.0][apache-license]. [arcjet]: https://arcjet.com [next-js]: https://nextjs.org/ +[alt-sdk]: https://www.npmjs.com/package/@arcjet/node [next-sdk-docs]: https://docs.arcjet.com/reference/nextjs +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example +[rate-limit-concepts-docs]: https://docs.arcjet.com/rate-limiting/concepts +[rate-limit-quick-start]: https://docs.arcjet.com/rate-limiting/quick-start/nextjs +[shield-concepts-docs]: https://docs.arcjet.com/shield/concepts +[shield-quick-start]: https://docs.arcjet.com/shield/quick-start/nextjs [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/arcjet-node/README.md b/arcjet-node/README.md index 280754e3f..1c8ab7b52 100644 --- a/arcjet-node/README.md +++ b/arcjet-node/README.md @@ -23,7 +23,12 @@ against common attacks. This is the [Arcjet][arcjet] SDK for [Node.js][node-js]. **Looking for our Next.js framework SDK?** Check out the -[`@arcjet/next`](https://www.npmjs.com/package/@arcjet/next) package. +[`@arcjet/next`][alt-sdk] package. + +## Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). ## Installation @@ -122,6 +127,9 @@ Licensed under the [Apache License, Version 2.0][apache-license]. [arcjet]: https://arcjet.com [node-js]: https://nodejs.org/ +[alt-sdk]: https://www.npmjs.com/package/@arcjet/next +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example [rate-limit-concepts-docs]: https://docs.arcjet.com/rate-limiting/concepts [shield-concepts-docs]: https://docs.arcjet.com/shield/concepts [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/arcjet-sveltekit/README.md b/arcjet-sveltekit/README.md index 9600f8e2c..d73cf2476 100644 --- a/arcjet-sveltekit/README.md +++ b/arcjet-sveltekit/README.md @@ -22,6 +22,11 @@ against common attacks. This is the [Arcjet][arcjet] SDK for [SvelteKit][sveltekit]. +## Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). + ## Installation ```shell @@ -121,6 +126,8 @@ Licensed under the [Apache License, Version 2.0][apache-license]. [arcjet]: https://arcjet.com [sveltekit]: https://kit.svelte.dev/ +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example [rate-limit-concepts-docs]: https://docs.arcjet.com/rate-limiting/concepts [shield-concepts-docs]: https://docs.arcjet.com/shield/concepts [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/examples/README.md b/examples/README.md index 41829e63c..ab7c803c4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,6 +2,11 @@ This directory contains examples of how to use Arcjet. +## Example app + +Try an Arcjet protected app live at [https://example.arcjet.com][example-url] +([source code][example-source]). + ## Arcjet development To develop Arcjet, use the following commands before starting the example: @@ -11,3 +16,6 @@ export ARCJET_LOG_LEVEL=DEBUG export ARCJET_BASE_URL=https://decide.arcjet.orb.local:4082 export NODE_TLS_REJECT_UNAUTHORIZED=0 # Allows local self-signed certs ``` + +[example-url]: https://example.arcjet.com +[example-source]: https://github.com/arcjet/arcjet-js-example