open-index/open-npm huggingface dataset:
npm package: @optahaul/logger
Description: optahaul node logger
Author: OptaHaul
Latest version: 0.0.2

# OptaHaul Node Logger

- Set `NODE_ENV` env variable to `local` to get `simple` logging, otherwise it will be `json`.
- Set log level by defining `LOG_LEVEL` env variable or calling `Logger.setLogLevel('info')`. Default log level is `info`.
- Get current log levels by calling `Logger.isDebugEnabled()` etc.

#### Basic usage
```
import { Logger } from '@optahaul/logger';

export class ExampleService {
  private static logger = new Logger(ExampleService.name);
  
  exampleFunction() {
    ExampleService.logger.info('hi');
  }
}
```

#### Typeorm support
```
import { TypeormLogger } from '@optahaul/logger';

const connection = await createConnection({
  ...options,
  logger: new TypeormLogger(),
});
```

#### Publish package
```
npm login
npm ci
npm run build
npm publish
```
npm package: @optare/management
Description: Node.js Management SDK for Optare ID - Server-side user, organization, and license management
Author: Optare Team
Latest version: 0.1.2

# Management SDK

Server-side SDK for Optare ID administration. See [documentation](https://docs.optare.one/sdk/backend) for full API reference.

## Installation

```bash
npm install @optare/management
```

## Quick Start

```typescript
import { ManagementClient } from '@optare/management';

const client = new ManagementClient({
  apiKey: process.env.OPTARE_API_KEY!,
});

// List users
const users = await client.users.list();

// Create a subscription
await client.subscriptions.create({
  organizationId: 'org-123',
  productId: 'product-456',
  totalSeats: 10,
});
```

## Available Namespaces

- `users` - User management
- `organizations` - Organization management  
- `products` - Product catalog
- `subscriptions` - Subscription management
- `oauthClients` - OAuth client management
- `apiKeys` - API key management
- `webhooks` - Webhook management
- `billing` - Billing provider integration

## Billing Integration

```typescript
// Connect Stripe
await client.billing.connect({
  provider: 'stripe',
  secretKey: process.env.STRIPE_SECRET_KEY!,
  webhookSecret: process.env.STRIPE_WEBHOOK_SECRET,
});

// List synced products
const products = await client.billing.listProducts();

// Create customer portal session
const { url } = await client.billing.portal.createSession('https://myapp.com/settings');
```
npm package: @optare/mcp-server
Description: Model Context Protocol server for Optare
Author: Optare Team
Latest version: 1.0.7

# Optare MCP Server

Model Context Protocol server exposing Optare SDK to AI agents like Claude Desktop.

## Installation

```bash
npm install -g @optare/mcp-server
# or
npx @optare/mcp-server
```

## Quick Setup for Claude Desktop

1. **Get your API key** from [id.optare.one/portal/settings](https://id.optare.one/portal/settings)

2. **Add to Claude Desktop config** (`~/Library/Application Support/Claude/claude_desktop_config.json` on Mac):

```json
{
  "mcpServers": {
    "optare": {
      "command": "npx",
      "args": ["-y", "@optare/mcp-server"],
      "env": {
        "OPTARE_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

3. **Restart Claude Desktop**

## Available Tools

### `optare_check_license`
Check if current user has access to a feature.

**Input:**
- `feature` (string) - Feature key to check

**Output:** Boolean access status

**Example:**
```
Check if I have access to "ai-reports"
```

### `optare_list_products`
List all available products.

**Output:** List of products with names and slugs

### `optare_bootstrap_app`
One-shot setup for new applications. Creates:
- OAuth Client
- API Key
- Default Product
- Webhook (optional)

**Input:**
- `appName` (string) - Application name
- `redirectUri` (string) - OAuth callback URL
- `webhookUrl` (optional string) - Webhook endpoint

**Output:** Complete `.env` configuration

**Example:**
```
Bootstrap a new app called "My SaaS App" with callback http://localhost:3000/api/auth/callback
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `OPTARE_API_KEY` | Yes | Your API key from the dashboard |
| `OPTARE_API_URL` | No | Custom API URL (defaults to `https://id.optare.one`) |

## Security

**This server is designed with strict security boundaries:**

- ❌ **No file system access** - Cannot read/write files
- ✅ **Read-only license checks** - Safe entitlement verification  
- ✅ **Scoped API access** - Only exposed safe operations
- ❌ **No destructive actions** - Cannot delete data

## SSE Mode (Web/Agentic IDEs)

Start in Server-Sent Events mode for web-based AI tools:

```bash
OPTARE_API_KEY=your-key npx @optare/mcp-server sse
```

Then connect your agent to: `http://localhost:3000/sse`

## Troubleshooting

### "API Key not set"

Set the `OPTARE_API_KEY` environment variable in your MCP config.

### "License check API not implemented"

The backend licensing API endpoints are not yet available. This is expected.

## Documentation

- [MCP Protocol Docs](https://modelcontextprotocol.io)
- [Optare Documentation](https://docs.optare.one)

## License

MIT
npm package: @optare/optareid-js
Description: Universal Client SDK for Optare ID
Author: Optare Team
Latest version: 0.2.2

# @optare/optareid-js

Universal JavaScript/TypeScript SDK for [Optare ID](https://id.optare.one) - Works in browser, Node.js, and edge runtimes.

## Installation

```bash
npm install @optare/optareid-js
# or
yarn add @optare/optareid-js
# or
pnpm add @optare/optareid-js
```

## Quick Start

### Browser / Client-Side

```typescript
import { OptareClient } from '@optare/optareid-js';

const client = new OptareClient({
  baseUrl: 'https://id.optare.one',
  clientId: 'your_client_id',
  token: 'user_access_token', // From OAuth flow
});

// Get current user
const user = await client.auth.getMe();
console.log(user.email);
```

### Node.js / Server-Side

```typescript
import { OptareClient } from '@optare/optareid-js';

const client = new OptareClient({
  baseUrl: 'https://id.optare.one',
  clientId: process.env.OPTARE_CLIENT_ID!,
  clientSecret: process.env.OPTARE_CLIENT_SECRET!,
  token: process.env.OPTARE_API_KEY!,
});

// Create a product
const product = await client.products.create({
  name: 'Pro Plan',
  slug: 'pro',
  features: ['sso', 'advanced-analytics'],
});
```

## API Reference

Full API documentation with all namespaces, methods, types, and examples available at [docs.optare.one](https://docs.optare.one/api).

### Client Namespaces

- `client.auth` - Authentication methods
- `client.license` - Feature entitlement checking
- `client.products` - Product management
- `client.org` - Organization management
- `client.admin` - Admin operations (subscriptions, OAuth apps)
- `client.webhooks` - Webhook signature verification

See full documentation for detailed usage of each namespace.

## TypeScript Support

Full TypeScript definitions included with autocomplete support.

## Runtime Support

- ✅ Browser (Chrome, Firefox, Safari, Edge)
- ✅ Node.js 18+
- ✅ Deno
- ✅ Bun
- ✅ Edge Runtimes (Cloudflare Workers, Vercel Edge)

## Documentation

- [Full Documentation](https://docs.optare.one)
- [API Reference](https://docs.optare.one/api)
- [Quick Start](https://docs.optare.one/quick-start)

## License

MIT
npm package: @optare/optareid-nextjs
Description: Next.js SDK for Optare ID - Server components, route handlers, and middleware
Author: Optare Team
Latest version: 0.1.0

# Optare ID Next.js SDK

Official Next.js SDK for [Optare ID](https://id.optare.one) with support for App Router, Server Components, and Edge Runtime.

## Installation

```bash
npm install @optare/optareid-nextjs
```

## Quick Start

### 1. Create Route Handler

```typescript
// app/api/auth/[...optare]/route.ts
import { createHandlers } from '@optare/optareid-nextjs';

export const { GET, POST } = createHandlers({
  clientId: process.env.OPTARE_CLIENT_ID!,
  clientSecret: process.env.OPTARE_CLIENT_SECRET!,
  secret: process.env.AUTH_SECRET!,
});
```

### 2. Add Middleware (Optional)

```typescript
// middleware.ts
import { createMiddleware } from '@optare/optareid-nextjs/middleware';

export default createMiddleware({
  secret: process.env.AUTH_SECRET!,
  protectedRoutes: ['/dashboard/*', '/settings/*'],
});

export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};
```

### 3. Add Provider

```typescript
// app/layout.tsx
import { OptareProvider } from '@optare/optareid-nextjs';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <OptareProvider>{children}</OptareProvider>
      </body>
    </html>
  );
}
```

### 4. Use in Server Components

```typescript
// app/dashboard/page.tsx
import { getSession } from '@optare/optareid-nextjs/server';
import { redirect } from 'next/navigation';

export default async function Dashboard() {
  const session = await getSession();
  
  if (!session?.user) {
    redirect('/api/auth/signin');
  }
  
  return <h1>Welcome, {session.user.name}</h1>;
}
```

### 5. Use in Client Components

```typescript
'use client';
import { useOptare, SignInButton, SignOutButton } from '@optare/optareid-nextjs';

export function UserNav() {
  const { user, isLoading } = useOptare();
  
  if (isLoading) return <div>Loading...</div>;
  
  if (!user) return <SignInButton>Sign In</SignInButton>;
  
  return (
    <div>
      <span>{user.name}</span>
      <SignOutButton />
    </div>
  );
}
```

## Environment Variables

```bash
OPTARE_CLIENT_ID=your-client-id
OPTARE_CLIENT_SECRET=your-client-secret
AUTH_SECRET=random-32-char-secret
```

## License

MIT