The Problem

Founders often need a memorable, YC‑style name quickly, but brainstorming can be time‑consuming and yields no guarantee of uniqueness. Without a lightweight tool that can suggest plausible names on‑the‑fly, teams waste effort or settle for sub‑optimal branding.

What This Does

yname ships a tiny character‑level neural network that generates YC‑style names entirely in the browser. The training pipeline lives in model/ and produces two binary blobs (plain.bin, conditional.bin) plus accompanying JSON metadata. Those files are copied into web/public/models/ and consumed by the React front‑end.

Key files:

  • model/train.py – builds the MLP on data/yc_name_training_corpus.csv and writes model/artifacts/*.npz.
  • web/scripts/export_models.py – loads the NumPy artifacts and serialises them to the binary/JSON format expected by the client.
  • web/src/App.tsx – UI wrapper that lets the user request a name.
  • web/src/lib/generator.ts – core inference routine that reads the binary model (via fetch) and runs a forward pass using the weights from model.ts.
  • web/src/lib/model.ts – defines the Model interface, parses the JSON weight tables, and supplies step and sample helpers used by generator.

The repository therefore provides both the data‑science side (Python) and the delivery side (TypeScript/React) without any server component.

How It Is Wired

  1. Browser entry – web/index.html loads the Vite bundle; Vite’s entry point is web/src/main.tsx, which mounts <App /> into #root.
  2. App UI – App.tsx renders a button “Generate”. On click it calls generateName() from generator.ts.
  3. Model loading – generator.ts lazily fetches public/models/plain.json (or conditional.json) and the corresponding .bin. model.ts parses the JSON into weight tensors and creates a Model object.
  4. Inference – generateName() runs a loop that: calls model.step(prevChar) to obtain logits, samples the next character (softmax + categorical draw), * appends the character until a stop token or length limit. All computation is pure JavaScript/TypeScript; no network calls beyond the initial asset fetch.
  5. Training path (offline) – Developers run python model/train.py with the CSV corpus; the script writes NumPy .npz files into model/artifacts. export_models.py then converts those to the browser‑ready format. No runtime code in the web app touches the Python side; the two halves are linked only by the exported static assets.

No backend server is involved; the Express reference in the repo is limited to the development server Vite uses under the hood. The only side‑effects at runtime are reads of static assets from the public/models/ directory.

How To Use It

# Clone and install the front‑end
git clone https://github.com/moses-y/yname
cd yname/web
npm install
npm run dev        # starts Vite dev server at http://localhost:5173

To retrain the model locally:

python3 -m venv .venv
source .venv/bin/activate
pip install -r model/requirements.txt

python model/train.py \
  --data data/yc_name_training_corpus.csv \
  --output-dir model/artifacts

cd web
npm run export-models   # runs web/scripts/export_models.py

No environment variables or external services are required.

Real‑World Use

A product team can embed the generated name UI into an internal portal. By pulling the static public/models/*.bin into their own CDN, they get instant, offline name suggestions for brainstorming sessions without any API cost or latency.

// Example embed
import { generateName } from './lib/generator';
<button onClick={() => generateName().then(name => alert(name))}>
  Get YC‑style name
</button>

Code Health & Issues

  • Med – No test suite – repository contains no *.test.* files; code paths are unverified.
  • Med – No CI/CD – no .github/workflows, Jenkinsfile, or other pipeline definitions; builds and linting are manual.
  • Low – Duplicate tooling – both express (in package.json) and Vite are present, but Express is never used at runtime.
  • Low – Minimal documentation – README covers basic commands; deeper API docs for generator.ts or model format are absent.

No security‑related secrets are committed, and the MIT license is present.

The Bottom Line

yname delivers a functional, zero‑backend name generator with a clear separation between training (Python) and inference (React/TS). It works out‑of‑the‑box for local development but lacks automated testing and CI, which raises maintenance risk for any downstream integration. Suitable for rapid prototyping or internal tooling where the lightweight client‑only model is a benefit; not recommended for production services that require rigorous quality gates.