open-index/open-npm huggingface dataset:
npm package: @subgeniuscorp/logger
Description: A light abstraction over [Pino](https://github.com/pinojs/pino).
Author: Nikhil Vijayan
Latest version: 1.0.1

# Node logger

A light abstraction over [Pino](https://github.com/pinojs/pino).

## Installation

```bash
npm install @subgeniuscorp/logger
```

## Usage

```js
logger.info('some information')
logger.info({ requestId: '12345', userId: '12345', environment: process.ENV })
```
npm package: @subgeniuscorp/secret-helper
Description: Shared helper package to create API keys, secrets etc
Author: Nikhil Vijayan
Latest version: 7.0.0

<img src="./img/secret_helper.png" width="150px">

# Secret helper

Helper module that:

- Creates API keys
- Creates salts
- Creates hashes
- Validates hashes
- Creates random strings

## Installation

```bash
npm i @subgeniuscorp/secret-helper
```

## Usage

### Setup

```javascript
const sh = require("@subgeniuscorp/secret-helper")
```

### Create new API key

Use the `generateApiKey` method to generate a new API key consisting of random alphanumeric characters.

The API key length is defined in the config. It defaults to `30`.

```javascript
const apiKey = sh.generateApiKey();
// => 438ae36953

// If you'd like an API key of a specific length
const apiKey = sh.generateApiKey({ length: 20 });

// NOTE: API key length defaults to 30 if not provided.
```

### Create a salt

The salt length is defined in the setup. It defaults to `30`.

```javascript
const salt = await sh.generateSalt();
// => wEa1g

const salt = await sh.generateSalt({ saltRounds: 10 });

// NOTE: Salt length defaults to 10 if not provided.
```

### Create a hash

Note: `createHash` returns a promise.

```javascript
const hash = await sh.createHash({
  valueToHash: "some string",
  saltLength: 10,
});
//=> maTsufd8d07db203eb64bf039de1d38d84aae

const hash = await sh.createHash({
  valueToHash: "some string",
});
// Note: saltLength defaults to 10 if not provided.
```

### Validate a hash

Note: `validateHash` returns a promise.

```javascript
const isValid = await sh.validateHash({
  hashValue: "jQHg1ed6d0b28cb5be10171f15204b9626990",
  valueToCompare: "some string",
});
// => true
```

### Generate a random string

```javascript
const randomStr = sh.generateRandomString({ length: 5 });
// => 4Hf3d
```

length defaults to 10 if not provided.
```javascript
const randomStr = sh.generateRandomString();
// => dB8roaA2lK
```

## Test

To run tests:
```bash
npm run test
```
npm package: @subha007/voicetotext
Description: Reusable web component for voice chatbot using SpeechRecognition
Author: Subhajit Sinha
Latest version: 1.0.1

# voice-to-text

🎙️ Web Component for voice-enabled search using SpeechRecognition API.

## Usage

### Install

```bash
npm install @subha007/voicetotext
```

### Import

```js
import '@subha007/voicetotext/dist/voice-to-text.min.js';
```

### In HTML

```html
<voice-to-text></voice-to-text>
```

### Listen to message events

```js
document.querySelector('voice-to-text').addEventListener('message', (e) => {
  console.log('User said:', e.detail);
});
```

## Customize styles

```css 
voice-to-text {
   --chatbot-max-width: 600px;
        --chatbot-bg: #ffffff;
        --chatbot-border-radius: 10px;
        --chatbot-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        --body-bg: #f5f5f5;
        --font-family: Arial, sans-serif;

        --button-bg: #16477c;
        --button-color: #ffffff;
        --button-hover-bg: #16477c;
        --button-active-bg: #dc3545;
        --button-disabled-bg: #ccc;
        --button-size: 50px;
        --button-font-size: 20px;

        --input-border-color: #ddd;
        --input-border-focus: #007bff;
        --input-radius: 25px;
        --input-padding: 10px;

        --status-color: #025f8e;
        --status-font-size: 14px;

        --error-bg: #f8d7da;
        --error-color: #721c24;
        --error-border: #f5c6cb;
        --error-padding: 10px;
        --error-margin: 10px;
        --error-radius: 5px;
}
```

## Build

```bash
npm run build
```
npm package: @subhajit-gorai/react-native-ml-kit-text-recognition
Description: React Native On-Device Text Recognition w/ Google ML Kit
Author: Ahmed Mahmoud
Latest version: 2.0.0

# @react-native-ml-kit/text-recognition

React Native On-Device Text Recognition w/ Google ML Kit

## Getting started

`npm install @react-native-ml-kit/text-recognition --save`

### Linking

#### React Native > 0.59

[CLI autolink feature](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) links the module while building the app.

#### React Native <= 0.59

`react-native link @react-native-ml-kit/text-recognition`

### Installing Pods

On iOS, use CocoaPods to add the native RNMLKitTextRecognition to your project:

`npx pod-install`

## Usage

```javascript
import TextRecognition from '@react-native-ml-kit/text-recognition';

const result = await TextRecognition.recognize(imageURL);

console.log('Recognized text:', result.text);

for (let block of result.blocks) {
  console.log('Block text:', block.text);
  console.log('Block frame:', block.frame);

  for (let line of block.lines) {
    console.log('Line text:', line.text);
    console.log('Line frame:', line.frame);
  }
}
```

You can also recognize text in scripts other than Latin by specifying the needed script as below:

```js
import TextRecognition, {
  TextRecognitionScript,
} from '@react-native-ml-kit/text-recognition';

const result = await TextRecognition.recognize(
  imageURL,
  // Script for Japanese, you can also use Chinese, Korean, Divanagari and of course Latin.
  TextRecognitionScript.JAPANESE
);
```
npm package: @subhajitpalv/mern-server-setup
Description: A CLI tool to quickly set up a complete MERN backend server with ESM modules
Author: Subhajit Pal
Latest version: 2.0.1

# MERN Server Setup CLI

A command-line tool that scaffolds a complete MERN backend server (ESM) with Express, MongoDB, JWT auth, and Nodemon.

## Features

- Creates folder structure:
  - `config/`
  - `controllers/`
  - `middlewares/`
  - `models/`
  - `routes/`
  - `utils/`
- Generates starter files:
  - `.env`
  - `.gitignore`
  - `config/db.js`
  - `models/itemModel.js`
  - `controllers/itemController.js`
  - `middlewares/authMiddleware.js`
  - `routes/itemRoutes.js`
  - `utils/generateToken.js`
  - `server.js`
- Initializes `package.json` with:
  - `"type": "module"`
  - `start` and `dev` scripts
  - `publishConfig.access = "public"`
- Installs dependencies:
  - express, mongoose, dotenv, cors, jsonwebtoken
- Installs dev dependency:
  - nodemon
- (Optional) Updates dependencies to latest versions
- Automatically runs `npm run dev` to start the server

## Installation

### Run via npx (no install required)

```bash
npx mern-server-setup
```

### Install Globally

```bash
npm install -g @subhajitpalv/mern-server-setup
mern-server-setup
```

### Install Locally in a Project

```bash
npm install @subhajitpalv/mern-server-setup
npx mern-server-setup
```

## Usage

1. Open a terminal in an empty project directory.
2. Run the setup command:

   ```bash
   npx mern-server-setup
   ```

3. The CLI will scaffold the project, install dependencies, and start the server in development mode.
4. Visit `http://localhost:5000` to verify:

   - `GET /` → `{ message: "MERN Server is running!" }`
   - `GET /api/items` → Returns an empty array
   - `POST /api/items` → Creates a new item

## Scripts

After setup, your `package.json` will include:

```json
"scripts": {
  "start": "node server.js",
  "dev": "nodemon server.js"
}
```

- **dev**: Starts server with hot reload
- **start**: Starts server normally

## Configuration

Copy `.env` to configure:

```
PORT=5000
MONGO_URI=mongodb://localhost:27017/mern_app
JWT_SECRET=supersecretkey
```

## Troubleshooting

- **Command not found**  
  Ensure you call the binary name `mern-server-setup`, not the package name.  
  ```bash
  npx mern-server-setup
  # or if installed globally:
  mern-server-setup
  ```

- **Windows PATH issues**  
  Use npx to avoid PATH problems, or run the local binary directly:
  ```bash
  .\node_modules\.bin\mern-server-setup
  ```

- **Permission or 2FA errors**  
  Ensure you’re logged in to npm with:
  ```bash
  npm login
  npm publish --access public
  ```

## Contribution

Feel free to open issues or submit pull requests on [GitHub](https://github.com/Subhajitincareer/mern-server-setup).

## License

MIT License  
© 2025 Subhajit Pal