Open-source permission system

vue-nuxt-permission

One permission model for Vue 3 and Nuxt 3/4 apps: a directive for templates, guards for routes and a composable for logic — all reading the same source of truth.

Role
Author and maintainer
Period
2025 – 2026
Stack
  • TypeScript
  • Vue 3
  • Nuxt module
  • Vitest
vue-nuxt-permission documentation site

Problem

Dashboards built on role-based access tend to scatter permission checks across templates, router guards and store logic, each with slightly different rules. When the backend changes a permission name, some of those checks silently stop working.

Architecture

A single engine resolves permissions with seven match modes — exact, and, or, not, startWith, endWith and regex. The v-permission directive, the route guards and the usePermission() composable are thin adapters over it. A Nuxt module registers everything and auto-imports the composable.

Architecture
  1. Usage
    • Templatesv-permission
    • Routesguards
    • LogicusePermission()
  2. Engine
    • Matcherand · or · not · regex
    • Cache
  3. Source
    • Async loaderAPI
    • Persistenceencrypted payload

Decisions

Permissions can load asynchronously from an API and are cached; persisted payloads support decryption hooks, so apps that receive encrypted permission sets don't need custom glue code.

Outcome

Published on npm with a documentation site and a spec suite. It follows an earlier, directive-only package of mine, vue-permission-directive.

Kerolos Zakaria

Senior Front-End Developer · Cairo, Egypt

© 2026 Kerolos ZakariaBuilt with Nuxt. Static, bilingual, no trackers.
Esc

Pages

Home
Work
Open Source
Jervis
About
Contact

Work

Jervis BoostAI engineering control plane
Jervis Desktop MCPSecure execution layer for AI assistants
Government platforms in Egypt & Saudi ArabiaBilingual public-sector web
vue-nuxt-permissionOpen-source permission system
Frontend foundation & team toolingInternal platform work
Jervis Universal AgentLocal-first agent runtime
Jervis DevOpsSelf-hosted deployment platform
Jervis MathArabic-aware math input

Actions

Toggle theme
العربية — switch to Arabic
Copy email addresskeroloszakaria2@gmail.com
GitHubkeroloszakaria
LinkedInkerolos-zakaria
npm~keroloszakaria
VS Code Marketplacekeroloszakaria
Medium@keroloszakaria2
UpworkKerolos Z.