Skip to content

Lead ingestion + API-first lead management UI (CSV/TXT/JSON/XLSX, normalization, CORS)#4

Open
Pyrex611 wants to merge 1 commit intomainfrom
codex/create-lead-uploading-and-storage-system
Open

Lead ingestion + API-first lead management UI (CSV/TXT/JSON/XLSX, normalization, CORS)#4
Pyrex611 wants to merge 1 commit intomainfrom
codex/create-lead-uploading-and-storage-system

Conversation

@Pyrex611
Copy link
Owner

Motivation

  • Provide a robust foundation for lead ingestion and storage to support the autonomous outreach system by adding multi-format imports, normalization, and an API-first UX for separate frontend/backend deployments.
  • Improve developer ergonomics and packaging to allow a standalone frontend bundle while avoiding accidental setuptools packaging of the frontend assets.

Description

  • Implemented a strengthened LeadImporter with CSV/TXT/JSON/XLSX parsing, header-alias normalization (full_name, email_address, job_title, etc.), and invalid-row accounting; updated import results to include invalid_rows (app/services/lead_importer.py, app/models/schemas.py).
  • Added API-first endpoints under /api/v1 for health, dashboard metrics, paginated/filtered lead listing, and a validated multipart POST /api/v1/leads/import that returns import summary and proper HTTP errors (app/api/routes.py).
  • Reworked the Jinja dashboard into a modern interactive lead foundation console with client-side JS to consume the new API, and added a standalone static frontend/ bundle for separate hosting; included safe HTML escaping and UI filters (app/templates/dashboard.html, app/static/js/app.js, app/static/css/style.css, frontend/).
  • Enabled configurable CORS origins and registered the new API router to allow split frontend/backend deployment, and updated packaging to include openpyxl and restrict packages discovery to app* (app/core/config.py, app/main.py, pyproject.toml).

Testing

  • Ran pip install -e .[dev] successfully to build and install dependencies including openpyxl (success).
  • Ran linting with ruff check . which passed (success).
  • Ran pytest -q and all tests passed (5 passed, added tests for XLSX import and invalid-row tracking) (success).
  • Manually launched the app with uvicorn app.main:app and captured a dashboard screenshot to validate the UI and API integration (manual run + screenshot captured).

Codex Task

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant