Other Code Examples
Find an open-source example repository that shows Permit.io authorization in the framework, language, or stack you use. This page is for developers who want working code to read or copy before they add permission checks to their own app. For guided walkthroughs of full demo apps, see the other pages in this section, such as Food Delivery System Example.
What the examples cover
Each repository is a runnable app or integration maintained in the permitio GitHub organization. The examples show how to:
- Call
permit.check()from a backend framework or middleware. - Model role-based access control (RBAC), attribute-based access control (ABAC), and relationship-based access control (ReBAC) policies, and sync users, resources, and relationships to Permit.
- Show or hide frontend features with the
permit-fe-sdkand CASL. - Run the policy decision point (PDP) on different platforms.
- Manage policy as code with GitOps, Open Policy Agent (OPA) Rego, and the Open Policy Administration Layer (OPAL).
- Add permission checks to AI agents and retrieval pipelines.
Typical topics in the list:
| Topic | Examples of what you find |
|---|---|
| Backend frameworks | Express, Fastify, FastAPI, Spring Boot, Go, and Java apps that call permit.check() |
| Frontend frameworks | React, Angular, and Vue apps that toggle UI with permit-fe-sdk and CASL |
| Full demo apps | Galactic Health Corporation, Pink Mobile, the Nuxt food delivery app, the Mesa Verde banking demo, Fleet Ops, the Great Eagle Logistics portal, and fine-grained bot protection, in the permitio/examples repository |
| Deployment | PDP deployment examples for different platforms |
| Policy as code | Example OPAL policy repositories, generated policy code, and Rego-based ReBAC |
| AI agents | LangChain, Langflow, and PydanticAI integrations |
Full demo apps in the examples repository
The permitio/examples repository holds full demo apps, one per folder, including the seven below. Each of these folders runs with Docker Compose and a local PDP, needs only a Permit environment API key, and has a README with the steps:
| Folder | What it shows | Walkthrough |
|---|---|---|
| galactic-health-corporation | A healthcare portal with caregiver delegation, member groups, and pilot groups | Healthcare Demo Application |
| pink-mobile | A mobile plan app with manager, representative, and customer personas | Teleco Demo Application |
| nuxt-food-delivery | A multi-city food delivery app with RBAC, ABAC, and ReBAC on the same actions | Food Delivery System Example |
| mesa-verde-banking | A banking app with multi-tenant RBAC, wire transfer rules, and approval flows | Banking app example: Mesa Verde |
| fleet-ops-demo | A multi-tenant fleet app on the Go SDK with nested organizations, partner access, attribute-based sets, custom Rego rules loaded through GitOps, and Terraform for the schema | Multi-tenant fleet example: Fleet Ops |
| permit-portal-demo | A logistics business portal with onboarding approvals, time-boxed collaborator access, and a panel that shows each Permit check and write | Logistics portal example: Great Eagle |
| fine-grained-bot-protection | An Express app that gives humans and bots different access, with ABAC on a botType user attribute | Bot protection example: humans and AI bots |
Browse the example repositories
The following list loads in your browser from the GitHub search API. The list includes every non-archived repository in the permitio organization that has the example topic, sorted by the most recently updated. Each card links to the repository and shows its GitHub description. To search the same set on GitHub, open permitio repositories with the example topic. If the list stays empty, the GitHub search API may have rate-limited unauthenticated requests from your network. Use the GitHub search link instead.
Next steps
- Healthcare Demo Application walks through RBAC, ABAC, and ReBAC in one Next.js app.
- Teleco Demo Application shows a policy model built with the Node.js SDK.
- Check permissions with permit.check() covers the check call used in every example.