open-index/open-npm huggingface dataset:
npm package: @nocobase/plugin-sample-custom-block
Description: ## Register
Latest version: 0.19.0-alpha.3

# Hello sample

## Register

```ts
yarn pm add sample-custom-block
```

## Activate

```bash
yarn pm enable sample-custom-block
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Demo

[gif]
npm package: @nocobase/plugin-sample-custom-collection-template
Description: ## Register
Latest version: 0.19.0-alpha.3

# custom-collection-template

## Register

```ts
yarn pm add sample-custom-collection-template
```

## Activate

```bash
yarn pm enable sample-custom-collection-template
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Demo

[gif]
npm package: @nocobase/plugin-sample-custom-page
Description: ## Register
Latest version: 0.19.0-alpha.3

# Custom page

## Register

```ts
yarn pm add sample-custom-page
```

## Activate

```bash
yarn pm enable sample-custom-page
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Visit the custom page

Open http://localhost:13000/hello-world in a web browser.
npm package: @nocobase/plugin-sample-custom-signup-page
Description: ## Register
Latest version: 0.17.0-alpha.7

# Custom sign up page

## Register

```ts
yarn pm add sample-custom-signup-page
```

## Activate

```bash
yarn pm enable sample-custom-signup-page
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Visit the custom sign up page

Open [http://localhost:13000/signup](http://localhost:13000/signup) in a web browser.
npm package: @nocobase/plugin-sample-ratelimit
Description: ## Register
Latest version: 0.19.0-alpha.3

# Rate limiter middleware sample

## Register

```ts
yarn pm add sample-ratelimit
```

## Activate

```bash
yarn pm enable sample-ratelimit
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Demo

[gif]
npm package: @nocobase/plugin-sample-shop-actions
Description: ## Register
Latest version: 0.19.0-alpha.3

# Actions for simple shop scenario

## Register

```ts
yarn pm add sample-shop-actions
```

## Activate

```bash
yarn pm enable sample-shop-actions
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Connect to the API

### Products API

```bash
# create a product
curl -X POST -H "Content-Type: application/json" -d '{"title": "iPhone 14 Pro", "price": 7999, "enabled": true, "inventory": 1}' "http://localhost:13000/api/products"
```

### Orders API

```bash
# create a order
curl -X POST -H "Content-Type: application/json" -d '{"productId": 1, "quantity": 1, "totalPrice": 0, "userId": 2}' 'http://localhost:13000/api/orders'
# {"id": <id>, "status": 0, "productId": 1, "quantity": 1, "totalPrice": 7999, "userId": 1}

# list orders which userId=1 with product
curl 'http://localhost:13000/api/orders?filter={"status":2}&appends=product'
```
npm package: @nocobase/plugin-sample-shop-events
Description: ## Register
Latest version: 0.19.0-alpha.3

# Hooks for simple shop scenario

## Register

```ts
yarn pm add sample-shop-hooks
```

## Activate

```bash
yarn pm enable sample-shop-hooks
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Connect to the API

### Products API

```bash
# create a product
curl -X POST -H "Content-Type: application/json" -d '{"title": "iPhone 14 Pro", "price": 7999, "enabled": true, "inventory": 1}' "http://localhost:13000/api/products"
```

### Orders API

```bash
# create a order
curl -X POST -H "Content-Type: application/json" -d '{"productId": 1, "quantity": 1, "totalPrice": 0, "userId": 2}' 'http://localhost:13000/api/orders'
# {"id": <id>, "status": 0, "productId": 1, "quantity": 1, "totalPrice": 7999, "userId": 1}

# create an expired delivery to watch schedule task
curl -X POST -H "Content-Type: application/json" -d '{"orderId": 1, "provider": "SF", "trackingNumber": "123456789", "userId": 2, "createdAt": "2022-09-01T00:00:00Z"}' 'http://localhost:13000/api/deliveries'
```
npm package: @nocobase/plugin-sample-shop-i18n
Description: ## Register
Latest version: 0.19.0-alpha.3

# I18n for simple shop scenario

## Register

```ts
yarn pm add sample-shop-i18n
```

## Activate

```bash
yarn pm enable sample-shop-i18n
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Connect to the API

### Products API

```bash
# create a product
curl -X POST -d '{"title": "iPhone 14 Pro", "price": "7999", "enabled": true, "inventory": 10}' "http://localhost:13000/api/products"

# list products
curl "http://localhost:13000/api/products"

# get product which id=1
curl "http://localhost:13000/api/products?filterByTk=1"
```

### Orders API

```bash
# create a order
curl -X POST -d '{"productId": 1, "quantity": 1, "totalPrice": "7999", "userId": 1}' 'http://localhost:13000/api/orders'

# list orders which userId=1 with product
curl 'http://localhost:13000/api/orders?filter={"userId":1}&appends=product'
```
npm package: @nocobase/plugin-sample-shop-modeling
Description: ## Register
Latest version: 0.19.0-alpha.3

# Modeling for simple shop scenario

## Register

```ts
yarn pm add sample-shop-modeling
```

## Activate

```bash
yarn pm enable sample-shop-modeling
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```

## Connect to the API

### Products API

```bash
# create a product
curl -X POST -H "Content-Type: application/json" -d '{"title": "iPhone 14 Pro", "price": "7999", "enabled": true, "inventory": 10}' "http://localhost:13000/api/products"

# list products
curl "http://localhost:13000/api/products"

# get product which id=1
curl "http://localhost:13000/api/products?filterByTk=1"
```

### Orders API

```bash
# create a order
curl -X POST -H "Content-Type: application/json" -d '{"productId": 1, "quantity": 1, "totalPrice": "7999", "userId": 1}' 'http://localhost:13000/api/orders'

# list orders which userId=1 with product
curl 'http://localhost:13000/api/orders?filter={"userId":1}&appends=product'
```