open-index/open-npm huggingface dataset:
npm package: @flagtgl/js-sdk
Description: FlagTGL JavaScript Client SDK - feature flags for web applications
Author: FlagTGL
Latest version: 0.1.0

# FlagTGL JavaScript Client SDK

JavaScript/TypeScript client SDK for [FlagTGL](https://flagtgl.com) feature flag management. Evaluates flags remotely with real-time SSE streaming for instant updates.

## Installation

```bash
npm install @flagtgl/js-sdk
```

Or with Yarn:

```bash
yarn add @flagtgl/js-sdk
```

## Quick Start

```typescript
import { FlagsClient } from '@flagtgl/js-sdk';

const client = new FlagsClient({
  sdkKey: 'sdk-cli-your-key',
  baseURL: 'https://flagtgl.com',
  user: { key: 'user-123', attributes: { plan: 'premium' } },
});

await client.initialize();

const enabled = client.boolVariation('new-feature', false);
console.log('Feature enabled:', enabled);

// Listen for real-time changes
client.on('change', (key, newValue, oldValue) => {
  console.log(`Flag ${key} changed from ${oldValue} to ${newValue}`);
});
```

## Features

- **Remote evaluation** - flags evaluated server-side, no rules exposed to the client
- **Real-time streaming** - SSE streaming for instant flag updates
- **Event tracking** - built-in analytics with automatic batching
- **TypeScript** - full type definitions included
- **Reactive** - event-driven updates for UI frameworks

## API Reference

### Client Creation

```typescript
const client = new FlagsClient(config: FlagsConfig);
await client.initialize();
```

### Evaluation Methods

```typescript
client.boolVariation(key: string, defaultValue: boolean): boolean
client.stringVariation(key: string, defaultValue: string): string
client.numberVariation(key: string, defaultValue: number): number
client.jsonVariation<T>(key: string, defaultValue: T): T
client.allFlags(): Record<string, FlagValue>
```

### Events

```typescript
client.on('change', (key, newValue, oldValue) => { ... })
client.on('ready', () => { ... })
client.track('event-name', { custom: 'data' })
```

### User Management

```typescript
await client.identify({ key: 'new-user', attributes: { plan: 'pro' } })
```

### Configuration

```typescript
interface FlagsConfig {
  sdkKey: string;        // Client SDK key
  baseURL: string;       // FlagTGL server URL
  user: FlagUser;        // User context for evaluation
  streaming?: boolean;   // Enable SSE streaming (default: true)
  flushInterval?: number; // Event flush interval in ms (default: 30000)
  flushSize?: number;    // Buffer size before auto-flush (default: 100)
}
```

## Documentation

Full documentation available at [flagtgl.com/docs](https://flagtgl.com/docs).

## License

MIT
npm package: @flair-js/core
Description: React component library for building beautiful marketing websites with animated backgrounds and heading effects.
Author: seanmccart
Latest version: 1.1.0

# FlairJS

React component library for building beautiful marketing websites with animated backgrounds and heading effects.

**16 section components** · **43 background effects** · **11 heading effects** · **19 SVG patterns**

[Documentation](https://flairjs.dev/docs) · [Backgrounds](https://flairjs.dev/backgrounds)

## Install

```bash
npm install @flair-js/core
```

Requires React 19+ and Tailwind CSS 4+.

## Quick Start

```tsx
import '@flair-js/core/index.css';
import SuperHero from '@flair-js/core/sections/SuperHero';

export default function Page() {
  return (
    <SuperHero
      darkMode={true}
      heading={{ text: 'Build Something Beautiful', effect: 'split', size: '3xl' }}
      text="Ship your landing page in hours, not weeks."
      background={{
        effect: 'aurora',
        effectColors: ['#8B5CF6', '#06B6D4', '#10B981'],
        colors: ['#020617', '#0c0a1d'],
        borderRadius: '0px',
      }}
      buttons={[
        { label: 'Get Started', type: 'glass' },
        { label: 'Learn More', type: 'outline' },
      ]}
    />
  );
}
```

## Section Components

Build pages by composing these full-width marketing sections:

| Component | Description |
|-----------|-------------|
| `SuperHero` | Hero section with heading effects, buttons, stats, logos |
| `TextFeature` | Centered text with heading, body, and CTA buttons |
| `ColumnsFeature` | Multi-column grid with cards |
| `IconsFeature` | Icon card grid for highlighting features |
| `ImageFeature` | Image showcase with 10 animation types |
| `VideoFeature` | Embedded video with autoplay and poster |
| `StatsFeature` | Animated number counters |
| `ReviewsFeature` | Customer testimonials with star ratings |
| `ChecklistFeature` | Checkmark feature lists |
| `ChartFeature` | Animated line and bar charts |
| `UIShowcaseFeature` | Pre-built interactive UI demos |
| `MapsFeature` | Interactive map visualizations |
| `PricingFeature` | Pricing plan cards |
| `FormFeature` | Contact forms with glass inputs |
| `CompareFeature` | Side-by-side comparison |
| `CustomEmbed` | Sandboxed iframe for third-party widgets |

## Background Effects

43 animated effects available via the `background.effect` prop:

`aurora` · `liquid-ether` · `silk` · `constellation` · `mesh-gradient` · `beams` · `plasma` · `waves` · `bokeh` · `fireflies` · `dot-grid` · and [30+ more](https://flairjs.dev/backgrounds)

## AI Agent Integration

FlairJS is optimized for AI coding assistants via the Model Context Protocol:

```json
{
  "mcpServers": {
    "flair": {
      "url": "https://flairjs.dev/api/mcp"
    }
  }
}
```

Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible tool. [Setup guide](https://flairjs.dev/docs/guide/mcp)

## Starter Templates

3 ready-to-use page templates included in `@flair-js/core/templates/`:

- `homepage.tsx` — General landing page
- `saas-landing.tsx` — SaaS product page with pricing
- `portfolio.tsx` — Portfolio/agency page with contact form

## License

MIT
npm package: @flair-sdk/contracts
Description: A monorepo containing all evm-based smart contracts and extensions used in Flair platform.
Author: flair.dev
Latest version: 2.27.0

# Flair EVM Smart Contracts

A monorepo containing all evm-based smart contracts and extensions used in Flair platform.

## Dashboard

You can deploy these contracts right from browser, using your own wallet or multisig via [Flair](https://app.flair.dev).
npm package: @flair-sdk/registry
Description: A registry of versioned Flair contract ABIs and byteCodes ready for use, with ability to have backward-compatibility.
Author: flair.dev
Latest version: 2.82.3

# `@flair-sdk/registry`

A registry of versioned Flair contract ABIs and byteCodes ready for use, with ability to have backward-compatibility.

## Getting Started

### Installation

1. Install the package:

   ```sh
   npm install @flair-sdk/registry
   ```
npm package: @flair-sdk/solution-basic-events-txs
Description: Bundled solution to add basic event and transaction indexing
Author: gm@flair.build
Latest version: 0.2.0

# Basic Event/TX Indexing

[![Flair](https://img.shields.io/badge/Powered%20by-Flair-ff69b4)](https://flair.dev)

This package provides customizable ready-made processor scripts for basic event and transaction indexing; using [Flair indexer](https://docs.flair.dev).

## Installation

1. Make sure you have created your indexing cluster as described in [Getting Started](https://docs.flair.dev/#getting-started).

2. Install the solution package:
```bash
pnpm install @flair-sdk/solution-basic-events-txs
```

3. Add the solution to your [manifest.yml.mustache](https://github.com/flair-sdk/starter-boilerplate/blob/main/manifest.yml.mustache) usually created from starter-boilerplate repository:
```yml
# ./manifest.yml.mustache

# ...

# Usually each indexing cluster has defined one or more filter groups.
# For this solution you need a filter group that contains addresses of contracts you want to 
# track
# Note: if you have a factory contract, or need to dynamically add addresses it is possible,
# refer to examples repository (https://github.com/flair-sdk/examples).
filterGroups:
  - id: default
    updateStrategy: replace
    addresses:
      - fromFile: ./contracts.csv

# ...

solutions:
  - source: '@flair-sdk/basic-events-txs'
    config:
      events:
        enabled: true
      transactions:
        enabled: false
```

4. Deploy your cluster:
```sh
pnpm generate-and-deploy
```
npm package: @flair-sdk/solution-database-mongodb
Description: Bundled solution to add MongoDB database sync to a Flair indexing cluster
Author: gm@flair.build
Latest version: 0.3.2

# MongoDB Database Integration

[![Flair](https://img.shields.io/badge/Powered%20by-Flair-ff69b4)](https://flair.dev)

This package provides components required to sync indexed data to a MongoDB instance in [Flair indexer](https://docs.flair.dev).

## Installation

1. Make sure you have created your indexing cluster as described in [Getting Started](https://docs.flair.dev/#getting-started).

2. Install the MongoDB solution package:
```bash
pnpm install @flair-sdk/solution-database-mongodb
```

3. Define your schemas based on your entities. For example, if you have a `Swap` entity, you can define a schema as follows:
```yaml
# ./src/schemas/Swap.yml
---
Swap:
  entityId: STRING
  entityUpdatedAt: INT64
  chainId: INT64
  poolAddress: STRING
  from: STRING
  to: STRING
  amount: INT256
  amountUSD: DOUBLE
  someObjectOrArray: STRING # all json stringified objects or arrays will be automatically stored as acttual nested documents/arrays in mongo
```

3. Add the MongoDB solution to your [manifest.yml.mustache](https://github.com/flair-sdk/starter-boilerplate/blob/main/manifest.yml.mustache) usually created from starter-boilerplate repository:
```yml
# ./manifest.yml.mustache
# ...
solutions:
  - source: '@flair-sdk/solution-database-mongodb'
    config:
      schema:
        - src/schemas/*.yml
      connectionUri: '{{{ mongoUri }}}'
      databaseName: flair
```
> The "mongoUri" here is a variable that is replaced by mustache locally. Refer to boilerplate repo for more details.

4. Add `mongoUri` to your [config.json](https://github.com/flair-sdk/starter-boilerplate/blob/main/config.prod.json) usually created from starter-boilerplate repository:
```js
// ./config.prod.json
{
  "cluster": "prod",
  "namespace": "my-project",
  // ...
  "mongoUri": "{{ secret(\"mongodb.uri\") }}"
}
```
> The "mongodb.uri" is an actual secret value set using [flair secret](https://docs.flair.dev/reference/database/mongodb) command, so that it is not exposed in the repository.

5. Deploy your cluster and check the status of real-time live syncing.
```sh
pnpm generate-and-deploy
pnpm flair logs -w -t component=enricher
```

6. (OPTIONAL) If there are any historical previously indexed data, you can sync them using:
```sh
pnpm flair script database-manual-full-sync
```
npm package: @flair-sdk/solution-database-postgresql
Description: Bundled solution to add PostgreSQL database sync to a Flair indexing cluster
Author: gm@flair.build
Latest version: 0.3.10

# PostgreSQL Database Integration

[![Flair](https://img.shields.io/badge/Powered%20by-Flair-ff69b4)](https://flair.dev)

This package provides components required to sync indexed data to a PostgreSQL instance in [Flair indexer](https://docs.flair.dev).

## Installation

1. Make sure you have created your indexing cluster as described in [Getting Started](https://docs.flair.dev/#getting-started).

2. Install the PostgreSQL solution package:
```bash
pnpm install @flair-sdk/solution-database-postgresql
```

3. Define your schemas based on your entities. For example, if you have a `Swap` entity, you can define a schema as follows:
```yaml
# ./src/schemas/Swap.yml
---
Swap:
  entityId: STRING
  entityUpdatedAt: INT64
  chainId: INT64
  poolAddress: STRING
  from: STRING
  to: STRING
  amount: INT256
  amountUSD: DOUBLE
  someObjectOrArray: STRING
```

3. Add the PostgreSQL solution to your [manifest.yml.mustache](https://github.com/flair-sdk/starter-boilerplate/blob/main/manifest.yml.mustache) usually created from starter-boilerplate repository:
```yml
# ./manifest.yml.mustache
# ...
solutions:
  - source: '@flair-sdk/solution-database-postgresql'
    config:
      schema:
        - src/schemas/*.yml
      connectionUri: 'jdbc:postgresql://PUT_DB_HOST_HERE/PUT_DB_NAME_HERE'
      username: 'PUT_DB_USERNAME_HERE'
      password: '{{{ postgresqlPassword }}}'
      tableNamePrefix: entity_
```
> The "postgresqlPassword" here is a variable that is replaced by mustache locally. Refer to [boilerplate](https://github.com/flair-sdk/starter-boilerplate) repo for more details.

4. Add `postgresqlPassword` to your [config.json](https://github.com/flair-sdk/starter-boilerplate/blob/main/config.prod.json) usually created from starter-boilerplate repository:
```js
// ./config.prod.json
{
  "cluster": "prod",
  "namespace": "my-project",
  // ...
  "postgresqlPassword": "{{ secret(\"postgresql.password\") }}"
}
```
> The "postgresql.password" is an actual secret value set using [flair secret](https://docs.flair.dev/reference/database/jdbc-mysql-postgres) command, so that it is not exposed in the repository.

5. Deploy your cluster and check the status of real-time live syncing.
```sh
pnpm generate-and-deploy
pnpm flair logs -w -t component=enricher
```

6. (OPTIONAL) If there are any historical previously indexed data, you can sync them using:
```sh
pnpm flair script database-manual-full-sync
```
npm package: @flair-sdk/solution-indexing-defi-lending
Description: Customizable ready-made on-chain EVM data indexing for defin lending protocols
Author: gm@flair.build
Latest version: 0.0.42

# DeFi Lending Indexing

[![Flair](https://img.shields.io/badge/Powered%20by-Flair-ff69b4)](https://flair.dev)

This package provides customizable ready-made processor scripts for defi lending protocols using [Flair indexer](https://docs.flair.dev).

## Installation

1. Make sure you have created your indexing cluster as described in [Getting Started](https://docs.flair.dev/#getting-started).

2. Install the solution package:

```bash
pnpm install @flair-sdk/solution-indexing-nft
```

3. Add the solution to your [manifest.yml.mustache](https://github.com/flair-sdk/starter-boilerplate/blob/main/manifest.yml.mustache) usually created from starter-boilerplate repository:

```yml
# ./manifest.yml.mustache

# ...

# Usually each indexing cluster has defined one or more filter groups.
# For this solution you need a filter group that contains addresses of ERC721 contracts.
# Also, this solution will add relevant event "topics" for ERC721 Transfer and Approval events
# so that they are emitted for processing.
#
# Note: if you have a factory contract, or need to dynamically add addresses it is possible,
# refer to examples repository (https://github.com/flair-sdk/examples).
filterGroups:
  - id: default
    updateStrategy: replace
    addresses:
      - fromFile: ./contracts.csv

# ...
solutions:
  - source: "@flair-sdk/solution-indexing-defi-lending"
    config:
      aave:
        intervalEnricher:
          enabled: true
          interval: rate(60 minutes)
```

4. Deploy your cluster:

```sh
pnpm generate-and-deploy
```
npm package: @flair-sdk/solution-indexing-nft
Description: Customizable ready-made on-chain EVM data indexing for ERC721 and ERC1155 NFT tokens and metadata
Author: gm@flair.build
Latest version: 0.0.37

# NFTs Indexing Solution (ERC-721, ERC-1155)

[![Flair](https://img.shields.io/badge/Powered%20by-Flair-ff69b4)](https://flair.dev)

This package provides customizable ready-made processor scripts for ERC721 or ERC1155 NFT tokens, collections and metadata fetching using [Flair indexer](https://docs.flair.dev).

## Installation

1. Make sure you have created your indexing cluster as described in [Getting Started](https://docs.flair.dev/#getting-started).

2. Install the solution package:
```bash
pnpm install @flair-sdk/solution-indexing-nft
```

3. Add the solution to your [manifest.yml.mustache](https://github.com/flair-sdk/starter-boilerplate/blob/main/manifest.yml.mustache) usually created from starter-boilerplate repository:
```yml
# ./manifest.yml.mustache

# ...

# Usually each indexing cluster has defined one or more filter groups.
# For this solution you need a filter group that contains addresses of ERC721 contracts.
# Also, this solution will add relevant event "topics" for ERC721 Transfer and Approval events
# so that they are emitted for processing.
#
# Note: if you have a factory contract, or need to dynamically add addresses it is possible,
# refer to examples repository (https://github.com/flair-sdk/examples).
filterGroups:
  - id: default
    updateStrategy: replace
    addresses:
      - fromFile: ./contracts.csv

# ...

solutions:
  - source: '@flair-sdk/solution-indexing-nft'
    config:
      erc721:
        enabled: true
      erc1155:
        enabled: false
      addTopicsToFilterGroup: default
      env:
        MY_ENV_VAR: my-value
      metadata:
        resolveUri: true
        fetchContent: true
        ipfsGateways:
        - endpoint: https://ipfs.io/ipfs/
          headers:
            x-api-key: my-api-key
        arweaveGateways:
        - endpoint: https://arweave.net/
          headers:
            x-api-key: my-api-key

```

4. Deploy your cluster:
```sh
pnpm generate-and-deploy
```
npm package: @flairjs/core
Description: Core module for flairjs
Latest version: 0.1.0

# @flairjs/core

The core transformation engine for Flair, built with Rust for maximum performance.

## Overview

This package contains the core logic for transforming JSX files with Flair styles. It uses:

- **OXC** for fast AST parsing and manipulation
- **Lightning CSS** for CSS parsing, transformation, and optimization
- **NAPI-RS** for Node.js bindings

## Installation

```bash
npm install @flairjs/core
```

You normally won't have to install this manually, it will be included with the bundler package.

## API

### `transformCode(code, filePath, options, cssPreprocessor?)`

Transforms JSX/TSX code containing Flair styles.

**Parameters:**
- `code: string` - The source code to transform
- `filePath: string` - Path to the file being transformed
- `options: TransformOptions` - Transformation options
- `cssPreprocessor?: (css: string) => string` - Optional CSS preprocessor function

**Returns:** `TransformOutput | null`

### TransformOptions

```typescript
interface TransformOptions {
  cssOutDir: string                 // Output directory for generated CSS
  classNameList?: Array<string>     // List of class names to process
  useTheme?: boolean               // Enable theme processing
  theme?: Theme                    // Theme configuration
  appendTimestampToCssFile?: boolean // Add timestamp to CSS filename
}
```

### TransformOutput

```typescript
interface TransformOutput {
  code: string              // Transformed JavaScript/TypeScript code
  sourcemap?: string       // Source map (if generated)
  css: string             // Extracted CSS
  logs: Array<LogEntry>   // Build logs and warnings
  generatedCssName?: string // Name of generated CSS file
}
```

### Theme Interface

```typescript
interface Theme {
  breakpoints: Record<string, string>
  prefix?: string
}
```

## Platform Support

This package includes native binaries for:

- Windows (x64, x86, ARM64)
- macOS (x64, ARM64)
- Linux (x64, ARM64, ARMv7, musl variants)
- FreeBSD (x64)
- Android (ARM64, ARMv7)
- WebAssembly (WASI)


## Development

### Building from Source

```bash
# Install Rust and Node.js dependencies
pnpm install

# Build the native module in debug mode
pnpm run build:debug
# Or prod build
pnpm run build

# Run tests
pnpm test
```

### Architecture

The core is structured as follows:

- `src/lib.rs` - Main entry point and NAPI bindings
- `src/transform.rs` - Core transformation logic
- `src/parse_css.rs` - CSS parsing and processing
- `src/style_tag.rs` - `<Style>` tag handling
- `src/flair_property.rs` - `.flair` property processing
- `src/update_attribute.rs` - Class name injection

## License

MIT