# Development

Emojistry turns Unicode emoji data into app-friendly JSON that can be consumed as an npm package or served through the REST API.

## Goals

- Parse the official Unicode `emoji-test.txt` format.
- Normalize emoji into stable records with names, codepoints, Unicode categories, and app categories.
- Generate versioned JSON snapshots.
- Provide small search and category helpers for apps.

## Project Layout

```text
src/
  ingest/       Unicode source parsing
  normalize/    app-facing record shaping
  categories.ts app category mapping
  search.ts     small in-memory search helpers
  index.ts      public package exports
data/
  generated/    generated JSON snapshots
docs/           development and deployment notes
```

Server, Worker, and CLI code live in this repository, but they are not part of the public npm package export.

## Install

```bash
bun install
```

## Generate Data

Generate from Unicode's latest public `emoji-test.txt`:

```bash
bun run generate
```

Generate from a local file:

```bash
bun run generate -- --input ./emoji-test.txt
```

By default, output is written to `data/generated/emojis.json`.

## Quality Checks

```bash
bun run check
```

This runs typecheck, lint, format check, and tests.

## Package Build

Build the npm package output:

```bash
bun run build
```

Preview the package contents before publishing:

```bash
bun run pack:dry
```

Publish when the package is ready:

```bash
npm publish
```

The npm package is intentionally library/data-only. It includes `dist/` package helpers and `data/generated`, but not the server, Worker, or CLI entrypoints.
