Adam BlansettSenior Full-Stack & AI Engineer
Autonomous AI WorkforceProduction-Hardened Full-Stack Platform (MIT)

AI Procurement & Vendor Manager Platform

Self-hosted procurement platform for 8-family MSA/DPA contract diffing, P25/median/P75 SaaS pricing benchmarks, quote-to-PO budget checks, and renewal tracking.

Engineering RoleLead Systems & AI Architect

01. Problem & Context

Procurement, legal, and finance teams lose substantial SaaS spend to silent auto-renewal notices, opaque vendor seat pricing, off-playbook liability or uplift clauses in MSAs/DPAs, and unbudgeted purchase orders approved without separation of duties.

02. Engineering Solution

Built a production-hardened self-hosted procurement and vendor management platform pairing a FastAPI + async SQLAlchemy 2.0 backend (`core/`, `contracts/`, `benchmarks/`, `purchasing/`, `renewals/`) with a React 18 TypeScript console. Automates `.pdf`/`.docx`/`.txt`/`.md` contract diffing against an 8-family commercial playbook, 384-dim semantic precedent search, SKU/SaaS percentile benchmarking, quote-to-PO budget validation with strict separation of duties, and `0/7/30/60/90`-day renewal alert sweeps.

03. System Architecture

Five backend modules (`core/`, `contracts/`, `benchmarks/`, `purchasing/`, `renewals/`) run on async SQLAlchemy 2.0 with Alembic migrations (`0001_initial_schema`), HS256 JWT + PBKDF2-HMAC-SHA256 RBAC (`admin`, `vp_finance`, `finance_director`, `legal_counsel`, `procurement_manager`, `analyst`), strict separation of duties, sliding-window rate limiting (`429 Retry-After`), Prometheus `/api/v1/health/metrics`, OpenTelemetry (`OTEL_ENABLED=true`), and SHA-256 `audit_logs`.

Core Architectural Components

Contract Playbook Diffing & Precedent Search (`contracts/`)

Ingests `.pdf`, `.docx`, `.txt`, and `.md` contracts, performs 8-family commercial playbook diffing and side-by-side vendor comparisons, indexes 384-dim semantic clause embeddings (`POST /api/v1/contracts/search`), and routes risks to legal/procurement HITL review.

SKU & SaaS Percentile Pricing Benchmarks (`benchmarks/`)

Maintains normalized historical SKU and SaaS seat rates with bulk CSV import (`POST /api/v1/benchmarks/import-csv`), computing P25/median/P75 percentiles, quote variance, uplift analysis, and estimated annual savings.

Quote-to-PO Validation & Budget Control (`purchasing/`)

Reconciles vendor quotes against PO line items, verifies arithmetic and cost-center budget headroom (with CSV upsert at `/budgets/import-csv`), flags benchmark outliers, and enforces tiered approval routing.

Renewal Notice Tracking & Governance (`renewals/`, `core/`)

Tracks notice-deadline urgency, generates cross-module AI renegotiation briefs with Markdown export, dispatches deduplicated `0/7/30/60/90`-day webhook alerts, gates outbound vendor notices behind HITL approval, and exports CSV/signed-JSON SHA-256 `audit_logs`.

04. Notable Engineering Decisions

Strict Separation of Duties & Fail-Fast Production Auth

Enforcing `AUTH_REQUIRED=true` in production and blocking requesters from self-approving POs or vendor notices across 6 RBAC roles prevents procurement policy bypass.

Cross-Module Renegotiation Briefs Grounded in Benchmarks & Contract Diffs

Combining 8-family MSA/DPA risk flags with P25/median/P75 historical seat benchmarks equips teams with concrete leverage before auto-renewal notice deadlines expire.

Local-First LLM Router with Mandatory Cloud PII Scrubbing

Vendor quotes and contracts contain tax IDs and executive contacts; routing through `mock`/`ollama`/`gemini` with `LLM_REDACT_PII_FOR_CLOUD=true` protects sensitive commercial data.

05. Engineering Challenges & Solutions

Challenge: Comparing non-standardized vendor quotes and multi-format contracts across historical renewals.

Engineering Solution: Normalized SKU/SaaS rates into P25/median/P75 benchmark tables alongside `.pdf`/`.docx` clause extraction and 384-dim semantic precedent search.

Challenge: Preventing duplicate renewal alerts and unbudgeted PO approvals under multi-approver workflows.

Engineering Solution: Added deduplicated `0/7/30/60/90`-day threshold sweeps, cost-center budget headroom checks, and strict separation-of-duties approval validation.

06. Implementation Highlights

  • `.pdf`/`.docx`/`.txt`/`.md` contract ingestion, 8-family commercial playbook diffing, side-by-side compare, and 384-dim precedent search
  • Normalized SKU & SaaS pricing benchmark store with bulk CSV import and P25/median/P75 variance and savings analysis
  • Quote-to-PO reconciliation with arithmetic validation, cost-center budget headroom checks, and tiered separation-of-duties approvals
  • Notice-deadline renewal tracking, Markdown AI renegotiation briefs, deduplicated `0/7/30/60/90`-day webhooks, and HITL vendor notices
  • HS256 JWT + PBKDF2-HMAC-SHA256 6-role RBAC, sliding-window rate limiting, SHA-256 `audit_logs` CSV/signed-JSON export, and Prometheus/OTel
  • React 18 + Vite + TypeScript console with 6 seeded RBAC personas in dev and Ruff/Mypy/pytest/Vitest/Trivy CI