Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pick a name together

A web app (installable PWA, phone and desktop) to choose a baby name as a couple: each parent sorts and rates names on their own, then you compare your picks as many times as you like until you settle on the final name.

No server, no account: votes stay in each device's browser. You swap them by QR code or by link (WhatsApp, text message, email…).

The interface is available in English, French and Spanish. It follows the browser language by default, and you can change it in the settings.

Live app: https://marob.github.io/pick-a-name-together/

Features

  • Discover: random names among those matching the filters. Swipe the card right (yes), left (no) or up (love it). You can also rate directly with stars, skip a name or undo the last vote. Keyboard: ← → ↑ ↓, 1-5, Backspace.

  • Filters:

    • gender: girl, boy, unisex;
    • origins (regions or countries), in "at least one" or "all" mode. "All" gives names that work in both your cultures, e.g. French-speaking world AND Spanish-speaking world;
    • minimum frequency and exclusion of very popular names;
    • length, initial letter and compound names.
  • List: the full list, with accent-insensitive search and sorting. Any name can be rated or re-rated at any time.

  • My picks: my loved and "yes" names, ranked by rating. Rejected names stay available in case you change your mind.

  • Together: swap votes by QR code or link, then reconcile:

    • matches (podium and ranking by combined score),
    • the partner's picks you haven't seen yet (reviewable in swipe mode),
    • disagreements,
    • your picks they haven't seen yet.

    Each new swap replaces the previous one, so you narrow things down over several rounds.

  • Transfer between your own devices (phone ↔ computer): same mechanism, choosing "these are my own votes" when importing. The votes are merged and the most recent vote wins.

  • Name details: frequency per country, births in France since 1950, other spellings.

QR codes: phone and desktop

  • Up to about 450 votes, a single QR code holds a link. The phone's regular camera app can scan it, and the app opens straight on the import screen.
  • Beyond that, the app shows a looping series of QR codes (about 5 for 1,000 votes), to scan from the app itself (Together → Receive their votes → Scan). A progress bar shows how many have been read.
  • On a computer, you can show your QR code to the other person's phone, scan with the webcam, or simply paste the link you received.

Data

public/names.json holds about 16,000 names (300 KB gzipped). It is generated by npm run data (scripts/build-names.mjs), which downloads and merges these sources:

Source Content
nam_dict.txt (Jörg Michael, GFDL) ~48,000 first names, gender and frequency in 54 countries/areas
INSEE, fichier des prénoms 2025 France, births 1900-2025 by sex
INE Spain, number of people per first name and sex
datos.gob.ar Argentina, births 1922-2015
Retraite Québec Quebec, births 1980-2025

Names are grouped by an accent-free key (Léa/Lea, Inès/Inés). The displayed spelling is the most frequent one; the others are listed as variants. Per-country frequencies use the nam_dict scale: level 10 ≈ 2% of births of one sex, and each level down halves the frequency. National statistics (INSEE, INE, Quebec, Argentina) override nam_dict for their country.

Raw files are cached in data/raw/ (not versioned). npm run data -- --offline rebuilds the list without downloading anything again.

Licence: nam_dict.txt is under the GNU Free Documentation License, and public/names.json is derived from it. Data derived from it must be distributed under the same licence.

⚠️ If names.json is regenerated, both parents must reload the app before swapping votes. Shared votes reference names by their position in the list, and a hash of the list detects any mismatch. Votes that were already imported are not affected.

Development

nvm use              # Node 22
npm install
npm run data         # (re)generates public/names.json — already committed
npm run dev          # http://localhost:5173
HTTPS=1 npm run dev  # https://<local-ip>:5173 to test on a phone (the camera requires HTTPS)
npm run build        # static build in dist/
npm run preview

Stack: Vite, Preact, TypeScript, vite-plugin-pwa (offline and installable), qrcode, jsqr (loaded on demand when the scanner opens) and fflate.

Path Role
src/data.ts loading the list, filters
src/i18n/ translations (fr.ts = reference, en.ts, es.ts), plurals, number and date formats
src/store.ts persisted state (localStorage), votes, reconciliation
src/share.ts compact vote encoding (binary, deflate, base64url), splitting into several QR codes
src/views/ Discover, List, My picks, Together

Translations

All texts live in src/i18n/{fr,en,es}.ts, including country and region names. fr.ts is the reference: en.ts and es.ts are typed against its keys, so a missing translation breaks npm run build. An entry can have singular/plural forms ({ one, other }), picked from the count parameter. To add a language, create a dictionary and register it in src/i18n/index.ts (LANGS, DICTS, LOCALES).

Deployment

GitHub Pages (set up)

The .github/workflows/deploy.yml workflow builds and publishes the app on every push to main. You can also run it by hand from the Actions tab (Run workflow). The app is published at https://marob.github.io/pick-a-name-together/.

One manual step is needed, once, on GitHub: Settings → Pages → Build and deployment → Source: GitHub Actions.

public/names.json is committed, so the workflow doesn't download the name sources again. To update the list, run npm run data locally and commit the file.

Other hosting

Any static hosting over HTTPS works (HTTPS is required for the camera and for installing the PWA): Netlify, Cloudflare Pages, a NAS… Just publish dist/. Paths are relative, so a subdirectory works too.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages