open-index/open-npm huggingface dataset:
npm package: @riavzon/json-to-ts
Description: Convert json object to typescript interfaces
Author: Sergio contact@riavzon.com
Latest version: 1.1.0

# Json to TS

## Convert JSON objects into clean, optimized TypeScript interfaces.

>NOTE
>
>This is a fork of [MariusAlch/json-to-ts](https://github.com/MariusAlch/json-to-ts) redesigned with a stateful pipeline architecture, new features, and **zero runtime dependencies**.


---

## Features

  - Literal Type Discovery: Automatically generate string, number, or boolean literals.
  - Merging: Deeply nested arrays of objects are merged into single, optimized interfaces with optional properties.
  - Zero Dependencies.
  - Tree shakable and minified.
  - Ships with both ESM and CJS support out of the box.
  - Fully typed.


## Installation

```bash
npm install @riavzon/json-to-ts
```

---

## Usage

```typescript
import JsonToTS from '@riavzon/json-to-ts';
// or
const JsonToTS = require('@riavzon/json-to-ts');

const json = {
  id: 1,
  name: "John Doe",
  roles: ["admin", "editor"]
};

const interfaces = JsonToTS(json);
interfaces.forEach(i => console.log(i));

```
Output:

```ts
interface Main {
  id: number;
  name: string;
  roles: string[];
}
```

### Literal Types
You can lock down specific fields to their literal values:

```typescript
import JsonToTS from '@riavzon/json-to-ts';


const options = {
  rootName: "ApiResponse",
  useLiteralTypes: ["status", "version"]
};

const json = {
  version: "v1.2",
  status: "success",
  data: {
        id: 1,
        name: "John Doe",
        roles: ["admin", "editor"]
   }
};

const interfaces = JsonToTS(json, options);
interfaces.forEach(i => console.log(i));

```
Output:
```ts
interface ApiResponse {
  version: "v1.2";
  status: "success";
  data: Data;
}
interface Data {
  id: number;
  name: string;
  roles: string[];
}
```

---

## Configuration Options

  | Option | Type | Default | Description |
  | --- | --- | --- | --- |
  | `rootName` | `string` | `"Main"` | The name of the root interface. |
  | `useLiteralTypes` | `boolean \| string[]` | `false` | Enable global or selective literal type generation. |
  | `useTypeAlias` | `boolean` | `false` | Use `type` instead of `interface`. |
  | `singularize` | `(name: string) => string` | `Internal` | Custom strategy for naming array elements. |

---
MIT License
npm package: @riavzon/utils
Description: Collection of generic/advanced TypeScript utilities and ESLint configs
Author: Sergio contact@riavzon.com
Latest version: 1.1.1

# Shared Utilities

A collection of generic TypeScript utilities and types.

## Structure

- **`generic/`**: Core utility functions for data manipulation, sanitization, and validation.
- **`eslint/`**: Reusable ESLint configurations for Vue/Next.js and TypeScript.
- **`types/`**: Shared TypeScript interfaces and unified API response formats.
- **`server/`**: Server utilities.

## Usage

### ESLint Configuration

The library exports strict, pre configured ESLint setups for both pure TypeScript, Vue projects and React projects.

**For Pure TypeScript Projects:**
```javascript
// eslint.config.mjs
import { defineStrictTSConfig } from '@riavzon/utils/eslint/strict';

export default defineStrictTSConfig({
  rootDir: import.meta.dirname,
  extraIgnores: ['coverage/**']
});
```

**For Vue + TypeScript Projects:**
```javascript
// eslint.config.mjs
import { defineStrictVueConfig } from '@riavzon/utils/eslint/strict/vue';

export default defineStrictVueConfig({
  rootDir: import.meta.dirname,
  overrides: [
    {
      rules: {
        'vue/multi-word-component-names': 'off'
      }
    }
  ]
});
```

### General Utilities

```ts
import { ensureArray, miniCache, BatchQueue } from '@riavzon/utils';

const list = ensureArray(someValue);
```
### Server only
```ts
import { uploadCsv, run } from '@riavzon/utils/server';

await run('some shell command')
const up = await uploadCsv(csvPath, 'table_name', pool as PgPool, 'pg');
const up = await uploadCsv(csvPath, 'table_name', pool as Pool, 'mysql');
```
Check directly the source code to see available utils, docs available via [ts-docs](https://tsdoc.org/), and a dedicated site is coming soon.
Supports esm and cjs.

---
MIT License
npm package: @ribajs/cli
Description: CLI tool for Riba applications 🍹
Author: Pascal Garber
Latest version: 1.9.0-beta.2

# Riba CLI

CLI tool to generate Riba projects and architecture elements.

## Description

In order to help people manage their projects, the CLI tool has been created. It helps on many grounds at once, from scaffolding the project to build well-structured applications. The Riba CLI is forked from [Nest CLI](https://github.com/nestjs/nest-cli) and  heavily based the [@angular-devkit](https://github.com/angular/devkit) package. Also, there're special schematics that are dedicated to the Riba development [@ribajs/schematics](https://github.com/ribajs/riba/tree/master/packages/schematics).

## Installation

```bash
npm install @ribajs/cli
```

## Development

### Debugging

We are using the [debug module](https://github.com/visionmedia/debug) for the debugging output.

To see the debugging output set the `DEBUG` environment variable:

```bash
DEBUG=* riba g component my-new-web-component
```

In order to debug the cli, you need to run with node in debugging mode:

```bash
node --inspect-brk $(which riba) g component my-new-web-component
```

### Schematics

If you work on the schematics you can use your local package by running:

```bash
npm link @ribajs/schematics
```

## Support / Donations

If you want to support Riba development, please consider donating (it helps me keeping my projects active and alive!):

[![https://www.paypal.me/artandcode](https://img.shields.io/badge/Donate-PayPal-red)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TUEJGDUHVBUX4&source=url)
[![https://www.paypal.me/artandcode](https://img.shields.io/badge/Donate-Patreon-red)](https://www.patreon.com/artandcodestudio)

## License

[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B12684%2Fgithub.com%2Fribajs%2Friba.svg?type=large)](https://app.fossa.com/projects/custom%2B12684%2Fgithub.com%2Fribajs%2Friba?ref=badge_large)
npm package: @ribajs/schematics
Description: Riba schematics for the cli
Latest version: 1.9.0-beta.2

# Riba schematics

Source code templates for Riba architecture element generation based on Angular schematics

## Development

### Debugging

In order to debug your schematics, you need to run with node in debugging mode:

```bash
node --inspect-brk $(which schematics) .:component --name=my-new-web-component --no-dry-run --spec --templateEngine="html" --language="ts" --sourceRoot="src"
```

Another advantage of running in debug mode is that the `schematics` command line tool puts a break point directly before running your own schematic.
npm package: @ribarich/duplicator-script
Description: Script that runs Duplicator Pro through Puppeteer to clone a website into LocalWP.
Author: Bruno Ribaric
Latest version: 0.2.3

# Duplicator script

Script that runs Duplicator Pro through Puppeteer to clone a website into LocalWP.

## Usage instructions

Requirements

- Node.js and npm installed on your machine
- Upstream website with Duplicator Pro installed and activated. All security needs to be disabled.
- LocalWP running locally (where you want the site to be cloned)

Install the duplicator script

```bash
npm i -g @ribarich/duplicator-script
```

Run the script with all the required parameters. You can also pass a --db-only parameter to only clone the database. (Make sure to wrap the password in quotes as it can contain special charachters that invoke undesired terminal behaviour).

Make sure not to include a trailing `/` at the end of upstream URL and downstream URL.

```bash
npx @ribarich/duplicator-script clone https://example.com --downstream-url http://example.local --local-site-name example --username admin_username --password 'admin_pass'
```

Then wait for the script to complete. How long it takes depends on the size of the website.

It is highly recommended that you also pass in the --debug flag. This will make the browser window appear that the script is actually using. In that case, you can help it out manually if it gets stuck.

### Options

- `--db-only` Clone only the database.
- `--reuse-package` Reuse last package instead of building a new one.

It is recommended that in the Duplicator Pro you add file filters for the files you're working on so that they do not get overriden. For example, if you're working on a theme and you have it stored in a GitHub directory, you wouldn't want the Duplicator process to override your local files. These settings can be configured in Duplicator Pro before running this script.

## Debugging

Pass the --debug flag to the script. This will display the browser so you can see what the script is doing and where it is having an issue.
npm package: @ribarich/web-utils
Description: Various web utilities.
Latest version: 1.0.2

# Ribarich web utils

## FlexObserver

Flex observer allows you to detect when some flex elements wrap.

```js
import { FlexObserver } from '@ribarich/web-utils'
const observer = new FlexObserver()
const config = {
	flexContainer: document.querySelector('.flex-container')
	changeCallback: ( wrappedElements ) => { // Do something with elements that wrapped }
}
observer.observe(config)
```
npm package: @ribban/unsend-nodemailer
Description: Transport for Nodemailer to send mails using the Unsend API.
Author: RIBBAN
Latest version: 2.0.4

# Unsend Nodemailer

> NPM package allowing you to send emails easily with the Unsend API. 

### How to get started

#### 1. Install the package

```bash
npm install @ribban/unsend-nodemailer
```

### Usage

#### Create Nodemailer Transport

```typescript
import { UnsendTransport } from '@ribban/unsend-nodemailer';
import { createTransport } from 'nodemailer';

const mailer = createTransport(
  UnsendTransport.makeTransport({
    apiKey: YOUR_UNSEND_API_KEY
  })
);
```

#### Custom API Endpoint (Optional)
If you need to use a custom Unsend API endpoint (e.g., self-hosted instance):

```typescript
const mailer = createTransport(
  UnsendTransport.makeTransport({
    apiKey: YOUR_UNSEND_API_KEY,
    apiUrl: 'https://your-custom-endpoint.com'  // Default is 'https://api.unsend.dev'
  })
);
```

#### Send an Email

```typescript
mailer.sendMail({
  from: 'hej@ribban.co',
  to: 'hej@sajn.se',
  subject: 'This is a example email!',
  html: '<h1>Enter your HTML content here!</h1>',
});
```

#### Specifying Sender Name

You can include a display name with the email address:

```typescript
mailer.sendMail({
  from: 'RIBBAN <hej@ribban.co>',
  to: 'Recipient Name <hej@sajn.se>',
  subject: 'Email with sender name',
  html: '<p>This email has a display name!</p>',
});
```
npm package: @ribbon-finance/grappa-contracts
Description: option protocol built with forge template
Author: antoncoding
Latest version: 1.2.0

<div align="center">
  <h1 > Grappa Core</h1>
  
  <img height=60 src="https://i.imgur.com/vSIO8xJ.png"/>
  <br/>
  <br/>
  <a href="https://github.com/foundry-rs/foundry"><img src="https://img.shields.io/static/v1?label=foundry-rs&message=foundry&color=blue&logo=github"/></a>
  <a href=https://github.com/antoncoding/grappa/actions/workflows/Slither.yml""><img src="https://github.com/antoncoding/grappa/actions/workflows/Slither.yml/badge.svg?branch=master" > </a>
  <a href=https://github.com/grappafinance/core-cash/actions/workflows/CI.yml""><img src="https://github.com/grappafinance/core-cash/actions/workflows/CI.yml/badge.svg?branch=master"> </a>

  <!-- reopen coverage badge again after foundry official launch coverage -->
  <a href="https://codecov.io/gh/grappafinance/core" >
<img src="https://codecov.io/gh/grappafinance/core-cash/branch/master/graph/badge.svg?token=G52EOD1X5B"/>
</a>
  <h5 align="center"> Don't waste your capital.</h5>
  
</div>


## Introduction

This is the repository of the core component of Grappa, which is a decentralized settlement layer for options and spreads.

In our design, a option (derivative) token can be created by different **margin engine**. Users with different risk tolerance can choose among different engines based on gas cost, capital efficiency and risk of liquidation.

We also natively support call spread and put spread that can increase capital efficiency by a lot while being fully collateralized.


## Documentation

For detailed documentation about how the system architecture is designed, please visit [docs](./docs/)

## Get Started

```shell
forge build
forge test
```

For auto linting and running gas snapshot, you will also need to setup npm environment, and install husky hooks

```shell
# install yarn dependencies
yarn
# install hooks
npx husky install
```

### Test locally

```shell
forge test
```

### Run Coverage

```shell
forge coverage
```

### Linting

```shell
forge fmt
```


### Deployment

Simulate deployment for launch

```shell
forge script script/deploy-launch.sol --private-key <your PK> --fork-url <RPC-endpoint> 
```
## Run Slither

installation

```shell
pip3 install slither-analyzer
pip3 install solc-select
solc-select install 0.8.13
solc-select use 0.8.13
```

Run analysis

```shell
slither .
```


## Install Grappa into your project

With hardhat

```shell
yarn add @grappafinance/grappa-contracts

# or

npm install @grappafinance/grappa-contracts
```

With Foundry

```shell
forge install grappafinance/core
```

Then you will be able to import the libraries or contract interface

```solidity
pragma solidity ^0.8.0;

import "@grappafinance/grappa-contracts/src/libraries/ActionUtil.sol";

```
npm package: @ribbon-studios/fork-me
Description: A 'Fork Me' React Component built out of spite
Latest version: 1.1.7

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Coverage][coverage-image]][coverage-url]

[![CI Build][build-image]][build-url]
[![Semantic Release][semantic-release-image]][semantic-release-url]
[![Code Style: Prettier][code-style-image]][code-style-url]

# `@ribbon-studios/fork-me`

![example](https://codeberg.org/ribbon-studios/fork-me/raw/branch/main/screenshots/example.png)

### Usage

```tsx
import { ForkMe } from '@ribbon-studios/fork-me';

export function MyApp() {
  return (
    <div>
      My super cool content.
      <ForkMe slug="ribbon-studios/fork-me" />
    </div>
  );
}
```

### Properties

| Name            | Description                                           | Optional?                   |
| --------------- | ----------------------------------------------------- | --------------------------- |
| slug            | The slug of your repository                           | No                          |
| side            | The side you'd like the octocat to appear!            | Yes (defaults to `'right'`) |
| backgroundColor | The ribbon color                                      | Yes (defaults to `'black'`) |
| color           | The octocat color                                     | Yes (defaults to `'white'`) |
| newTab          | Set this to false to make it open in the current tab. | Yes (defaults to `true`)    |

[_**Want to Contribute?**_](/CONTRIBUTING.md)

[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/fork-me.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/fork-me.svg
[npm-url]: https://npmjs.org/package/@ribbon-studios/fork-me
[build-image]: https://codeberg.org/ribbon-studios/fork-me/badges/workflows/ci.yml/badge.svg?branch=main
[build-url]: https://codeberg.org/ribbon-studios/fork-me/actions?workflow=ci.yml&branch=main
[coverage-image]: https://ribbon-studios.codeberg.page/fork-me/badge.svg
[coverage-url]: https://ribbon-studios.codeberg.page/fork-me
[code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg
[code-style-url]: https://prettier.io
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079
npm package: @ribbon-studios/guild-wars-2
Description: The Guild Wars 2 API
Latest version: 1.12.2

> [!IMPORTANT]  
> This repository is currently a WIP and as such isn't finished.

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Coverage][coverage-image]][coverage-url]

[![CI Build][build-image]][build-url]
[![Semantic Release][semantic-release-image]][semantic-release-url]
[![Code Style: Prettier][code-style-image]][code-style-url]

# @ribbon-studios/guild-wars-2 🦁

> Access all of the Guild Wars 2 APIs with typescript support!

### Quick Start

```ts
import { GuildWars2, Schema } from '@ribbon-studios/guild-wars-2';

const gw2 = new GuildWars2({
  access_token: '<my-super-secret-api-key>',
  v: Schema.V0,
});

export async function example(token: string) {
  await gw2.v1.mapNames();
  await gw2.v2.minis.list({
    ids: 'all',
  });
}
```

[_**Want to Contribute?**_](/CONTRIBUTING.md)

[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/guild-wars-2.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/guild-wars-2.svg
[npm-url]: https://npmjs.org/package/@ribbon-studios/guild-wars-2
[build-image]: https://codeberg.org/ribbon-studios/guild-wars-2/badges/workflows/ci.yml/badge.svg?branch=main
[build-url]: https://codeberg.org/ribbon-studios/guild-wars-2/actions?workflow=ci.yml&branch=main
[coverage-image]: https://ribbon-studios.codeberg.page/guild-wars-2/badge.svg
[coverage-url]: https://ribbon-studios.codeberg.page/guild-wars-2
[code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg
[code-style-url]: https://prettier.io
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079
npm package: @ribbon-studios/logger
Description: A simple logger for all Ribbon Studios Apps & Libraries
Latest version: 3.1.2

### @ribbon-studios/logger

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Coveralls][coveralls-image]][coveralls-url]

[![CI Build][github-actions-image]][github-actions-url]
[![Semantic Release][semantic-release-image]][semantic-release-url]
[![Code Style: Prettier][code-style-image]][code-style-url]

A simple logger for all Ribbon Studios Apps & Libraries

### Usage

```ts
import { logger, LogLevel } from '@ribbon-studios/logger';

logger.setLevel(LogLevel.INFO); // This is the default LogLevel

logger.silly('hello', 'world!');  // Outputs nothing since its lower then the configured level!
logger.info('hello', 'world!');   // '[info]:  hello world!'
logger.warn('hello', 'world!');   // '[warn]:  hello world!'
logger.error('hello', 'world!');  // '[error]: hello world!'
```

[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/logger.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/logger.svg
[npm-url]: https://npmjs.org/package/@ribbon-studios/logger
[github-actions-image]: https://codeberg.org/ribbon-studios/logger/badges/workflows/ci.yml/badge.svg?branch=main
[github-actions-url]: https://codeberg.org/ribbon-studios/logger/actions?workflow=ci.yml&branch=main
[coveralls-image]: https://img.shields.io/coveralls/ribbon-studios/logger.svg
[coveralls-url]: https://coveralls.io/github/ribbon-studios/logger?branch=main
[code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg
[code-style-url]: https://prettier.io
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079
npm package: @ribbon-studios/ribbon
Description: A simple react ribbon~
Latest version: 1.1.2

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Coverage][coverage-image]][coverage-url]

[![CI Build][build-image]][build-url]
[![Semantic Release][semantic-release-image]][semantic-release-url]
[![Code Style: Prettier][code-style-image]][code-style-url]

# Ribbon

### Preview

![Example](https://github.com/ribbon-studios/ribbon/assets/9692284/5ee5e4b3-c676-4ee5-9ec4-ae7f52fd4640)

### Usage

```tsx
import { Ribbon } from '@ribbon-studios/ribbon';

export function MyApp() {
  return (
    <div>
      My super cool content.
      <Ribbon>Local</Ribbon>
    </div>
  );
}
```

### Properties

| Name            | Description                   | Optional?                     |
| --------------- | ----------------------------- | ----------------------------- |
| children        | The contents of the ribbon    | Yes                           |
| color           | The font color                | Yes (defaults to `black`)     |
| backgroundColor | The background color          | Yes (defaults to `white`)     |
| position        | The positioning of the ribbon | Yes (defaults to `top-right`) |

[_**Want to Contribute?**_](/CONTRIBUTING.md)

[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/ribbon.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/ribbon.svg
[npm-url]: https://npmjs.org/package/@ribbon-studios/ribbon
[build-image]: https://codeberg.org/ribbon-studios/ribbon/badges/workflows/ci.yml/badge.svg?branch=main
[build-url]: https://codeberg.org/ribbon-studios/ribbon/actions?workflow=ci.yml&branch=main
[coverage-image]: https://ribbon-studios.codeberg.page/ribbon/badge.svg
[coverage-url]: https://ribbon-studios.codeberg.page/ribbon
[code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg
[code-style-url]: https://prettier.io
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079
npm package: @ribbon-studios/validify
Description: An incredibly simple object validation library
Latest version: 1.4.6

### @ribbon-studios/validify

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Coverage][coverage-image]][coverage-url]

[![CI Build][build-image]][build-url]
[![Semantic Release][semantic-release-image]][semantic-release-url]
[![Code Style: Prettier][code-style-image]][code-style-url]

An incredibly simple object validation library

### Usage

```tsx
import { Validator, isDefined, isAlpha } from '@ribbon-studios/validify';

type MyCustomType = {
  name: string;
  version: string;

  i18n: {
    en: {
      hello: string;
    };
  };

  users: Array<{
    first: string;
    last: string;
  }>;
};

const validator = new Validator<MyCustomType>({
  name: [isDefined, isAlpha],

  i18n: {
    en: {
      hello: [isDefined, isAlphaNumeric],
    },
  },

  users: {
    first: [isDefined, isAlpha],
    last: [isDefined, isAlpha],
  },
});

const myObject = {
  name: 'App',
  version: '1.0.0',

  i18n: {
    en: {
      hello: 'world',
    },
  },

  users: [
    {
      first: 'Cecilia',
      last: 'Sanare',
    },
  ],
};

const errors = validator.check(myObject); // returns a list of all the validator failure reasons
validator.validate(myObject); // throws an error containing all of the validator failure reasons
validator.isValid(myObject); // returns true if the object passes all of the validators
validator.isInvalid(myObject); // returns true if the object fails any of the validators
```

[npm-version-image]: https://img.shields.io/npm/v/@ribbon-studios/validify.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/@ribbon-studios/validify.svg
[npm-url]: https://npmjs.org/package/@ribbon-studios/validify
[build-image]: https://codeberg.org/ribbon-studios/validify/badges/workflows/ci.yml/badge.svg?branch=main
[build-url]: https://codeberg.org/ribbon-studios/validify/actions?workflow=ci.yml&branch=main
[coverage-image]: https://ribbon-studios.codeberg.page/validify/badge.svg
[coverage-url]: https://ribbon-studios.codeberg.page/validify
[code-style-image]: https://img.shields.io/badge/code%20style-prettier-ff69b4.svg
[code-style-url]: https://prettier.io
[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079
npm package: @ribcage/config
Description: Configuration schema and utilities for Ribcage projects
Author: Christian Mitchell
Latest version: 0.0.4

# @ribcage/config

Configuration schema and utilities for Ribcage projects.

## Installation

```bash
npm install @ribcage/config
# or
bun add @ribcage/config
```

## Usage

### Basic Configuration

Create a `ribcage.config.ts` file in your project root:

```typescript
import { defineConfig } from "@ribcage/config";

export default defineConfig({
  name: "my-project",
  port: 3000,
  routes_directory: "./src/app/routes",
});
```

### Advanced Configuration

```typescript
import { defineConfig } from "@ribcage/config";

export default defineConfig({
  name: "my-project",
  port: 3000,
  routes_directory: "./src/app/routes",
  aliases: {
    core: "@/core",
    modules: "@/modules",
    lib: "@/lib",
    components: "@/components",
    hooks: "@/hooks",
    utils: "@/utils",
    types: "@/types",
    assets: "@/assets",
    styles: "@/styles",
  },
  clients: {
    analytics: {
      posthog: true,
    },
    auth: {
      supabase: true,
    },
    notifications: {
      push: true,
    },
  },
});
```

### Dynamic Configuration

You can also export a function that returns the configuration:

```typescript
import { defineConfig } from "@ribcage/config";

export default defineConfig(async () => {
  const port = await getPortFromEnvironment();
  
  return {
    name: "my-project",
    port,
    routes_directory: "./src/app/routes",
  };
});
```

## API Reference

### `defineConfig(config: RibcageConfigInput): RibcageConfigInput`

Helper function to define your configuration with TypeScript type checking.

### `validateConfig(config: unknown): RibcageConfig`

Validates a configuration object against the schema and returns a typed config.

### `isConfigFunction(config: RibcageConfigInput): config is ConfigFunction`

Type guard to check if a configuration is a function.

### Types

- `RibcageConfig` - The main configuration type
- `ConfigFunction` - Type for configuration functions
- `RibcageConfigInput` - Union type of `RibcageConfig | ConfigFunction`

## Schema

The configuration schema includes:

- `name` (required): Project name
- `port`: Server port (default: 8081)
- `routes_directory`: Directory containing route files (default: "./src/app/routes")
- `aliases`: Path aliases for module resolution
- `clients`: Configuration for various client integrations
  - `analytics`: Google Analytics, Mixpanel, Amplitude
  - `auth`: Supabase, Clerk, Firebase
  - `payments`: Stripe, PayPal
  - `database`: Supabase, Firebase, PlanetScale
  - `storage`: AWS S3, Cloudinary
  - `notifications`: Push notifications, Email

## License

MIT