Adr
ADR 0001 — Rebuild instead of extending LoanReady
Why Kredal is a fresh build rather than an extension of the LoanReady prototype.
- Status: Accepted
- Date: 2026-07-13
Context
The repository already contained LoanReady, a vanilla-JS single-page app (hash router,
window.* globals, CDN Tailwind) with a per-user transactions/scores schema and a Gemini API
call made client-side with a user-pasted key. Kredal targets a different, more sensitive
domain (passports, Emirates IDs, UBO documents) and a different data model (workspaces →
companies).
Decision
Rebuild Kredal from scratch as a new Next.js + Supabase app in kredal-app/, keeping
LoanReady in the repo as reference only.
Consequences
- Positive: a secure server-side architecture; a workspace-scoped schema; a stack that matches the tech spec; no legacy client-side secret exposure.
- Negative: no direct code reuse. Mitigated by harvesting patterns (RLS shape, scoring structure, extraction prompts, landing copy) rather than code.
- LoanReady's transaction-based scoring is retained as reference for a future Open-Finance bankability score.