# vendor/

Third-party source vendored into this repo so the app builds from a **single checkout**.

## `photo-gallery-sdk/`

`@photo-gallery/sdk` — the Smart Gallery engine. Upstream:
`https://git.lynkedup.cloud/KaushikRK99/advance-photo-gallery-web-sdk` (`packages/photo-sdk`).

**This directory is generated. Do not hand-edit it** — changes belong upstream, then:

```bash
npm run sync:gallery-sdk    # re-copies src/ + package.json + README.md from the sibling checkout
git add vendor/photo-gallery-sdk && git commit -m "chore: sync @photo-gallery/sdk"
```

### Why vendored instead of a registry dependency

The SDK is not published anywhere yet. A `file:../advance-photo-gallery-web-sdk/...` dependency
works on a developer machine that has both repos side by side, but **fails every CI/Vercel build**,
because the deploy only ever checks out this repo. Vendoring keeps the dependency graph closed.

Only `src/`, `package.json` and `README.md` are copied — the package's `exports` point at `src/`
and `next.config.ts` lists it in `transpilePackages`, so no build output is needed. Its own
`node_modules` is deliberately excluded: without it, the SDK's sources resolve `@types/react` from
this repo's React 19 rather than the pnpm workspace's React 18, which is what lets them type-check
here at all.

### Replacing this with a real dependency

When the SDK is published to the Gitea npm registry (the same one `@insignia/*` uses — Vercel
already has `GITEA_TOKEN` for it):

1. Publish it from the SDK repo under a scope this repo's `.npmrc` maps to the registry.
2. In `package.json`, swap `"@photo-gallery/sdk": "file:./vendor/photo-gallery-sdk"` for the version range.
3. Delete this directory and the `sync:gallery-sdk` script.

Nothing else changes — no import paths, no config.
