open-index/open-npm huggingface dataset:
npm package: @sgrnext/api
Description: Lightweight and developer-friendly library designed to simplify the creation of API handlers in Next.js applications
Author: Dmitry Balakov
Latest version: 0.1.5

# @sgrnext/api

@sgrnext/api is a lightweight and developer-friendly library designed 
to simplify the creation of API handlers in Next.js applications.

See full [documentation](https://nextapi.sgr-team.dev).

## Motivaton

The @sgrnext/api library simplifies API development by abstracting common, 
repetitive logic involved in handler creation. It provides tools to encapsulate 
tasks such as request parsing, validation, and the collection of web method statistics, 
enabling developers to concentrate on core business logic while ensuring a clean, efficient, 
and maintainable codebase.

The plugin system in @sgrnext/api offers flexible customization of the handler environment, 
enabling developers to tailor it to their needs. Additionally, it supports the integration 
of project-specific functionality, enhancing adaptability across diverse use cases.

## Getting started

### Install

```bash
npm install --save @sgrnext/api
```

### Crate handlers factory

```typescript
// src/server/handlers.ts
import { HandlerFactory } from '@sgrnext/api';
import { parse } from "@sgrnext/api-parse";

export const handlers = new HandlerFactory()
  // apply plugins
  .plugin({ pool: myDatabaseConnection })
  .plugin(parse())
  ...
;
```

### Create route

```typescript
// src/app/api/books/route.ts
import { compileSchema } from '@sgrnext/api-parse';
import { z } from "zod";
import { handlers } from '@/server/handlers';

export POST = handlers.create(async (env) => {
  const { title, price } = await env.parse(SCHEMA, ZOD_SCHEMA)
  const { id } = await env.pool.execute('...', [ title, price ]);

  return { id };
});

const SCHEMA = compileSchema({ title: 'body', price: 'body' });
const ZOD_SCHEMA = z.object({ title: z.string(), price: z.number() });
```
npm package: @sgrnext/api-parse
Description: The @sgrnext/api-parse plugin enhances the @sgrnext/api ecosystem by providing robust capabilities for parsing and validating requests from NextRequest objects
Author: Dmitry Balakov
Latest version: 0.1.0

# @sgrnext/api-parse

## Getting started

### Install

```bash
npm install --save @sgrnext/api @sgrnext/api-parse
```

### Crate handlers factory

```typescript
// src/server/handle.ts
import { parse } from "@sgrnext/api-parse";

const handler = new HandlerFactory()
  .plugin(parse());
```

### Create route

```typescript
// src/app/api/books/route.ts
import { compileSchema } from '@sgrnext/api-parse';
import { z } from "zod";
import { handler } from '@/server/handlers';

export POST = handler.create(async (env) => {
  const { title, price } = await env.parse(SCHEMA, ZOD_SCHEMA)
  const { id } = await env.pool.execute('...', [ title, price ]);

  return { id };
});

const SCHEMA = compileSchema({ 
  // Get title property from body
  title: 'body', 
  // Get price property from body and cast to number
  price: 'body:number',
});

const ZOD_SCHEMA = z.object({ title: z.string(), price: z.number() });
```
npm package: @sgrnext/api-tickets
Description: The @sgrnext/api-tickets plugin is a plugin for the @sgrnext/api plugin that adds support tickets logic
Author: Dmitry Balakov
Latest version: 0.1.0

# @sgrnext/api-tickets

## Getting started

### Install

```bash
npm install --save @sgrnext/api @sgrnext/api-tickets
```
npm package: @sgrnext/api-upflow
Description: The @sgrnext/api-upflow plugin is a plugin for the @sgrnext/api plugin that adds support for file uploads
Author: Dmitry Balakov
Latest version: 0.1.0

# @sgrnext/api-upflow

## Getting started

### Install

```bash
npm install --save @sgrnext/api @sgrnext/api-upflow
```

### Crate handlers factory

```typescript
// src/server/handle.ts
import { upload } from "@sgrnext/api-upflow";

export const handlers = new HandlerFactory()
  .plugin(upload(new UploadMongoAdapter("connection string or connection object")));
```

### Create routes

```typescript
// src/app/api/me/avatar/route.ts
import { handlers } from '@/server/handlers';

export PUT = handlers.create(async (env) => {
  const { id } = await env.upload(`user:${user}`)
  
  return { id, url: '/api/user/avatar/${id}' };
});
```

```typescript
// src/app/api/avatar/route.ts
import { handlers } from '@/server/handlers';

export PUT = handlers.create(async (env) => {
  const { id } = await env.params;

  const result = await env.uploadGet(id);
  if (result == null) {
    throw new ApiError(404, 'Avatar not found')
  }

  return result;
});
```
npm package: @sgrove/netlify-functions
Description: JavaScript utilities for Netlify Functions
Author: Netlify Inc.
Latest version: 0.10.1-beta.0

# ![functions](functions.png)

[![Build](https://github.com/netlify/functions/workflows/Build/badge.svg)](https://github.com/netlify/functions/actions)
[![Node](https://img.shields.io/node/v/@netlify/functions.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/functions)

JavaScript and TypeScript utilities for [Netlify Functions](https://docs.netlify.com/functions/overview/).

## Installation

```
npm install @netlify/functions
```

## Usage

### On-demand Builders

To use On-demand Builders, wrap your function handler with the `builder` function.

- With JavaScript:

  ```js
  const { builder } = require('@netlify/functions')

  const handler = async (event, context) => {
    return {
      statusCode: 200,
      body: JSON.stringify({ message: 'Hello World' }),
    }
  }

  exports.handler = builder(handler)
  ```

- With TypeScript:

  ```ts
  import { builder, Handler } from '@netlify/functions'

  const myHandler: Handler = async (event, context) => {
    return {
      statusCode: 200,
      body: JSON.stringify({ message: 'Hello World' }),
    }
  }

  const handler = builder(myHandler)

  export { handler }
  ```

### TypeScript typings

This module exports typings for authoring Netlify Functions in TypeScript.

```ts
import { Handler } from '@netlify/functions'

const handler: Handler = async (event, context) => {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello World' }),
  }
}

export { handler }
```

The following types are exported:

- `Handler`
- `HandlerCallback`
- `HandlerContext`
- `HandlerEvent`
- `HandlerResponse`

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks
for contributing!
npm package: @sgrsoft/page24-mcp-server
Description: MCP server for page24 CMS
Latest version: 0.1.3

# @sgrsoft/page24-mcp-server

Page24 CMS를 위한 MCP(Model Context Protocol) 서버입니다.

## 설치

```bash
npm install -g @sgrsoft/page24-mcp-server
```

## 환경변수

모든 AI 도구에서 아래 환경변수가 필요합니다.

| 변수명 | 설명 |
|---|---|
| `PAGE24_API_URL` | Page24 API URL |
| `PAGE24_API_KEY` | Page24 API Key |
| `PAGE24_SITE_ID` | Page24 Site ID |

## AI별 MCP 설정 방법

### Claude Desktop

`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) 또는 `%APPDATA%\Claude\claude_desktop_config.json` (Windows) 파일을 편집합니다.

```json
{
  "mcpServers": {
    "page24": {
      "command": "npx",
      "args": ["-y", "@sgrsoft/page24-mcp-server"],
      "env": {
        "PAGE24_API_URL": "https://your-api-url.com",
        "PAGE24_API_KEY": "your-api-key",
        "PAGE24_SITE_ID": "your-site-id"
      }
    }
  }
}
```

### Claude Code (CLI)

프로젝트 디렉토리에서 아래 명령어를 실행합니다.

```bash
claude mcp add page24 -- npx -y @sgrsoft/page24-mcp-server
```

환경변수는 `.claude/settings.local.json`에서 설정합니다.

```json
{
  "env": {
    "PAGE24_API_URL": "https://your-api-url.com",
    "PAGE24_API_KEY": "your-api-key",
    "PAGE24_SITE_ID": "your-site-id"
  }
}
```

### Cursor

프로젝트 루트에 `.cursor/mcp.json` 파일을 생성합니다.

```json
{
  "mcpServers": {
    "page24": {
      "command": "npx",
      "args": ["-y", "@sgrsoft/page24-mcp-server"],
      "env": {
        "PAGE24_API_URL": "https://your-api-url.com",
        "PAGE24_API_KEY": "your-api-key",
        "PAGE24_SITE_ID": "your-site-id"
      }
    }
  }
}
```

### Windsurf

`~/.codeium/windsurf/mcp_config.json` 파일을 편집합니다.

```json
{
  "mcpServers": {
    "page24": {
      "command": "npx",
      "args": ["-y", "@sgrsoft/page24-mcp-server"],
      "env": {
        "PAGE24_API_URL": "https://your-api-url.com",
        "PAGE24_API_KEY": "your-api-key",
        "PAGE24_SITE_ID": "your-site-id"
      }
    }
  }
}
```

### VS Code (GitHub Copilot)

프로젝트 루트에 `.vscode/mcp.json` 파일을 생성합니다.

```json
{
  "servers": {
    "page24": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@sgrsoft/page24-mcp-server"],
      "env": {
        "PAGE24_API_URL": "https://your-api-url.com",
        "PAGE24_API_KEY": "your-api-key",
        "PAGE24_SITE_ID": "your-site-id"
      }
    }
  }
}
```

### Zed

`~/.config/zed/settings.json`의 `context_servers` 항목에 추가합니다.

```json
{
  "context_servers": {
    "page24": {
      "command": {
        "path": "npx",
        "args": ["-y", "@sgrsoft/page24-mcp-server"],
        "env": {
          "PAGE24_API_URL": "https://your-api-url.com",
          "PAGE24_API_KEY": "your-api-key",
          "PAGE24_SITE_ID": "your-site-id"
        }
      }
    }
  }
}
```

## 제공 도구

이 MCP 서버는 다음 도구들을 제공합니다.

- **Posts** - 게시글 관리 (조회, 생성, 수정, 삭제)
- **Menus** - 메뉴 관리
- **Site** - 사이트 설정 관리
- **Members** - 회원 관리
- **Forms** - 폼 관리
- **Analytics** - 분석 데이터 조회

## 라이선스

MIT