Brand DNA: choose the model and add an OpenAI-compatible endpoint, and prove nothing is sent without a key
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 66/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, typescript
- Domain
- ai, backend, documentation, security, testing
Research direction
Start with lib/brand-dna/providers/anthropic.ts, lib/brand-dna/ai-key.ts and lib/brand-dna/registry.ts to understand the existing provider and key flow, then read docs/brand-dna-providers.md. Implement and test the new provider and model selection through components/brand-dna/ai-key-panel.tsx; use tests/e2e/brand-dna-key-panel.spec.ts to verify no external request occurs without a key. Done means the acceptance tests pass, both providers are documented, and keys remain only in IndexedDB.
Written by the indexing model from the issue text.
Description
Summary
The opt-in AI provider is fixed to one model (AI_MODEL in anthropic.ts) and one API. Let the person choose the model, and add an OpenAI-compatible endpoint (a base URL plus a key, which also covers local servers such as Ollama), behind the same key panel. DesignHub still makes no AI request unless a person pastes their own key, and a test should prove it.
Part of the 2.0.0 plan: fewer, better and fully tested studios.
Where to look
lib/brand-dna/providers/anthropic.ts,lib/brand-dna/ai-key.tsandlib/brand-dna/registry.tscomponents/brand-dna/ai-key-panel.tsxdocs/brand-dna-providers.md: the provider guide to extendtests/e2e/brand-dna-key-panel.spec.ts
Behaviour
- Store a model name with the key (still only in IndexedDB, removed with one click) and use it in the request.
- Add an "OpenAI-compatible" provider with a base URL field. A key is optional only for
localhostand127.0.0.1. The exact payload and the destination host are shown before the first request, as now. - Any failure still falls back to the on-device result with a note.
Acceptance criteria
- Unit tests with a mocked
fetchcover a successful answer, a bad key, a rate limit, a network error and an odd answer for the new provider. - An end-to-end test intercepts every request while the on-device provider runs, and with no key set, and fails if any request goes to a host other than the app's own.
-
docs/brand-dna-providers.mdand README.md describe both providers and what leaves the browser. - No key is logged, put in a URL or stored anywhere but IndexedDB.
Getting started: fork the repo, then pnpm install and pnpm dev (Node 22+, pnpm 11, no API keys). Before opening a PR, run pnpm typecheck && pnpm test && pnpm lint && pnpm format:check && pnpm check:dashes && pnpm build (CI fails on unformatted files, so pnpm format first). See CONTRIBUTING.md and the first contribution walkthrough.
Everything needed is in the repository. This doesn't need maintainer access, secrets or paid services. Comment below to claim it, and ask questions here any time.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 3
- Avg merge
- 4h 4m
- Merged PRs (30d)
- 74
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/DesignHub
-
area: projects difficulty: medium enhancement help wanted performance v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
area: backgrounds difficulty: hard enhancement help wanted performance v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
dependencies difficulty: easy enhancement help wanted v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area: mockups area: social difficulty: medium enhancement help wanted performance v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
area: ui difficulty: medium enhancement help wanted performance v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
All issues in yakew7/DesignHub
Similar issues
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Japan Fact 898 (good-first-issue)Opencommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 86/100
lingdojo/kana-dojo#33145 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#4278 ·
Maintainers usually reply within 1 day
-
[Bug] Activity | The activity list ignores taskIds and returns the activities of every taskPossibly taken @NdekoCode claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ever-co/ever-gauzy#11469 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
griffinwork40/agent-afk#4408 ·
Maintainers usually reply within 1 day