open-index/open-npm huggingface dataset:
npm package: @mysetup/cache
Description: Shared in-memory cache helpers built on top of node-cache.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/cache

Thin wrapper around `node-cache` for in-memory key/value storage.

## Installation

```bash
pnpm add @mysetup/cache
```

## Supported libraries and runtimes

| Supported              | Notes                                                  |
| ---------------------- | ------------------------------------------------------ |
| Node.js                | Full support                                           |
| Next.js server runtime | Use in route handlers, server actions, or backend code |
| Vite browser apps      | Not supported                                          |

## Usage

```ts
import { setCacheData, getCacheData, deleteCacheData } from "@mysetup/cache";

setCacheData("session:user:1", { id: 1 }, 60);
const session = getCacheData("session:user:1");
deleteCacheData("session:user:1");
```

## Notes

- Cache data is stored in process memory.
- Do not rely on this package for distributed caching across multiple servers.
npm package: @mysetup/classnames
Description: Utility for merging clsx and tailwind-merge class names.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/classnames

Merge conditional class names and resolve Tailwind conflicts with one helper.

## Installation

```bash
pnpm add @mysetup/classnames
```

## Supported libraries and runtimes

| Supported | Notes                  |
| --------- | ---------------------- |
| Vite      | Full support           |
| Next.js   | Full support           |
| Node.js   | Full support           |
| React     | Works in any React app |

## Usage

```tsx
import { classNames } from "@mysetup/classnames";

export function Button({
    active,
    className,
}: {
    active?: boolean;
    className?: string;
}) {
    return (
        <button
            className={classNames(
                "rounded-md px-4 py-2 text-sm font-medium",
                active
                    ? "bg-slate-900 text-white"
                    : "bg-slate-100 text-slate-900",
                className,
            )}
        >
            Save
        </button>
    );
}
```

## API

```ts
classNames(...classes: ClassValue[]): string
```
npm package: @mysetup/eslint-config
Description: Shared ESLint configuration for Node.js, React, and Next.js projects.
Author: krishnaraj
Latest version: 2.0.11

﻿# @mysetup/eslint-config

## Overview

Shared ESLint configuration for this workspace, including React, Next.js, Node.js, and TypeScript defaults.

## Installation

```bash
pnpm add -D @mysetup/eslint-config eslint
```

## Supported libraries and runtimes

| Supported        | Notes                       |
| ---------------- | --------------------------- |
| Node.js projects | Supported                   |
| React projects   | Supported                   |
| Next.js projects | Supported                   |
| Vite projects    | Supported when using ESLint |

## Usage

```js
// .eslintrc.js
module.exports = {
    extends: ["@mysetup/eslint-config"],
};
```

## Scripts

- `pnpm clean` - remove generated artifacts

## License

MIT
npm package: @mysetup/helpers
Description: Shared utility helpers for browser and server applications.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/helpers

Shared utility helpers for browser and server applications.

## Installation

```bash
pnpm add @mysetup/helpers
```

## Supported libraries and runtimes

| Supported         | Notes                                                         |
| ----------------- | ------------------------------------------------------------- |
| Vite              | Root exports are supported                                    |
| Next.js           | Root exports are supported; crypto helpers are server-only    |
| Node.js           | Full support including `@mysetup/helpers/crypto`              |
| Browser-only APIs | `getTextWidth` and `setCookie` should only run in the browser |

## Browser and universal usage

```ts
import {
    formatPhoneNumber,
    generateCacheKey,
    getDateTimeDiff,
} from "@mysetup/helpers";

const formatted = formatPhoneNumber("9876543210");
const cacheKey = generateCacheKey("brand", "production", "users");
const diff = getDateTimeDiff("2025-01-01T00:00:00Z");
```

## Node.js only usage

```ts
import { decodeData, encodeData } from "@mysetup/helpers/crypto";

const encrypted = encodeData("hello", process.env.DATA_KEY || "");
const decrypted = decodeData(encrypted, process.env.DATA_KEY || "");
```

## Notes

- `getTextWidth` and `setCookie` should only be called in the browser.
- `encodeData` and `decodeData` should only be used in Node.js or other runtimes that expose the Node `crypto` module.
npm package: @mysetup/hooks
Description: Shared React hooks for application and UI state.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/hooks

Reusable React hooks for forms, responsive state, and UI behavior.

## Installation

```bash
pnpm add @mysetup/hooks react react-dom
```

## Supported libraries and runtimes

| Supported                 | Notes                    |
| ------------------------- | ------------------------ |
| React                     | Required peer dependency |
| Vite React apps           | Supported                |
| Next.js client components | Supported                |
| Next.js server components | Not supported            |
| Node.js scripts           | Not supported            |

## Usage

