Convert complex loan agreements into standardized, machine-readable "Loan DNA" profiles — a desktop-grade loan review UI for ingesting, extracting, visualizing, comparing, and exporting loan indicators.
LMA-DNA is a front-end application that standardizes and visualizes key attributes of loan agreements ("Loan DNA"). It provides an intake workflow for uploading loan documents, an extraction/scoring pipeline (pluggable), visualizations (fingerprint, radar, cards), comparison workflows and PDF export/interoperability capabilities.
The app is built with modern React + Vite and ships a production-ready dist/ build.
- Loan intake and upload modal for adding loan documents (PDFs).
- Automatic extraction and scoring pipeline (extraction service + scoring engine).
- Rich visualizations: fingerprint, radar charts, cards for Loan DNA attributes.
- DNA comparison UI to compare multiple loans side-by-side.
- Export & interoperability: PDF generation (jsPDF + autoTable), export standardized data.
- Reports and compliance pages for aggregated views.
- Responsive layout with sidebar navigation and dashboard.
- Optional OpenAI integration for extraction/AI assistance (requires API key).
- React 19
- Vite
- Recharts (charts)
- Framer Motion (animations)
- lucide-react (icons)
- jsPDF + jspdf-autotable (PDF generation)
- pdfjs-dist (PDF parsing)
- openai (optional extraction assistant)
- dotenv
Prerequisites
- Node.js 18+ (or compatible)
- npm
Clone and install:
git clone https://github.com/BiyaMe/LMA-DNA.git
cd LMA-DNA
npm installAdd environment variables (optional, required only for OpenAI features):
Create a file named .env in the project root:
# .env
OPENAI_API_KEY=sk-...
Start the dev server:
npm run devOpen the app in your browser (Vite default):
Build for production:
npm run buildPreview the production build locally:
npm run previewDefined in package.json:
npm run dev— start development server (Vite)npm run build— create production buildnpm run preview— preview production build locally
- index.html — application entry page
- src/
- main.jsx — React entry
- App.jsx — root component and page routing state
- layout/ — Sidebar and layout components
- pages/ — Dashboard, Comparison, Export, DNAFullView, Reports, Compliance
- components/ — modal components (UploadModal), UI pieces
- services/ — extraction, scoring and utility services
- styles/ — global CSS
- utils/ — helpers
- dist/ — production output (built app)
- package.json — dependencies & scripts
- vite.config.js — Vite configuration
- Dashboard (Loan Intake) — landing + list of loans and quick insights.
- DNA Detail (DNAFullView) — full-detail view for a selected loan, visualizations and derived indicators.
- Comparison — compare DNA profiles of multiple loans.
- Export & Interoperability — generate PDFs and export machine-readable profiles.
- Reports — generate and view aggregated reports.
- Compliance — compliance-focused indicators and summaries.
- UploadModal — upload a loan PDF and run extraction.
- Sidebar — navigation between pages.
- OPENAI_API_KEY — (optional) API key for OpenAI integration used by the extraction/assistant service. If present, the app may use the OpenAI client to assist with extraction — otherwise extraction falls back to local/service implementations.
Note: the repository includes a .gitignore for node_modules and env files; do not commit secret keys.
- The application derives indicators from documents and displays them for review; it is not legal advice.
- Some extraction flows may require external services (e.g., OpenAI) — ensure relevant keys are provided if you want those features.
- PDF parsing and generation are handled client-side (pdfjs-dist + jsPDF). Large or complex PDFs can be memory intensive in-browser.
Contributions, issues and pull requests are welcome.
Suggested workflow:
- Fork the repo
- Create a feature branch
- Open a pull request with a clear description and screenshots if applicable
Please include tests or manual test instructions for non-trivial changes.
This project is released under the ISC License. See package.json for license metadata.
If you want any changes to this README (add examples, screenshots, or environment instructions), tell me what you'd like included and I can update it.