JOB-EASY

Companies

User-owned company lists, CSV ingestion, deduplication, and community contributions.

The companies feature slice owns the private, user-scoped company lists. It manages the CompanyList (a bucket for a specific location) and the Company models.

The Data Model

The Company model is uniquely designed to prioritize UI simplicity. Instead of using nullable fields, almost all of its 20+ string columns (like website, hrName, and techStack) default to the literal string "Not publicly listed". This prevents the frontend from needing constant null-coalescing fallbacks.

Provenance & Sharing

  • source: Tracks how the row entered the list (manual, csv, or shared from the global pool). This drives origin badges in the UI.
  • sharedWithCommunity: A boolean flag indicating the user contributed this specific row to the Global Company Pool. It only flips to true after a successful moderation and deduplication pass. It acts strictly as a visual badge—the private row remains fully editable and owned by the user, while a separate disconnected copy is placed in the public pool.

Deduplication Invariants

Data ingestion—especially via CSV—is messy. To combat this, the slice relies heavily on normalized identity keys generated by companyKeys().

Strict Normalization Requirement

Dedupe keys and string normalization must be identical on both the write path (when inserting) and the read path (when querying), or matching silently fails.

These normalized keys power three critical systems without requiring a full table scan:

  • The "Already in your list" warning badges in the shared community pool.
  • The CSV Upload Dedupe Probe which actively prevents duplicates during bulk import.
  • The Admin Duplicate Finder tools.

Legacy Data

The schema retains an industry column. While the current version of the CSV import template no longer includes an Industry column, the field is retained strictly because it holds real data on existing rows and is still readable by the admin company editor.