Skip to content

v0.3.3 - CLEAR Clone Implementation

Latest

Choose a tag to compare

@freyjaAI freyjaAI released this 30 Nov 15:43
· 148 commits to main since this release
0199fe9

CLEAR Clone Schema & API Implementation

This release implements comprehensive CLEAR-style reporting capabilities to compete with Thomson Reuters CLEAR at a fraction of the cost.

New Database Schema (ddl/05_clear_clone.sql)

Person Tables:

  • person_alias - Track AKAs, maiden names, nicknames
  • person_address_link - Historical address tracking with sources
  • person_flags (materialized view) - YES/NO quick analysis flags:
    • OFAC listing
    • Criminal record
    • Bankruptcy
    • Sex offender
    • Multiple SSN
    • Deceased
    • P.O. Box address
    • Prison address
    • Younger than SSN issue
  • person_person_rel - Person-to-person relationships (relative, associate, shared_address, shared_business)

Business Tables:

  • business_phone - Business phone numbers with sources
  • business_address_link - Business address history

New API Endpoints (api/clear_clone.py)

GET /clear/person/{person_canon_id}
Returns comprehensive person report with:

  • Subject information (name, DOB, gender, entity ID)
  • Aliases list
  • Address history with flags
  • Quick analysis flags (all boolean)
  • Criminal records with case details
  • Associate analytics

GET /clear/business/{business_canon_id}
Returns comprehensive business report with:

  • Business subject info (name, DUNS, address)
  • Business flags
  • Phone numbers
  • Officers list
  • Same-address businesses
  • Same-address people

Key Features

  • JSON API returns every section found in $75 CLEAR PDF reports
  • Complete audit trail with source citations
  • Performance-optimized with indexed materialized views
  • Ready for Redis caching layer (Week 4)
  • Foundation for PDF export (Week 4)

Next Steps (Week 4 Backlog)

  • Populate person_alias from person_raw during ingestion
  • Populate person_address_link from address_raw nightly
  • Seed business_phone & officer tables from SOS filings
  • Redis cache for sub-5ms repeat lookups
  • PDF generator using weasy-print
  • Bulk CSV endpoint (10,000 lookups / 3s)