open-index/open-npm huggingface dataset:
npm package: @logicsoftware/eslint-plugin-ep-custom
Description: Custom eslint rules for EP application
Latest version: 2.0.1

eslint-plugin-ep-custom
---
This package includes custom eslint rules for EP application.

Installation
---
The package is stored at npm registry. To add it into an existing project, use the npm CLI:

```
npm i @logicsoftware/eslint-plugin-ep-custom
```

Contribution
---
If you modify the source code in `src` folder, run `npm run build` to update the dist folder. ESlint only works
with `.js` code, so it's necessary to compile typescript source to javascript. Publish the changes to the npm registry.

# Rules
## Cross-feature modules
This rule checks whether the module uses files from other "feature". Feature are calculated as a folder in `baseUri` (e.g. `src/Scripts`).

## Configuration

In `.eslintrc.js` file, add the following configuration to `exports.overrdes` section (with corresponding file masks):

```json5
{
  "rules": {
    "@logicsoftware/ep-custom/no-cross-feature-imports": [
      "error",
      {
        ignoreFeatures: [
          // ...
        ],
        allowedImports: [
          // ...
        ],
        aliases: {
          // ...
        },
        baseUrl: "..."
      }
    ]
  }
}
```

* `baseUri` - the base URI of the project (`src/Scripts`)
* `ignoreFeatures` - all files from within ignored features will be ignored by the rule
* `allowedImports` - all imports from within allowed features will be allowed by the rule
* `aliases` - map of aliases to be used by webpack/ts/jest module loader.


## Example config

```json5
{
  ignoreFeatures: ["app", "Tests", "QUnit"],
  allowedImports: ["common", "const", "EasyProjects" ],
  aliases: {
    "~": "."
  },
  baseUrl: "src/Scripts/"
}
```
npm package: @logicspike/blog
Description: Official blog SDK for LogicSpike — headless client and pre-built React components for posts, categories, and tags.
Latest version: 1.0.0

# @logicspike/blog

