Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/can-it/can-it
Access control and permission checks library based on actions and resource identification.
https://github.com/can-it/can-it
abac angular authorization can-it expressjs fastify nestjs nx-workspace pbac rbac react typescript
Last synced: 2 months ago
JSON representation
Access control and permission checks library based on actions and resource identification.
- Host: GitHub
- URL: https://github.com/can-it/can-it
- Owner: can-it
- License: mit
- Created: 2023-09-23T08:56:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-20T23:47:50.000Z (about 1 year ago)
- Last Synced: 2024-10-08T18:41:50.656Z (3 months ago)
- Topics: abac, angular, authorization, can-it, expressjs, fastify, nestjs, nx-workspace, pbac, rbac, react, typescript
- Language: TypeScript
- Homepage: https://can-it.github.io/
- Size: 683 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# can-it
[Package Documentations](https://can-it.github.io/packages/core)
## Setup Environment
To set up the environment, follow these steps:1. Clone this repository:
```bash
git clone [email protected]:can-it/can-it.git
```2. Navigate to the project directory:
```bash
cd can-it
```3. Install the required dependency packages:
```bash
pnpm i
```## Project Structure
```
📂 apps
└── examples
📂 libs
├── core
└── operators
├── exact
├── nested
├── relation
└── ...
```
## Core
You can find the code for the core functionality in the `libs/core` folder.### Build
To build the core, run the following command:
```bash
npx nx build core
```### Run Tests
To run tests for the core, use the following command:
```bash
npx nx test core
```## Operators
The operators allow you to perform specific tasks. Follow the steps below to create and work with operators.### Create a New Operator
To create a new operator, run the following command:
```bash
npx nx g @nx/js:lib operators-[name] --directory=libs/operators/[name] --publishable=true --import-path=@can-it/operators-[name]
```
Replace `[name]` with the desired name for your operator.### Build the Operator
To build the operator, use the following command:
```bash
npx nx build operators-[name]
```
Replace `[name]` with the name of your operator.### Run Tests
To run tests for the operator, use the following command:
```bash
npx nx test operators-[name]
```
Replace `[name]` with the name of your operator.