{"id":30798505,"url":"https://github.com/permitio/fine-grained-bot-protection","last_synced_at":"2025-09-05T18:12:18.345Z","repository":{"id":246893826,"uuid":"824528107","full_name":"permitio/fine-grained-bot-protection","owner":"permitio","description":"An example authorization middleware for fine-grained bot protection using Arcjet and Permit.io","archived":false,"fork":false,"pushed_at":"2025-01-09T11:10:24.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-29T15:26:13.347Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/permitio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-05T10:19:35.000Z","updated_at":"2025-03-13T15:20:15.000Z","dependencies_parsed_at":"2024-07-08T19:24:52.189Z","dependency_job_id":null,"html_url":"https://github.com/permitio/fine-grained-bot-protection","commit_stats":null,"previous_names":["permitio/fine-grained-bot-protection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/permitio/fine-grained-bot-protection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Ffine-grained-bot-protection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Ffine-grained-bot-protection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Ffine-grained-bot-protection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Ffine-grained-bot-protection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permitio","download_url":"https://codeload.github.com/permitio/fine-grained-bot-protection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Ffine-grained-bot-protection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273797718,"owners_count":25170124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example"],"created_at":"2025-09-05T18:12:13.917Z","updated_at":"2025-09-05T18:12:18.335Z","avatar_url":"https://github.com/permitio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fine-Grained Bot Protection Demo\nThis project demonstrates an effective way to handle bots in your application using fine-grained authorization.\n\nBy integrating Permit.io and Arcjet, this application showcases how to serve different types of data to various bots and human users, ensuring optimal readiness for GenAI and other bots.\n\nRead more about it in the following [blog post](https://www.permit.io/blog/introduce-ai-bots-in-applications): [https://www.permit.io/blog/introduce-ai-bots-in-applications](https://www.permit.io/blog/introduce-ai-bots-in-applications)\n\n## Prerequisites\n- Node.js\n- npm\n- Arcjet Security API Key\n- Permit.io API Key\n- Docker\n\n## Installation\n1. Clone the repository\n2. Install dependencies\n    ```bash\n    npm install\n    ```\n3. Copy the .env.template file to .env and update the values\n    ```bash\n    cp .env.template .env\n    ```\n4. Follow the instructions in the following blog post to set your application policy in Permit.io\n[TBD - Add the link to the blog post](#)\n5. Run the Permit PDP using your Permit.io API Key\n    ```bash\n    docker run -p 7766:7000 --env PDP_API_KEY=\u003cYOUR_PERMIT_API_KEY\u003e --env PDP_DEBUG=true permitio/pdp-v2:latest\n    ```\n5. Start the application\n    ```bash\n    npm run dev\n    ```\n\n## Usage\n1. Open your browser and navigate to [http://localhost:3000](http://localhost:3000). As you can see, you are able to access Public, Shared, and Private items.\n2. Try to call the API using curl\n    ```bash\n    curl http://localhost:3000\n    ```\n    You will get only Public items\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Ffine-grained-bot-protection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermitio%2Ffine-grained-bot-protection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Ffine-grained-bot-protection/lists"}