Official blog SDK for [LogicSpike](https://logicspike.com) — a headless API client and pre-built React components for rendering blog posts, categories, and tags.

## Installation

```bash
npm install @logicspike/blog
```

## Quick Start

### Headless Client (No React)

```ts
import { LogicSpikeClient } from '@logicspike/blog';

const client = new LogicSpikeClient({
  apiKey: 'your-api-key',
  baseUrl: 'https://api.logicspike.com',
});

// List posts
const { data, meta } = await client.blog.list({ page: 1, limit: 10 });

// Get a single post
const post = await client.blog.get('my-post-slug');

// List categories & tags
const { data: categories } = await client.blog.categories.list();
const { data: tags } = await client.blog.tags.list();
```

### React Components

```tsx
import { LogicSpikeClient } from '@logicspike/blog';
import { LogicSpikeProvider, BlogList, BlogPost } from '@logicspike/blog/react';
import '@logicspike/blog/styles.css';

const client = new LogicSpikeClient({
  apiKey: 'your-api-key',
  baseUrl: 'https://api.logicspike.com',
});

function App() {
  return (
    <LogicSpikeProvider client={client}>
      <BlogList columns={3} limit={9} />
    </LogicSpikeProvider>
  );
}

function PostPage({ slug }: { slug: string }) {
  return (
    <LogicSpikeProvider client={client}>
      <BlogPost slug={slug} />
    </LogicSpikeProvider>
  );
}
```

## Components

| Component | Description |
|---|---|
| `<BlogList>` | Paginated post grid/list with loading skeletons |
| `<BlogPost>` | Full post view with featured image, metadata, content |
| `<BlogCard>` | Individual post card (`default`, `featured`, `compact` variants) |
| `<BlogCategoryNav>` | Category navigation (`sidebar`, `tabs`, `pills` variants) |
| `<BlogTagNav>` | Tag navigation (`pills`, `cloud` variants) |

## Hooks

| Hook | Returns |
|---|---|
| `usePosts(params?)` | `{ data, loading, error, refetch, page, totalPages, hasNextPage, hasPrevPage }` |
| `usePost(slug)` | `{ data, loading, error }` |
| `useCategories()` | `{ data, loading, error, refetch }` |
| `useTags()` | `{ data, loading, error, refetch }` |

## Filtering & Pagination

```tsx
const { data } = usePosts({
  page: 1,
  limit: 10,
  category: 'tutorials',
  tag: 'react',
  search: 'getting started',
  sort: 'publishedAt',
  order: 'desc',
});
```

## Styling

Import the default styles for rendered blog content:

```ts
import '@logicspike/blog/styles.css';
```

These styles target the `.lsb-content` class and support CSS custom properties (`--border`, `--muted`, `--primary`, `--muted-foreground`) for easy theming. Components use Tailwind CSS utility classes and are fully compatible with shadcn/ui themes.

## License

MIT
npm package: @logicsquare/react-audio-player
Description: A custom audio player written in TypeScript.
Author: Logic Square Technologies
Latest version: 1.0.1

# React Audio Player

<a href="https://www.npmjs.com/package/@logicsquare/react-audio-player" title="MIT License">
    <img src="https://img.shields.io/badge/license-MIT-brightgreen
" alt="MIT License">
  </a>

- Custom audio player component with support for different browsers.
- Written in TypeScript
- Highly customizable layout
- Mobile responsive

Supported browsers: Chrome, Firefox, Safari, Edge

## Installation

`$ npm i @logicsquare/react-audio-player`

OR

`$ yarn add @logicsquare/react-audio-player`

## Usage

```jsx
import CustomAudioPlayer from "@logicsquare/react-audio-player";

const Player = () => (
  <CustomAudioPlayer
    theme="#ff9900"
    media={[
      {
        title: "Some Title 1",
        url: "http://example.com/audio1.mp3",
        thumbnail: "http://example.com/thumbnail1.jpg",
        artist: "Artist Name 1",
      },
      {
        title: "Some Title 2",
        url: "http://example.com/audio2.mp3",
        thumbnail: "http://example.com/thumbnail2.jpg",
        artist: "Artist Name 2",
      },
    ]}
    // other props here
  />
);
```

## Keyboard shortcuts (When audio player focused)

They can be turned off by setting `hasDefaultKeyShortcuts` prop to `false`

| Key binding | Action        |
| ----------- | ------------- |
| Space       | Play/Pause    |
| ←           | Skip Backward |
| →           | Skip Forward  |
| ↑           | Volume up     |
| ↓           | Volume down   |
| M           | Toggle mute   |

## Player Props

| Props                                | Type           | Default   | Note                                                              |
| ------------------------------------ | -------------- | --------- | ----------------------------------------------------------------- |
| theme (optional)                     | string         | #000000   | Set theme of the player                                           |
| media                                | Array<object\> | undefined | Pass an array of objects where each object contains audio details |
| skipTime (optional)                  | number         | 10        | Set the time in seconds for skipping audio forward or backward    |
| showSkipButtons (optional)           | boolean        | true      | Show skip buttons for skipping forward and backward               |
| showVolumeControl (optional)         | boolean        | true      | Show volume control for adjusting volume                          |
| showPlaybackSpeedControls (optional) | boolean        | true      | Show playback speed controls for adjusting playback speed         |
| hasDefaultKeyShortcuts (optional)    | boolean        | true      | Wheather to have default keyboard shortcuts                       |

## How to contribute

Issues and PR's are welcome.
npm package: @logicssoldier/publish-folder
Description: Quick Express.js app to publish and browse folder contents
Author: LogicsSoldier@gmail.com
Latest version: 1.0.6

###### @LogicsSoldier's
# Publish Folder

A simple Express.js application to quickly publish and browse folder contents via web interface. View files and folders in a clean interface on any device and download with a single click. 

It's only 300 lines of code and 2 dependencies, [express](https://www.npmjs.com/package/express) & [archiver](https://www.npmjs.com/package/archiver) *-- you really can read it.*

<img width="1536" height="972" alt="image" src="https://github.com/user-attachments/assets/8ff54bd0-a0e3-47eb-abfc-c0e79556e326" />

## Features

- 📁 Browse folders and files with a clean web interface
- 📥 Download files with one click
- 🎨 Responsive design that works on mobile and desktop
- 🔒 Security: prevents access outside the published folder
- 📊 Shows file sizes and modification dates
- 🚀 Fast and lightweight

## Installation

```bash
# if you trust me and want to add the command to path so you can use it anywhere
# (whole package -dependencies is only 300 lines of code.. only 2 dependecies)
npm install -g @logicssoldier/publish-folder
# OR --------
# can also download the package from npm or github and run from the folder without needing admin privelage
npm pack @logicssoldier/publish-folder
# pick whichever you're comfortable with!

```

## Usage

### Publish a specific folder:

```bash
# if global
publish-folder /path/to/folder
# otherwise find npm package and..
node server.js /path/to/folder
```

### Custom port:

```bash
PORT=8080 npm start
```

## How It Works

1. Cd into your chose directory and start the server with `publish-folder`
2. Open your browser to `http://localhost:3000`
3. Browse folders by clicking on them
4. Download files by clicking on them
5. Use the breadcrumb navigation or ".." to go back
6. click the download button to download the entire directory zipped up

## Examples

Publish your Documents folder:
```bash
node server.js ~/Documents
```

Publish current directory:
```bash
node server.js
```

Publish and use custom port:
```bash
PORT=8080 node server.js /path/to/folder
```

## Security

The application includes path traversal protection to ensure users cannot access files outside the published folder.

## License

MIT
npm package: @logicssoldier/test-repo
Description: Control your computer's mouse and keyboard from another device
Latest version: 1.6.2

# Remote Mouse & Keyboard

Control your computer's mouse and keyboard from another device (phone, tablet, or computer) through a web browser.

<img width="339" alt="image" src="https://github.com/user-attachments/assets/d5e8a136-d20b-473c-ae46-8c8adc1ed0f0" />

## Features

- **Mouse Control**: Touch-based trackpad for moving the mouse
- **Click Support**: Left click, right click, and double click
- **Keyboard Input**: Type text and use special keys (Enter, Backspace, Arrow keys, etc.)
- **Real-time Control**: Low-latency WebSocket communication
- **Mobile-Friendly**: Responsive design optimized for touch devices
- **No Screen Sharing**: Efficient control without video streaming

## Installation


#### Global Command

```bash
npm install -g open-mouse
# then just run by typing open-mouse
```

#### Manual

1. Downlooad
```bash
npm pack open-mouse
unzip TAR_FILE
```

2. Install dependencies:
```bash
cd package
npm i
```

3. Start the server:
```bash
npm start
```

3. Open the displayed URL on another device (e.g., `http://YOUR_IP:3000`)

## Usage

1. Make sure both devices are on the same network
2. Start the server on the computer you want to control
3. Open the web interface on your phone/tablet
4. Use the touchpad area to move the mouse
5. Tap the touchpad for a quick click
6. Use the buttons for left/right/double clicks
7. Type in the text area to send keyboard input

## Requirements

- Node.js 14 or higher
- macOS, Windows, or Linux

## Security Note

This app is intended for local network use only. Do not expose it to the public internet without proper authentication and encryption.

## Troubleshooting

**robotjs installation issues on macOS:**
- You may need to grant accessibility permissions to your terminal/IDE
- Go to System Preferences → Security & Privacy → Privacy → Accessibility

**Connection issues:**
- Ensure both devices are on the same network
- Check if port 3000 is available
- Use your computer's local IP address instead of localhost when connecting from another device
npm package: @logicteca/popup
Description: This is a popup library
Author: Logicteca
Latest version: 1.0.9

# Popup

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project popup` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project popup`.
> Note: Don't forget to add `--project popup` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build popup` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build popup`, go to the dist folder `cd dist/popup` and run `npm publish`.

## Running unit tests

Run `ng test popup` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @logicteca/popup-test
Description: This is a popup library
Author: Logicteca
Latest version: 1.0.0

# Popup

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project popup` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project popup`.
> Note: Don't forget to add `--project popup` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build popup` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build popup`, go to the dist folder `cd dist/popup` and run `npm publish`.

## Running unit tests

Run `ng test popup` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @logicteca/toast
Description: Toast component for Angular
Author: LogicTECA
Latest version: 1.0.1

# Toast

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project toast` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project toast`.
> Note: Don't forget to add `--project toast` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build toast` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build toast`, go to the dist folder `cd dist/toast` and run `npm publish`.

## Running unit tests

Run `ng test toast` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @logicwind/react-native-exit-app
Description: Exit / Close / Kill / shutdown your react native app. Does not invoke a crash notification.
Author: Logicwind
Latest version: 0.2.0

# @logicwind/react-native-exit-app

`@logicwind/react-native-exit-app` is a simple React Native library that allows you to programmatically exit or close your app. It's useful for scenarios where you want to force the app to close, such as after a logout, session timeout, or a critical error. The library supports both Android and iOS as well as TvOS.

## Installation

Using npm:

```sh md title="Terminal"
npm install @logicwind/react-native-exit-app
```

or using yarn:

```sh md title="Terminal"
yarn add @logicwind/react-native-exit-app
```

### Expo Setup

If you're working with this Expo project, make sure to run:

```sh md title="Terminal"
npx expo prebuild
```

### iOS Setup

After installation, make sure to install CocoaPods:

```sh md title="Terminal"
cd ios && pod install
```

### Android Setup

No additional setup is required.

## Usage

Import and use the `exitApp` function.

```tsx md title="App.tsx"
import { exitApp } from '@logicwind/react-native-exit-app';

<Button title="Exit App" onPress={() => exitApp()} />;
```

## How It Works

`@logicwind/react-native-exit-app` uses native code to exit the app based on the platform:

- **iOS:** The module uses exit(0) to force the app to close.
- **Android:** The module calls System.exit(0) or finishes the activity to terminate the app.

## react-native-exit-app is crafted mindfully at [Logicwind](https://www.logicwind.com?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-exit-app)

We are a 130+ people company developing and designing multiplatform applications using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:sales@logicwind.com) or through or [contact form](https://www.logicwind.com/contact-us?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-exit-app)!

We will always answer you with pleasure 😁

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
npm package: @logicwind/react-native-fold-detection
Description: The purpose of the package is to provide details regarding the Android folding capability.
Author: logicwind
Latest version: 0.3.2

# react-native-fold-detection

The purpose of the package is to provide details regarding the Android folding capability.

## Installation

```sh
npm install @logicwind/react-native-fold-detection
```


## iOS

You'll need to disable auto-linking for this package.
To do so, create react-native.config.js in the root of your project with this content:
```js
module.exports = {
  dependencies: {
    "react-native-fold-detection": {
      platforms: {
        ios: null, // this will disable autolinking for this package on iOS
      },
    },
  },
};
```

## In App.js Wrap your app with FoldingFeatureProvider

```js
import * as React from "react";

import { FoldingFeatureProvider } from "@logicwind/react-native-fold-detection";
import SampleScreen from "./SampleScreen";

export default function App() {
  return (
    <FoldingFeatureProvider>
      <SampleScreen />
    </FoldingFeatureProvider>
  );
}
```

## In other screens

```js
import { useFoldingFeature } from "@logicwind/react-native-fold-detection";

const { layoutInfo, isTableTop, isBook, isFlat } = useFoldingFeature();
```


### useFoldingFeature Props

| Prop       | Type       | Default | Description                                                                                                              |
| ---------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| layoutInfo | LayoutInfo |         | Folding Feature from [android doc](https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature) |
| isTableTop | boolean    | false   | HALF_OPENED & HORIZONTAL                                                                                                 |
| isBook     | boolean    | false   | HALF_OPENED & VERTICAL                                                                                                   |
| isFlat     | boolean    | true    |                                                                                                                          |

## react-native-fold-detection is crafted mindfully at [Logicwind](https://www.logicwind.com?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-fold-detection)

We are a 130+ people company developing and designing multiplatform applications using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:sales@logicwind.com) or through or [contact form](https://www.logicwind.com/contact-us?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-fold-detection)!

We will always answer you with pleasure 😁

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
npm package: @logicwind/react-native-status-bar-height
Description: A React Native library for retrieving the status bar height on both Android and iOS.
Author: Logicwind
Latest version: 0.2.2

# @logicwind/react-native-status-bar-height

A simple and lightweight React Native package to get the **status bar height** and **bottom safe area inset** on both Android and iOS.

### Installation

Using npm:

```sh md title="Terminal"
npm install @logicwind/react-native-status-bar-height
```

or using yarn:

```sh md title="Terminal"
yarn add @logicwind/react-native-status-bar-height
```

### Expo Setup

If you're working with this Expo project, make sure to run:

```sh md title="Terminal"
npx expo prebuild
```

### iOS Setup

After installation, make sure to install CocoaPods:

```sh md title="Terminal"
cd ios && pod install
```

### Android Setup

No additional setup is required.

## Usage

Import and use the utility functions to fetch values:

```tsx md title="App.tsx"
import {
  fetchStatusBarHeight,
  fetchBottomInset,
} from '@logicwind/react-native-status-bar-height';

const statusBarHeight = fetchStatusBarHeight();
const bottomInset = fetchBottomInset();
```

## Example
```tsx md title="App.tsx"
<View style={{ flex: 1 }}>
  <Text style={{ marginTop: fetchStatusBarHeight() }}>
    Status Bar Height
  </Text>
  <View style={{ flex: 1 }} />
  <Text style={{ marginBottom: fetchBottomInset() }}>
    Bottom Safe Area
  </Text>
</View>
```

## API
`fetchStatusBarHeight(): number` - Returns the status bar height in pixels.

`fetchBottomInset(): number` - Returns the bottom safe area inset in pixels, helpful for avoiding overlap with gesture/navigation bars.

## How It Works

- On iOS, it retrieves values using native APIs or falls back to common values.

- On Android, it uses StatusBar.currentHeight for the status bar height, and WindowInsets for the bottom inset when available.

- A fallback mechanism is in place to provide reasonable defaults.

## react-native-status-bar-height is crafted mindfully at [Logicwind](https://www.logicwind.com?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-status-bar-height)

We are a 130+ people company developing and designing multiplatform applications using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:sales@logicwind.com) or through or [contact form](https://www.logicwind.com/contact-us?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-status-bar-height)!

We will always answer you with pleasure 😁

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
npm package: @logicwind/react-native-tvos-ssl-pinning
Description: React-native TVOS plugin to support ssl pinning.
Author: Logicwind
Latest version: 0.1.0

# @logicwind/react-native-tvos-ssl-pinning

React-Native ssl pinning on tvos using OkHttp 3 in Android, and URLSession-based custom implementation on tvOS.


## Getting started

`$ npm install @logicwind/react-native-tvos-ssl-pinning --save`

### Install pods for ios
`$ cd ios && pod install && cd ..`

### Mostly automatic installation

> If you are using `React Native 0.60.+` [the link should happen automatically](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md). in iOS run pod install

`$ react-native link @logicwind/react-native-tvos-ssl-pinning`

## Usage

#### Create the certificates:

1. openssl s_client -showcerts -servername example.com -connect example.com:443 </dev/null

2. Copy the certificate (Usally the first one in the chain), and paste it using nano or other editor like so , nano mycert.pem
3. convert it to .cer with this command
openssl x509 -in mycert.pem -outform der -out mycert.cer 
```
For more ways to obtain the server certificate please refer:
https://stackoverflow.com/questions/7885785/using-openssl-to-get-the-certificate-from-a-server
```
#### iOS
 - Drag mycert.cer to Xcode project, mark your target and 'Copy items if needed'
 - Your certificate will be automatically detect from the target
 
#### Android
 - Place your .cer files under src/main/assets/.
 - Your certificate will be automatically detect from the target

 ### Certificate Pinning

```javascript
import { fetchDataWithPinning, getAvailableCertificates } from '@logicwind/react-native-tvos-ssl-pinning';

fetchDataWithPinning(url, {
	method: "POST" ,
	timeoutInterval: communication_timeout, // milliseconds
	body: body,
	sslPinning: {
		certs: ["cert1","cert2"] // your certificates name (without extension), for example cert1.cer, cert2.cer
	},
	headers: {
		Accept: "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "e_platform": "mobile",
	}
})
.then(response => {
	console.log(`response received ${response}`)
})
.catch(err => {
	console.log(`error: ${err}`)
})

// if you want to see the attached certificates
const result = await getAvailableCertificates();
```

## react-native-tvos-ssl-pinning is crafted mindfully at [Logicwind](https://www.logicwind.com?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-tvos-ssl-pinning)

We are a 130+ people company developing and designing multiplatform applications using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:sales@logicwind.com) or through or [contact form](https://www.logicwind.com/contact-us?utm_source=github&utm_medium=github.com-logicwind&utm_campaign=react-native-tvos-ssl-pinning)!

We will always answer you with pleasure 😁

## License
This project is licensed under the terms of the MIT license.
npm package: @logifex/auth
Description: ---
Latest version: 0.2.0


---

## **`logifex/auth`**

Authentication and authorization middleware for Logifex.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.  
> Version `0.2.0` introduces intentional breaking changes for security and scalability.

---

## Overview

`@logifex/auth` provides composable authentication and authorization middleware
designed to integrate cleanly into the Logifex request lifecycle.

It supports:

- JWT authentication (identity-only tokens)
- API key authentication
- Role-based authorization
- Dynamic permission resolution
- Refresh token rotation with pluggable stores (memory / Redis)

> ⚠️ JWT payloads should contain **identity only** (e.g. `sub`, `role`).  
> Permissions must NOT be embedded in JWTs.

---

## Installation

```bash
pnpm add @logifex/auth jsonwebtoken
```

To use Redis-backed refresh sessions, install ioredis:

```bash
pnpm add ioredis
```
---

## JWT Authentication

```ts
import { auth } from '@logifex/auth'
import jwt from 'jsonwebtoken'

const verify = async (token: string) => {
  try {
    return jwt.verify(token, 'secret')
  } catch {
    return null
  }
}

app.use(
  auth({
    strategy: 'jwt',
    options: { verify }
  })
)
```

---

## Accessing Auth Data

Authenticated user data is available via:

```ts
const auth = c.get('auth')
```

Example structure:

```json
{
  "type": "jwt",
  "payload": {
    "sub": "user_123",
    "role": "admin"
  }
}
```

---

## Authorization

### Require Role

```ts
requireRole('admin')
```

### Require Permission
Permissions are resolved dynamically at request time.

```ts
requirePermission(
  'user:create',
  async ({ sub, role }) => {
    if (role === 'admin') return ['user:create']
    return []
  }
)
```

These middleware can be composed after authentication.

---

## Refresh Tokens

Refresh token handling is **store-driven**.

Logifex provides:
- Rotation logic
- Replay protection
- Token family management

Your application provides a store implementation.

```ts
refreshSession({
  extractToken: (c) => c.req.header('x-refresh-token'),
  store: refreshStore,
  issueAccessToken: async (sub) =>
    jwt.sign({ sub }, SECRET, { expiresIn: '15m' })
})
```

Logifex owns refresh token lifecycle and security guarantees.
Your application provides a store implementation.

## Token Helpers

Utility helpers are provided for common token operations:

```ts
signToken()
verifyToken()
decodeToken()
```

---

Logifex defines the interface and expected behavior.
Your application owns cryptography and secrets.

> Token helpers are intentionally low-level and framework-agnostic.

---

## Design Principles

* Explicit authentication strategies
* Identity-only JWTs
* Store-driven refresh sessions
* Middleware-first composition
* Predictable request context

---
npm package: @logifex/core
Description: ---
Latest version: 0.1.5


---

## **`logifex/core`**

````md
Core utilities and contracts for the Logifex ecosystem.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.

---

## Overview

`@logifex/core` provides the foundational building blocks used by all Logifex modules.

This package includes:

- Logifex application factory
- Shared error contracts
- Shared context typing
- Middleware composition utilities

You will **rarely interact with this package directly**.  
It exists to support other Logifex modules.

---

## Installation

```bash
pnpm add @logifex/core hono
````

---

## Usage

```ts
import { createLogifexApp } from '@logifex/core'

const app = createLogifexApp()

app.get('/', (c) => c.text('Hello'))

app.listen({ port: 3000 })
```

---

## Error Contract

All Logifex middleware returns errors in the following consistent format:

```json
{
  "success": false,
  "code": "FORBIDDEN",
  "message": "Reason"
}
```

This guarantees predictable error handling across all Logifex modules.

---

## Design Principles

* Explicit over implicit behavior
* No hidden global state
* Middleware-first architecture
* Strong TypeScript guarantees

---
npm package: @logifex/lifecycle
Description: ---
Latest version: 0.1.0


---

## **`logifex/lifecycle`**

````md

Execution lifecycle hooks for Logifex.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.

---

## Overview

`@logifex/lifecycle` provides a middleware wrapper that exposes
request execution boundaries.

It allows you to hook into:

- request start
- successful response
- error handling

This module is intentionally minimal and unopinionated.

---

## Installation

```bash
pnpm add @logifex/lifecycle
npm package: @logifex/rate-limit
Description: ---
Latest version: 0.1.0


---

## **`logifex/rate-limit`**


````md

Rate limiting middleware for Logifex.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.

---

## Overview

`@logifex/rate-limit` provides simple, composable rate limiting middleware
designed to integrate seamlessly with the Logifex ecosystem.

Version 1 uses an **in-memory store** with a **future-proof storage interface**.

---

## Installation

```bash
pnpm add @logifex/rate-limit
````

---

## Basic Usage

```ts
import { rateLimit } from '@logifex/rate-limit'

app.post(
  '/endpoint',
  rateLimit({
    limit: 100,
    window: '1m',
    key: (c) => c.req.ip
  }),
  handler
)
```

---

## Per-IP Rate Limiting

```ts
rateLimitPerIp({ limit: 50 })
```

Applies rate limits based on the request IP address.

---

## Per-User Rate Limiting

```ts
rateLimitPerUser({ limit: 10 })
```

Applies rate limits per authenticated user.

> Requires authentication middleware to be applied earlier in the chain.

---

## Error Response

When the rate limit is exceeded, the middleware returns:

```json
{
  "success": false,
  "code": "FORBIDDEN",
  "message": "Rate limit exceeded",
  "details": {
    "limit": 10,
    "resetAt": 1710000000000
  }
}
```

HTTP status: `429`

---

## Design Principles

* In-memory store by default
* Storage interface is replaceable
* No Redis required for v1
* Predictable, middleware-first behavior

Future versions will add Redis and KV-based adapters.

---
npm package: @logifex/trace
Description: ---
Latest version: 0.1.0


---

## **`logifex/trace`**

````md
Request tracing and correlation ID middleware for Logifex.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.

---

## Overview

`@logifex/trace` assigns a unique identifier to every incoming request.

It enables:
- request correlation across middleware
- easier debugging
- consistent tracing across responses

---

## Installation

```bash
pnpm add @logifex/trace
npm package: @logifex/validator
Description: ---
Latest version: 0.1.2


---

## **`logifex/validator`**

````md
# @logifex/validator

Zod-based request validation middleware for Logifex.

> ⚠️ **Status: Experimental**  
> This package is under active development. Breaking changes may occur before `v1.0.0`.

---

## Overview

`@logifex/validator` provides explicit, predictable request validation using Zod.

It can validate:

- Request body
- Query parameters
- Route parameters
- Headers
- Cookies

---

## Installation

```bash
pnpm add @logifex/validator zod
````

---

## Basic Usage

```ts
import { validator } from '@logifex/validator'
import { z } from 'zod'

app.post(
  '/users',
  validator({
    body: z.object({
      name: z.string(),
      email: z.string().email()
    }),
    query: z.object({
      notify: z.enum(['true', 'false']).optional()
    })
  }),
  (c) => {
    const input = c.get('input')
    return c.json(input)
  }
)
```

---

## Accessing Validated Data

Validated input is available via:

```ts
c.get('input')
```

Structure:

```ts
{
  body?: unknown
  query?: unknown
  params?: unknown
  headers?: unknown
  cookies?: unknown
}
```

---

## Validation Errors

When validation fails, the middleware returns:

```json
{
  "success": false,
  "code": "VALIDATION_ERROR",
  "errors": []
}
```

HTTP status: `400`

---

## Design Principles

* No schema inference magic
* No runtime mutation
* Explicit validation per route
* Predictable middleware behavior

---