Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Brand DNA: choose the model and add an OpenAI-compatible endpoint, and prove nothing is sent without a key

Closed
#409 0 comments 0 reactions 0 assignees View on GitHub

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

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

area: brand-dna difficulty: medium enhancement help wanted v2.0.0

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.ts and lib/brand-dna/registry.ts
  • components/brand-dna/ai-key-panel.tsx
  • docs/brand-dna-providers.md: the provider guide to extend
  • tests/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 localhost and 127.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 fetch cover 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.md and 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yakew7/DesignHub

All issues in yakew7/DesignHub

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.