```tsx
"use client";

import { useDebounce, useModal } from "@mysetup/hooks";

function SearchBox({ value }: { value: string }) {
    const debouncedValue = useDebounce(value, 400);
    const { isOpen, toggleModal, close } = useModal();

    return (
        <>
            <button onClick={toggleModal}>{isOpen ? "Close" : "Open"}</button>
            <p>{debouncedValue}</p>
            <button onClick={close}>Reset</button>
        </>
    );
}
```

## Exports

- `useBreakpoint`
- `useDebounce`
- `useForm`
- `useFormatPhoneNumber`
- `useIsBreakpoint`
- `useModal`
- `useTouchEndFix`
npm package: @mysetup/jest-config
Description: Shared Jest configuration and test utilities for React and Next.js projects.
Author: krishnaraj
Latest version: 2.0.10

﻿# @mysetup/jest-config

## Overview

Base Jest configuration with `ts-jest`, Testing Library setup, and project defaults for React/Next.js packages.

## Installation

```bash
pnpm add -D @mysetup/jest-config jest
```

## Supported libraries and runtimes

| Supported             | Notes                        |
| --------------------- | ---------------------------- |
| Jest                  | Required                     |
| React Testing Library | Supported                    |
| Next.js test setup    | Supported                    |
| Vitest                | Not targeted by this package |

## Usage

```js
const jestConfig = require("@mysetup/jest-config");

module.exports = {
    ...jestConfig,
};
```

## Scripts

- `pnpm build` - compile TypeScript to `dist/`
- `pnpm clean` - remove generated artifacts

## License

MIT
npm package: @mysetup/logger
Description: Shared Pino logger instance for Node.js services and apps.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/logger

Shared logger package built on top of `pino`.

## Installation

```bash
pnpm add @mysetup/logger
```

## Supported libraries and runtimes

| Supported              | Notes         |
| ---------------------- | ------------- |
| Node.js                | Full support  |
| Next.js server runtime | Supported     |
| Vite browser apps      | Not supported |

## Usage

```ts
import { logger } from "@mysetup/logger";

logger.info("Application started");
logger.error({ err: new Error("Example") }, "Request failed");
```

## Notes

- The package exports a ready-to-use `pino` logger instance.
- Extend or wrap it in the consuming app if you need transport-specific configuration.
npm package: @mysetup/mqtt
Description: MQTT client helpers for Node.js applications.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/mqtt

MQTT helpers for creating connections, subscribing, publishing, and reusing clients.

## Installation

```bash
pnpm add @mysetup/mqtt
```

## Supported libraries and runtimes

| Supported              | Notes                           |
| ---------------------- | ------------------------------- |
| Node.js                | Full support                    |
| Next.js server runtime | Supported in backend-only usage |
| Browser apps           | Not supported                   |

## Usage

```ts
import {
    mqttCreateConnection,
    mqttDisconnect,
    mqttPublish,
    mqttSub,
} from "@mysetup/mqtt";

const clientId = "app-client";
const config = {
    protocol: "mqtt",
    host: "localhost",
    port: 1883,
    path: "",
};

mqttCreateConnection({
    clientId,
    config,
    topicList: ["updates/topic"],
    messageCallback: (topic, payload) => {
        console.log(topic, payload);
    },
    environment: "development",
});

mqttSub(["updates/topic"], clientId);
mqttPublish("updates/topic", { hello: "world" }, clientId);
mqttDisconnect(
    {
        clientId,
        config,
        topicList: ["updates/topic"],
        messageCallback: () => {},
    },
    false,
);
```

## Exports

- `mqttCreateConnection`
- `mqttSub`
- `mqttUnSub`
- `mqttPublish`
- `mqttDisconnect`
- `getMqttClient`
- `removeMqttClient`
npm package: @mysetup/nodemailer
Description: Email helpers built on nodemailer with EJS template support.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/nodemailer

Email utility package that wraps `nodemailer` with EJS template rendering.

## Installation

```bash
pnpm add @mysetup/nodemailer
```

## Supported libraries and runtimes

| Supported              | Notes         |
| ---------------------- | ------------- |
| Node.js                | Full support  |
| Next.js server runtime | Supported     |
| Browser apps           | Not supported |

## Usage

```ts
import { connectNodeMailer } from "@mysetup/nodemailer";

await connectNodeMailer(
    {
        subject: "Welcome",
        toEmail: "user@example.com",
        template: "Test",
        value: { name: "Krishna" },
    },
    {
        user: process.env.SMTP_USER || "",
        pass: process.env.SMTP_PASS || "",
        from: "no-reply@example.com",
    },
);
```

## Notes

- Built for server-side use only.
- Template files are published into `dist/views` unless `htmlTemplate` is provided directly.
npm package: @mysetup/prettier-config
Description: Shared Prettier configuration.
Author: krishnaraj
Latest version: 2.0.10

﻿# @mysetup/prettier-config

## Overview

Shared Prettier configuration used across this workspace.

## Installation

```bash
pnpm add -D @mysetup/prettier-config prettier
```

## Supported libraries and runtimes

