MERCHANT_LOOKUP was a hardcoded dict in logic.py, so adding a merchant
meant editing Python and rebuilding the Docker image just to add one
row of data. Replaces it with:
- app/tools/eib/merchant_lookup.csv (raw_description,clean_name),
bind-mounted in docker-compose.yml so edits (by hand or via the app)
take effect on the next run — no rebuild, no restart.
- logic.py: _load_merchant_lookup() reads it fresh on every
process_raw() call; add_merchant_mappings() rewrites it with new
entries merged in.
- routes.py: new POST /api/merchant-mappings endpoint.
- templates/eib/index.html: the unmapped-merchant panel is now a form
(raw name -> editable clean-name input per merchant, prefilled with
the raw name) with a "Save & Continue Processing" button. Saving
posts the mappings, then automatically resubmits the same in-browser
File object to /api/process — no re-upload needed to resume.
Verified end to end: removed a known mapping to trigger the unmapped
path with zero rebuild (confirming the bind mount), saved it back via
curl, confirmed the CSV was updated on the host, and confirmed
reprocessing succeeded immediately after.
Also includes the user's own edits to eib_pre_template.xlsx and
planeterra_equals_cards_transactions_eib_v45.xlsx made directly in
Excel/Numbers outside this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Split the EIB tool into app/tools/eib/ (routes.py for Flask glue,
logic.py for Flask-free business logic), registered as a Blueprint
under /eib with its own namespaced /eib/api/* routes. The home page
now renders a tool registry (app/main.py TOOLS list) instead of the
temporary /home-preview route, so future tools plug in the same way.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Single-tool Flask app (Equals Money -> Workday EIB conversion + audit)
plus a new /home-preview landing page in preparation for turning this
into a multi-tool platform.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>