krz/brand-bench

A dynamic brand documentation generator with Ollama integration. branding documentation generator ollama

Commit 4f527d6985

4f527d6985dabfa048ee20b996aed68cd9d4f5be

parent: 16a7dc2595

Unsigned

cmc <hello@cleberg.net> · 2026-08-02 20:29 UTC

convert readme to nfo; relicense to 0bsd

Layout: unified · split

LICENSE +12 −21
@@ -1,21 +1,12 @@
1MIT License 1Copyright (C) 2026 krazy warez
2 2
3Copyright (c) 2026 krazy warez 3Permission to use, copy, modify, and/or distribute this software for any
4 4purpose with or without fee is hereby granted.
5Permission is hereby granted, free of charge, to any person obtaining a copy 5
6of this software and associated documentation files (the "Software"), to deal 6THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7in the Software without restriction, including without limitation the rights 7WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9copies of the Software, and to permit persons to whom the Software is 9ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10furnished to do so, subject to the following conditions: 10WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 11ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12The above copyright notice and this permission notice shall be included in all 12OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
README.md deleted −134
@@ -1,134 +0,0 @@
1# Brand Bench
2
3A client-side brand identity generator. Describe a project and get a complete
4brand package — positioning, tone of voice, color palette, typography system,
5logo concepts, taglines, and usage examples — instantly in the browser.
6
7No backend. No accounts. Everything runs locally and persists in `localStorage`.
8
9![Brandbench screenshot](docs/screenshot.png)
10
11## Features
12
13- **Template generation** — instant, offline-capable brand packages tailored by
14 category (developer tool, creative studio, SaaS product, etc.)
15- **AI generation** — connect your local [Ollama](https://ollama.com) instance
16 for LLM-powered output; cancellable mid-stream
17- **Multiple packages** — create, rename, duplicate, and switch between brand
18 packages in tabs; each package is independently persisted
19- **Inline editing** — click any field in the preview to edit it directly
20- **Section locking** — lock sections before regenerating so they stay unchanged
21 across runs
22- **Undo / redo** — full edit history per package (`⌘Z` / `⌘⇧Z`)
23- **Color palette** — editable swatches with a native color picker
24- **Typography system** — curated font pairings per category with an 8-level
25 type scale
26- **Export** — download as Markdown, JSON, or a self-contained HTML guidelines page
27
28## Getting started
29
30```bash
31npm install
32npm run dev
33```
34
35Open `http://localhost:5173`.
36
37To build for production:
38
39```bash
40npm run build # outputs to dist/
41npm run preview # serve the build locally
42```
43
44## AI with Ollama
45
46Brandbench can generate brand packages using a locally running Ollama model.
47
481. [Install Ollama](https://ollama.com/download) and pull a model:
49
50 ```bash
51 ollama pull llama3.2 # recommended default
52 ollama pull mistral # good alternative
53 ollama pull gemma3 # another option
54 ```
55
562. Make sure Ollama is running:
57
58 ```bash
59 ollama serve
60 ```
61
623. If you're running Ollama on a non-default port or a different host, set the
63 `OLLAMA_ORIGINS` environment variable to allow browser requests:
64
65 ```bash
66 OLLAMA_ORIGINS="*" ollama serve
67 ```
68
694. Open Settings (⚙) in the app, enable AI, set your base URL
70 (`http://localhost:11434` by default), select a model, and click **Test
71 connection**.
72
73Larger models produce better-structured output. If generation fails with a JSON
74error, try a bigger model. Generation typically takes 15–60 seconds depending on
75hardware.
76
77## Self-hosting with Docker
78
79A `Dockerfile` and `compose.yml` are included for deploying the app alongside
80Ollama on a server.
81
82```bash
83docker compose up -d --build
84```
85
86The app is served on port 8000. Ollama's API is proxied through nginx at `/api/`
87so the browser never makes a cross-origin request — no CORS configuration
88needed.
89
90**After first boot, pull at least one model:**
91
92```bash
93docker compose exec ollama ollama pull llama3.2
94```
95
96Then open the app, go to Settings (⚙), enable AI, and set the Ollama base URL
97to `http://your-server:8000` (no path suffix).
98
99**GPU support:** If your server has an NVIDIA GPU, uncomment the `deploy` block
100in `compose.yml` (requires the
101[NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)).
102
103## Project structure
104
105```
106src/
107 engine/
108 generator.ts # Template-based brand package generator
109 aiGenerator.ts # Ollama integration
110 hooks/
111 useWorkspace.ts # Per-package state, generate, undo/redo
112 usePackages.ts # Multi-package tabs and localStorage slots
113 useSettings.ts # Ollama settings persistence
114 components/
115 InputPanel.tsx # Project details form
116 PreviewPanel.tsx # Brand package preview with toolbar
117 BrandDoc.tsx # Full brand document (sections, palette, type scale)
118 PackageSwitcher.tsx # Tab bar with rename/duplicate/delete
119 SettingsPanel.tsx # AI settings drawer
120 lib/
121 sanitize.ts # Defensive coercion for AI output fields
122 export.ts # Markdown / JSON / HTML export formatters
123 types.ts # All shared TypeScript interfaces
124```
125
126## Tech stack
127
128- [React 18](https://react.dev) + [TypeScript](https://www.typescriptlang.org)
129- [Vite](https://vitejs.dev)
130- No UI library — plain CSS with custom properties
131
132## License
133
134MIT
README.nfo added +79
@@ -0,0 +1,79 @@
1┌──────────────────────────────────────────────────────────────┐
2│ B R A N D B E N C H [ KRZ ] krz.sh │
3└──────────────────────────────────────────────────────────────┘
4
5WHAT
6 client-side brand identity generator. describe a project, get a
7 brand package: positioning, tone, color palette, typography, logo
8 concepts, taglines, usage examples. runs in the browser.
9
10 no backend. no accounts. state persists in localStorage.
11
12DOES
13 - template generation, offline, tailored by category
14 - ai generation via a local ollama instance, cancellable mid-stream
15 - multiple packages in tabs, each persisted separately
16 - inline editing, click any field in the preview
17 - section locking across regenerations
18 - undo/redo per package (⌘Z / ⌘⇧Z)
19 - editable color swatches, native color picker
20 - font pairings per category, 8-level type scale
21 - export to markdown, json, or a self-contained html page
22
23RUN
24 npm install
25 npm run dev
26
27 open http://localhost:5173.
28
29 build:
30
31 npm run build # dist/
32 npm run preview
33
34AI WITH OLLAMA
35 1. install ollama, pull a model:
36
37 ollama pull llama3.2
38 ollama pull mistral
39 ollama pull gemma3
40
41 2. run it:
42
43 ollama serve
44
45 3. a non-default host or port needs OLLAMA_ORIGINS set for browser
46 requests:
47
48 OLLAMA_ORIGINS="*" ollama serve
49
50 4. in the app: Settings, enable AI, set base url
51 (http://localhost:11434), pick a model, Test connection.
52
53 bigger models give better-structured output. generation takes
54 15-60s depending on hardware.
55
56DOCKER
57 Dockerfile and compose.yml deploy the app next to ollama.
58
59 docker compose up -d --build
60
61 app serves on port 8000. ollama's api is proxied through nginx at
62 /api/, so the browser makes no cross-origin request. after first
63 boot, pull a model:
64
65 docker compose exec ollama ollama pull llama3.2
66
67 set the ollama base url to http://your-server:8000. for an nvidia
68 gpu, uncomment the deploy block in compose.yml (needs the nvidia
69 container toolkit).
70
71STACK
72 react 18, typescript, vite. no ui library, plain css.
73
74LICENSE
75 0bsd. see LICENSE.
76
77┌──────────────────────────────────────────────────────────────┐
78│ krz.sh │
79└──────────────────────────────────────────────────────────────┘