How noahlevitt/data-warehouse works
Customer Records is an internal web app for importing customer files into searchable, location- and service-scoped records, finding and tagging records, and exporting unique phone numbers in the main system’s import format. The main workflow runs through the web app, the shared converter’s read/match/clean stages, and a record sink into PostgreSQL; Find and Tags provide the main downstream workflows. The README documents these capabilities and the optional ClickHouse merchant sync. Some internal links are limited to README statements and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: app.py Web app · engine.py Conversion engine · merchants.py Merchant synchronization · db.py Records database
Components 22
Web application
- Web app
app.py - Find and Tags pages
records/ui.py - Merchant and service pages
records/ui.py
File conversion
- File reader
converter/reader.py - Column mapping
converter/mapping.py - Mapping suggestions
converter/heuristics.py - Mapping orchestration
converter/services.py - Conversion engine
converter/engine.py - Value normalization
converter/normalizers.py - Record and import fields
converter/schema.py
Customer records
- Record operations
records/store.py - Find query builder
records/find.py - Find criteria
records/criteria.py - Tag operations and export
records/tags.py - Merchant synchronization
records/merchants.py
Persistence and imports
- Background import runner
records/runner.py - Record sink
records/importer.py - Records database
records/db.py - Import and template storage
converter/storage.py
Other components
- Staff user
- Main app ClickHouse
- Merchant CSV upload
Connections 27
- Staff user → Web app: uses
- Web app → Find and Tags pages: renders
app.py - Web app → Merchant and service pages: renders
app.py - Web app → File reader: reads upload
app.py - Web app → Mapping orchestration: prepares mapping
app.py - Mapping orchestration → Mapping suggestions: suggests mapping
converter/services.py - Mapping orchestration → Column mapping: normalizes mapping
converter/services.py - Web app → Background import runner: starts import
app.py - Background import runner → Record sink: stores rows
records/runner.py - Record sink → Conversion engine: converts rows
records/importer.py - Conversion engine → Value normalization: normalizes values
converter/engine.py - Conversion engine → Column mapping: applies mapping
converter/engine.py - Conversion engine → Record and import fields: uses fields
converter/engine.py - Record sink → Record operations: saves records
records/importer.py - Record operations → Records database: reads and writes
records/store.py - Web app → Import and template storage: manages imports
app.py - Web app → Import and template storage: manages templates
app.py - Find and Tags pages → Find query builder: runs searches
records/ui.py - Find query builder → Find criteria: builds conditions
records/find.py - Find query builder → Records database: queries records
records/find.py - Find and Tags pages → Tag operations and export: manages tags
records/ui.py - Tag operations and export → Records database: reads and writes
records/tags.py - Tag operations and export → Record and import fields: formats export
records/tags.py - Merchant and service pages → Merchant synchronization: loads merchants
records/ui.py - Merchant synchronization → Main app ClickHouse: loads merchant data
- Merchant synchronization → Merchant CSV upload: accepts CSV
- Merchant synchronization → Records database: stores locations