| Supported        | Notes     |
| ---------------- | --------- |
| Node.js projects | Supported |
| React projects   | Supported |
| Next.js projects | Supported |
| Vite projects    | Supported |

## Usage

```json
{
  "prettier": "@mysetup/prettier-config"
}
```

## Scripts

- `pnpm clean` - remove generated artifacts

## License

MIT
npm package: @mysetup/test-helpers
Description: Shared React and Apollo test helpers for application packages.
Author: krishnaraj
Latest version: 2.0.10

# @mysetup/test-helpers

Testing utilities built on top of React Testing Library, `jest-axe`, and Apollo testing helpers.

## Installation

```bash
pnpm add -D @mysetup/test-helpers react react-dom
```

## Supported libraries and runtimes

| Supported             | Notes                        |
| --------------------- | ---------------------------- |
| Jest + jsdom          | Supported                    |
| React Testing Library | Supported                    |
| Next.js test suites   | Supported                    |
| Vitest                | Not targeted by this package |

## Usage

```tsx
import { screen, setupRender } from "@mysetup/test-helpers";

function Component({ text }: { text: string }) {
    return <div>{text}</div>;
}

const render = setupRender(Component, { text: "default value" });

test("renders merged props", () => {
    render({ text: "overridden" });
    expect(screen.getByText("overridden")).toBeInTheDocument();
});
```

## Exports

- `setupRender`
- `setupRenderWithProvider`
- `setupRenderHook`
- `setupRenderHookWithProvider`
- `MockedProvider`
- Testing Library re-exports
- `jest-axe` re-exports

## Notes

- This package currently uses `@jest/globals` and mocks `next/navigation`, so it is designed for Jest-based test setups.
- If your app uses Vite, this package is suitable when your tests run on Jest rather than Vitest.
npm package: @mysetup/tsconfig
Description: Shared TypeScript configuration presets for Node.js, React, and Next.js.
Author: krishnaraj
Latest version: 2.0.10

﻿# @mysetup/tsconfig

## Overview

Shared TypeScript base configurations for apps and libraries in this workspace.

## Installation

```bash
pnpm add -D @mysetup/tsconfig typescript
```

## Supported libraries and runtimes

| Supported | Notes                                        |
| --------- | -------------------------------------------- |
| Node.js   | Supported via `server.json` and `base.json`  |
| React     | Supported via `react-library.json`           |
| Next.js   | Supported via `nextjs.json`                  |
| Vite      | Supported through the base and React configs |

## Usage

```json
{
  "extends": "@mysetup/tsconfig/base.json"
}
```

## Available Configs

- `@mysetup/tsconfig/base.json`
- `@mysetup/tsconfig/nextjs.json`
- `@mysetup/tsconfig/react-library.json`
- `@mysetup/tsconfig/react-library-build.json`
- `@mysetup/tsconfig/server.json`

## Scripts

No package scripts are defined.

## License

MIT
npm package: @mysetup/types
Description: Shared TypeScript types for client and server applications.
Author: krishnaraj
Latest version: 2.0.14

# @mysetup/types

Shared TypeScript types, enums, and constants used across applications.

## Installation

```bash
pnpm add @mysetup/types
```

## Supported libraries and runtimes

| Supported | Notes                                         |
| --------- | --------------------------------------------- |
| Vite      | Full support                                  |
| Next.js   | Full support                                  |
| Node.js   | Full support                                  |
| React     | Works in React apps that consume shared types |

## Usage

```ts
import { Breakpoint, BreakpointSize } from "@mysetup/types";
import type { AlertType } from "@mysetup/types";

const alert: AlertType = "success";
const mobile = Breakpoint.Small;
const mediumWidth = BreakpointSize.md;
```

## Exports

- alert and brand types
- breakpoint enums and sizes
- client and service context types
- environment helpers
- database and size helpers
npm package: @mysetup/typography
Description: React typography components and CSS styles for UI applications.
Author: krishnaraj
Latest version: 2.0.13

# @mysetup/typography

Typography component and shared styles for React applications.

## Installation

```bash
pnpm add @mysetup/typography react react-dom
```

## Supported libraries and runtimes

| Supported                 | Notes                    |
| ------------------------- | ------------------------ |
| React                     | Required peer dependency |
| Vite React apps           | Supported                |
| Next.js client components | Supported                |
| Next.js server components | Not supported            |
| Node.js scripts           | Not supported            |

## Usage

```tsx
"use client";

import { Typography } from "@mysetup/typography";
import "@mysetup/typography/styles.css";

export function HeroTitle() {
    return (
        <Typography as="h1" variant="headline2" display>
            Design System Title
        </Typography>
    );
}
```

## Styles

- Import `@mysetup/typography/styles.css` once in your app entrypoint, layout, or component tree.
- The package also keeps `@mysetup/typography/style.css` as a compatibility alias.

## Props

- `as`: HTML tag or React component to render
- `variant`: typography variant name
- `display`: toggles the display font modifier
- `className`: additional classes merged with the generated variant class