Skip to content

BiyaMe/LMA-DNA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loan DNA™ (LMA-DNA)

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.

Overview

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.


Features

  • 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).

Tech stack

  • 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

Getting started

Prerequisites

  • Node.js 18+ (or compatible)
  • npm

Clone and install:

git clone https://github.com/BiyaMe/LMA-DNA.git
cd LMA-DNA
npm install

Add 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 dev

Open the app in your browser (Vite default):

http://localhost:5173

Build for production:

npm run build

Preview the production build locally:

npm run preview

Development scripts

Defined in package.json:

  • npm run dev — start development server (Vite)
  • npm run build — create production build
  • npm run preview — preview production build locally

Project structure (important files/folders)

  • 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

Pages & components

  • 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.

Environment variables

  • 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.


Usage notes & known limitations

  • 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.

Contributing

Contributions, issues and pull requests are welcome.

Suggested workflow:

  1. Fork the repo
  2. Create a feature branch
  3. Open a pull request with a clear description and screenshots if applicable

Please include tests or manual test instructions for non-trivial changes.


License

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.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors