# @donotdev/core

Core framework package for DoNotDev. This package bundles all internal framework modules into a single entry point.

## What's Included

- **Type definitions** - TypeScript types and interfaces
- **Utilities** - Helper functions and common utilities
- **Store management** - Zustand store factory and patterns
- **Schema validation** - Valibot schema creation and validation
- **Hooks** - React hooks for framework initialization
- **i18n** - Internationalization utilities

**Note:** Provider packages (like `@donotdev/firebase`) are separate and should be imported directly when needed.

## Installation

```bash
npm install @donotdev/core
# or
bun install @donotdev/core
```

## License

This package requires a DoNotDev Framework license. Applications will display a watermark without a valid license key.

**View pricing:** [donotdev.com/pricing](https://donotdev.com/pricing)
**Purchase license:** [donotdev.com/purchase](https://donotdev.com/purchase)

**Configure your license key:**

```bash
# In .env file (Vite projects)
VITE_DONOTDEV_LICENSE_KEY=dndev_your_key_here

# In .env file (Next.js projects)
NEXT_PUBLIC_DONOTDEV_LICENSE_KEY=dndev_your_key_here

# Or in code (before framework initialization)
globalThis.__DONOTDEV_LICENSE_KEY__ = 'dndev_your_key_here';
```

For detailed setup instructions, see [License Key Setup Guide](../../docs/guides/LICENSE_KEY_SETUP.md).

## Usage

### Tree-shakeable Imports

```typescript
import { createDoNotDevStore, useTranslation } from '@donotdev/core';

// Only imported code included in bundle
const myStore = createDoNotDevStore({ 
  name: 'myStore',
  createStore: (set, get) => ({ ... })
});
```

### Namespaced Imports

```typescript
import { Stores, I18n } from '@donotdev/core';

const myStore = Stores.createDoNotDevStore({ ... });
```

## License

Commercial license. See LICENSE.md.
