Internals

Boolean search

Generator, public vs workspace history, and how X-ray ties to the Google extension.
Living notes for builders. Product UX may still change.

Purpose

Chip-based builder that turns titles / must-have / nice-to-have / locations / exclude into:

  • a LinkedIn Boolean string
  • a Google X-ray string (site:linkedin.com/in …)

No operators to memorize. X-ray output is meant to be pasted into Google Search; the Chrome extension then lists visible /in/ profiles on the SERP.

Product overview: Boolean search.

Code map

PiecePath
Pure generator + normalize/quoteshared/boolean/generate.ts (+ generate.test.ts)
Builder UIapp/components/boolean/BooleanBuilder.vue
Public page (guest local history)app/pages/boolean.vue/boolean
Dashboard generatorapp/pages/app/boolean/index.vue/app/boolean
Dashboard history (Profiles-style table)app/pages/app/boolean/history.vue/app/boolean/history
Workspace CRUD composableapp/composables/useBooleanSearches.ts
Guest localStorage historyapp/composables/useLocalBooleanSearches.ts
Table + RLSsupabase/migrations/20260814120000_boolean_searches.sql (+ 20260816120000_boolean_searches_always_writable.sql)
pgTAPsupabase/tests/database/08_boolean_searches.test.sql

Generator contract

BooleanInput: titles, mustHave, niceToHave, locations, exclude (string arrays).

generateBoolean(input) returns normalized input plus linkedin and xray strings. Defaults seed exclude with noise terms (recruiter, intern, staffing). LinkedIn strings soft-warn around ~900 characters (LINKEDIN_WARN_CHARS).

Keep generation in shared/ so web and tests stay aligned; do not duplicate quote/normalize rules in Vue components.

Persistence

Guests (/boolean)

  • History in localStorage key modri:boolean-searches
  • Save to workspace writes a pending draft to sessionStorage (modri:boolean-pending-draft) and sends the user to /signup?next=/app/boolean (or login)
  • After auth, /app/boolean restores the draft, inserts once into workspace history, and clears the draft
  • Helpers: shared/boolean/pendingDraft.ts, app/composables/useBooleanPendingDraft.ts

Workspace (/app/boolean)

Table public.boolean_searches:

  • workspace_id, created_by, title, input (jsonb), linkedin_string, xray_string
  • Members can read all rows in the workspace
  • Authors can insert/update/delete their own rows without a Team billing write gate
  • Forever free: Boolean history is exempt from workspace_can_write / enforce_workspace_can_write (contacts and other Team surfaces stay gated)

UI supports scope Mine / Team on /app/boolean/history, restore into the generator via ?restore=<id>, copy LinkedIn or X-ray string, delete own rows.

Loop with Google extension

  1. Build / restore a Boolean on /app/boolean (or public /boolean)
  2. Copy X-ray → open Google Search → run query
  3. Extension Google content script scrapes visible /in/ links on the current page and shows status/position from the active workspace

Do not scrape LinkedIn Search or upload SERP HTML — only visible Google results on the current page.