# Dewemoji Localhost Run Note

Quick note so we can run Dewemoji locally anytime.

## Option A (recommended): Docker Compose

From project root:

```bash
docker compose up --build
```

Open:

- App: `http://127.0.0.1:8000`

Stop:

```bash
docker compose down
```

If you also want to remove DB volume:

```bash
docker compose down -v
```

## Option B: Native Laravel (without Docker)

From `app/`:

```bash
cp .env.example .env
composer install
npm install
php artisan key:generate
php artisan migrate
```

Run backend:

```bash
php artisan serve
```

Run frontend assets (new terminal):

```bash
npm run dev
```

Open:

- App: `http://127.0.0.1:8000`

## Important env notes

- `APP_URL=http://127.0.0.1:8000`
- For local DB simplicity, SQLite is fine.
- Dataset path should point to bundled file:
  - `DEWEMOJI_DATA_PATH=/absolute/path/to/dewemoji/app/data/emojis.json`
  - or leave empty (default uses bundled `app/data/emojis.json`).

## Quick checks

```bash
curl -s "http://127.0.0.1:8000/v1/health"
curl -s "http://127.0.0.1:8000/v1/emojis?limit=3"
```

