An open API service indexing awesome lists of open source software.

https://github.com/letstri/permix

🔒 Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.
https://github.com/letstri/permix

permissions security type-safe typescript

Last synced: about 1 year ago
JSON representation

🔒 Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.

Awesome Lists containing this project

README

          

# Permix

[![npm version](https://badge.fury.io/js/permix.svg)](https://npmjs.com/package/permix)
![You need Permix](https://img.shields.io/badge/You_need-Permix-purple)

Permix is a lightweight, framework-agnostic, type-safe permissions management library for JavaScript applications on the client and server sides.

## Documentation

You can find the documentation [here](https://permix.letstri.dev).

## Example

To quick start you only need to write the following code:

```ts
import { createPermix } from 'permix'

const permix = createPermix<{
post: {
action: 'read'
}
}>()

permix.setup({
post: {
read: true,
}
})

permix.check('post', 'read') // true
```

Permix has other powerful features, so here's check out the [docs](https://permix.letstri.dev/docs) or the [examples](https://github.com/letstri/permix/tree/main/examples) directory.

## License

MIT License - see the [LICENSE](https://github.com/letstri/permix/blob/main/LICENSE) file for details