Skip to content

Latest commit

 

History

History
388 lines (300 loc) · 21.9 KB

File metadata and controls

388 lines (300 loc) · 21.9 KB
Loanzo App Logo

LOANZO

Next-Generation Decentralized Peer-to-Peer (P2P) Microfinance & Social Lending Protocol

Empowering transparent, purpose-bound lending with mathematical rigor, zero-scam architecture, and institutional compliance.


Kotlin Version Android SDK Jetpack Compose Room Database Dagger Hilt Firebase License

🌟 Highlights📱 Screenshots🛡️ Scam-Free Guarantee🏗️ Architecture🔄 Lifecycle🗄️ Database📚 Docs & Comics⚡ Quickstart


📖 Executive Summary

Loanzo is an enterprise-grade Android microfinance platform engineered to bridge the gap between credit-worthy borrowers and private retail lenders. By combining direct peer-to-peer social bidding (Lenme style), purpose-bound merchant disbursements, multi-asset collateral vaulting (Gold, Property, Hardware, Vehicles, Invoices), DigiLocker biometric e-Sign, and an automated Telegram & FCM alert desk, Loanzo completely eliminates fraudulent loan scams, predatory interest traps, and unmonitored fund diversion.

Built purely in Modern Android (Jetpack Compose, Clean Architecture, Room v12, Kotlin Coroutines & Flow), Loanzo provides offline-first resiliency, military-grade client-side encryption, and seamless cloud synchronization with both Google Drive and Firebase.


📱 Application Visual Showcase & Screenshots

Live production interfaces captured from the Loanzo Android client, demonstrating biometric authentication, peer-to-peer social bidding, legal promissory note execution, and UPI escrow disbursement.

🔐 Multi-Role Login & Biometrics 🛡️ Encrypted Document Vault Gate 📊 Executive Dashboard & P2P Feed 🔔 Activity & Alerts Hub
Login and Role Selection Auth and Biometric Gate Home Dashboard Activity Alerts
Multi-Role Authentication
Member, Agent, Admin role selection with BiometricPrompt
Hardware KeyStore Vault
AES-256 encrypted KYC & biometric security gate
Social P2P Marketplace
Live loan bids, repayment trackers, & portfolio health metrics
Automated Alert Desk
Instant Telegram Bot (@Loanzo_bot) & FCM push notifications
📜 Promissory Note & Legal Lien ⚙️ Radial Action Controller 🏦 Verified Bank Accounts 📲 Instant Dynamic UPI Payment
Loan Agreement Radial Menu Bank Accounts UPI QR
Section 4 NI Act 1881
4-page automated promissory note with legal stamp & audit hash
Radial Navigation
One-touch satellite menu for borrow, lend, and valuer dispatch
NPCI Penny Drop Validation
Automated IFSC & bank account verification with zero fraud
Direct Merchant Escrow
Dynamic QR code with checksum audit for distributor tranches

🌟 Key Innovations & Core Features

1. 🎯 Purpose-Linked Tranche Disbursements

  • Rather than releasing lump-sum cash directly into borrower accounts where funds can be misappropriated, disbursements are released in verified milestones (Tuition, Hospital Invoices, Raw Materials).
  • Direct Payee Settlement: Capital is dispatched straight to verified vendor / institution UPI accounts with mandatory invoice verification.

2. ⚡ Lenme-Style Social Bidding Marketplace

  • Borrowers post loan requests specifying purpose, target amount, duration, and maximum APR.
  • Verified retail lenders compete to fund the loan by placing competitive APR and tenure bids.
  • Borrowers review lender ratings, trust scores, and bid terms before accepting the optimal offer.

3. ⚖️ Mathematical Compound Penalty Engine

  • Fully automated, deterministic penalty calculation with zero human discretion.
  • Grace Period: 3-day grace period with zero compounding fees.
  • Fair Lending Compliance (RBI/2023-24/53): Transparent daily charge capped at RBI 2% monthly ceiling without capitalizing into principal to prevent predatory debt traps.

4. 🧭 Interactive Onboarding & Step-by-Step Guided Tours

  • Welcome Onboarding Carousel: 4-slide interactive overview with progress pill indicators and smooth swiping.
  • Contextual First-Visit Guides: Floating glass tooltip cards on Dashboard, Loans, Marketplace, and Profile.
  • Blinking Navigation Beacons: Ambient gold glow pulse highlighting unvisited tabs with contextual tooltips.
  • 5 Guided Interactive Tours: Step-by-step walkthroughs (How to Request a Loan, Setting Up Your Profile, Using the Marketplace, Track Your Loans, Document Vault and Security).

5. 🔐 Zero-Flicker Session Gate & Fluid Transitions

  • Session Gate: Eliminates cold-start login flash by evaluating session state inside an ambient breathing-pulse Splash Screen.
  • Shared-Axis Horizontal Slide Transitions: 320ms 25% parallax animations across outer and sub-page navigations.
  • Predictive Back Navigation: Native gesture animations enabled via android:enableOnBackInvokedCallback.

6. 🛡️ Encrypted Document Vault & Biometric Access

  • Client-side AES-256-GCM encrypted storage for Aadhaar, PAN, and title deeds.
  • Protected by biometric authentication (fingerprint / face unlock) and PIN gateway.
  • Automated daily backup and synchronization to Google Drive via Google Drive REST API v3.

7. 🤖 Automated Telegram Admin & 24/7 Assistant Bot

  • Integrated Telegram Assistant Bot (@Loanzo_bot) for instantaneous loan status lookups and counterparty notifications.
  • Emergency Dispute & Delinquency Dispatch center sending immediate real-time enforcement alerts to the admin desk.

8. 🕵️ Certified Field Agent & Doorstep Verification Network

  • Post-KYC Role Partitioning: Choose between Normal Member (borrowing & lending) or apply to become a Loanzo Certified Agent (earning ₹500 – ₹1,500/visit).
  • Bank-Grade Empanelment Form: Captures verification background, Police Clearance Certificate (PCC) verification, operational territory radius (5 km - 50 km), and vehicle details with a formal legal clean-record declaration.
  • Master Admin Approval Console: Direct review queue in the App Owner Hub (@satyam0810) with one-tap empanelment approvals, rejections, and automatic visit seeding.
  • Isolated Field Agent Control Center: Strict role isolation prevents agent access to consumer borrowing/lending features; provides live on-duty/break toggles, daily earnings meters, categorized visits feeds (Collateral Assaying, Borrower Residence, Lender Verification), direct Call/WhatsApp/Maps navigation, and an in-app appraisal checklist with live photo audit capture.

9. 🛡️ Multi-Asset Collateral Vault & Escrow Architecture

Unlike single-asset pawn systems, Loanzo supports 5 distinct collateral categories tracked in SQLite Room v12 (CollateralVaultEntity):

  • Precious Bullion (GOLD): 22K/24K Hallmarked Gold Jewelry (48.5g), Coins, certified touchstone/density assay (75% LTV ceiling benchmarked to IBJA 30-day average).
  • Property Title Deeds (PROPERTY_DEED): Registered Commercial & Residential Deeds, Khata extracts, Non-Encumbrance Certificate & legal search audit (50%–60% LTV).
  • Commercial IT Equipment (EQUIPMENT): Apple MacBook Pro M2, studio cameras, lab workstations, serial inspection, MDM unlock, and purchase invoice encumbrance (40%–50% LTV).
  • Vehicles & Fleet (VEHICLE): Two-wheelers (Yamaha FZ-S), light commercial vehicles, Vahan RC Book custody & Form 34 hypothecation endorsement (55%–65% LTV).
  • Trade Receivables & Invoices (INVOICE): B2B GSTIN tax invoices with direct wholesaler UPI payment (distributor@bank) to prevent fund diversion (70%–80% LTV).

🛡️ Institutional Scam-Free Guarantee

Traditional lending and predatory instant-loan apps suffer from fake lenders, upfront processing fee extortions, and abusive harassment. Loanzo's cryptographic architecture eliminates these vulnerabilities:

Vulnerability Vector Predatory Loan Apps / Unregulated Platforms Traditional Banking System Loanzo P2P Protocol
Upfront Fee Scams 🚨 Fake processing fees charged before disbursal Minimal upfront fees, heavy paper appraisal 🛡️ Zero Upfront Fees. No advance payment ever demanded
Fund Misuse / Gambling ❌ Lump sum sent directly to borrower ⚠️ High administrative delays and checks 🎯 Purpose-Bound Tranches. Direct settlement to verified merchants
Harassment & Defamation 🚨 Contact book scraping and shaming calls Formal recovery, civil suits ⚖️ In-App Dispute Center. Automated Telegram legal alerts & arbitration
Interest Rate Traps 🚨 100%–300% annualized hidden rates Rigid 12%–18% fixed parameters 🤝 P2P Marketplace Bidding. Market forces drive competitive low APRs
Collateral Fraud ❌ Unverified verbal pledges Tedious branch physical custody 🔍 Multi-Asset Valuer Protocol. Barcoded tamper-evident seal & live IBJA rates
Identity Theft ❌ Uploaded plain photos stored insecurely Physical KYC photocopy collection 🔐 DigiLocker e-Sign. Cryptographically signed tamper-proof contract

🏗️ System Architecture

Loanzo is built strictly adhering to Clean Architecture principles and the MVI / MVVM design pattern.

flowchart TD
    subgraph Presentation_Layer ["Presentation Layer"]
        A1["Jetpack Compose UI Screens"]
        A2["Material 3 Dynamic Theme"]
        A3["Navigation Graph & Transitions"]
        A4["ViewModels StateFlow / SharedFlow"]
        A5["Onboarding & Guided Tours"]
    end

    subgraph Domain_Layer ["Domain Layer"]
        B1["Penalty Engine - Fair Lending"]
        B2["Restructuring Engine - EMI Extension"]
        B3["Rule Engine - Purpose Validation"]
        B4["Use Cases & Business Workflows"]
    end

    subgraph Data_Layer ["Data Layer"]
        C1["Loanzo Database - Room v12 SQLite"]
        C2["13 Data Access Objects (DAOs)"]
        C3["Encrypted DataStore Preferences"]
        C4["Offline-First Repositories"]
    end

    subgraph External_Layer ["External Services Layer"]
        D1["Firebase Firestore & Sync"]
        D2["Firebase Cloud Messaging (FCM)"]
        D3["Google Drive Cloud Backup API v3"]
        D4["DigiLocker Verification Gateway"]
        D5["Telegram Bot Alert Desk"]
    end

    Presentation_Layer --> Domain_Layer
    Domain_Layer --> Data_Layer
    Data_Layer --> External_Layer
Loading

🔄 Loan Lifecycle State Machine

Each loan navigates through a strictly governed state machine preventing any unauthorized state jump:

stateDiagram-v2
    [*] --> DRAFT: Borrower Creates Request
    DRAFT --> MARKETPLACE: Listed on Bidding Feed
    MARKETPLACE --> BID_ACCEPTED: Borrower Accepts Offer
    BID_ACCEPTED --> COLLATERAL_VALUATION: Collateral Verification (If Required)
    COLLATERAL_VALUATION --> CONTRACT_SIGNING: Field Valuer Seals Asset
    BID_ACCEPTED --> CONTRACT_SIGNING: No Collateral Required
    CONTRACT_SIGNING --> TRANCHE_DISBURSEMENT: DigiLocker e-Sign Executed
    TRANCHE_DISBURSEMENT --> ACTIVE_SERVICING: Verified Milestone UPI Tranche Sent
    ACTIVE_SERVICING --> RESTRUCTURED: Restructure Approved
    RESTRUCTURED --> ACTIVE_SERVICING: New Schedule Active
    ACTIVE_SERVICING --> DELINQUENT: Due Date + Grace Period Passed
    DELINQUENT --> LEGAL_DISPUTE: Penalty Accrued and Admin Alert Sent
    ACTIVE_SERVICING --> COMPLETED: All EMIs Cleared
    LEGAL_DISPUTE --> COMPLETED: Arbitrated Settlement
    COMPLETED --> [*]: Tamper-Proof Digital NOC Issued
Loading

🗄️ Database Architecture (Room v18)

Loanzo uses an offline-first Room Database v12 with 13 relational entities ensuring zero data loss even during network disconnections:

🔍 Expand to View All 13 Core Database Entities
Entity Primary Key Description
UserEntity userId User profile, role flags (Borrower, Lender, Agent, Admin), trust score, agentStatus, onDuty status, earnings
AgentApplicationEntity applicationId Field agent empanelment applications (experience, PCC date, police station, transport, radius, DL number)
AgentVisitEntity visitId Physical verification visits (Collateral, Borrower, Lender), address, GPS coordinates, payout, inspection status
LoanEntity loanId Complete loan contract metadata, interest rate, duration, status, purpose category, and signatures
RepaymentEntity repaymentId Individual EMI schedules, due dates, penalty accruals, payment UTR hashes, and verification receipts
DisbursementEntity disbursementId Tranche milestone definitions, approved amounts, payee UPI IDs, and invoice attachment links
MarketplacePostEntity postId Social marketplace lending listings, maximum acceptable APR, and active bid counts
MarketplaceBidEntity bidId Lender offers submitted against marketplace posts (proposed APR, tenure, collateral terms)
VerificationEntity verificationId DigiLocker KYC certificates, Aadhaar / PAN hash validations, and status flags
NotificationEntity notificationId In-app notification center alerts, EMI reminders, bid alerts, and settlement logs
CollateralVaultEntity vaultItemId Multi-asset physical collateral metadata (Gold, Property, Hardware, Vehicles, Invoices, barcode seal)
GuarantorEntity guarantorId Co-borrower and joint-liability guarantor verification records and signatures
AuditLogEntity logId Immutable audit trail capturing every system event, balance transfer, and dispute submission

👥 User Personas & RBAC Security Matrix

Loanzo incorporates an institutional Role-Based Access Control (RBAC) architecture:

classDiagram
    class UserEntity {
        +String userId
        +String name
        +String phone
        +UserRole role
        +Int trustScore
        +Boolean isBiometricRegistered
    }

    class UnifiedUser {
        +switchRole(role)
        +viewPersonalDashboard()
        +accessDocumentVault()
    }

    class PrimaryBorrower {
        +postMarketplaceListing()
        +requestTrancheDisbursement()
        +executeDigiLockerESign()
        +applyForEMIRestructure()
    }

    class VerifiedLender {
        +browseMarketplaceFeed()
        +submitCompetitiveBids()
        +verifyPayeeDisbursal()
        +trackInvestmentPortfolio()
    }

    class DoorstepValuer {
        +performPhysicalAssaying()
        +logLiveAssetValuation()
        +scanTamperProofSeals()
    }

    class PlatformAdmin {
        +monitorDelinquencyAndDisputes()
        +receiveTelegramAlerts()
        +freezeBadActors()
    }

    UserEntity <|-- UnifiedUser
    UnifiedUser <|-- PrimaryBorrower
    UnifiedUser <|-- VerifiedLender
    UserEntity <|-- DoorstepValuer
    UserEntity <|-- PlatformAdmin
Loading

📚 Publications & Engineering Reports

All project research, master documentation, system architectural blueprints, and full graphic novel comic books are committed directly to this repository:

Document / Asset Format Location Description
Loanzo Full Project Report PDF docs/reports/ Master Technical Engineering Document covering SRS, IEEE 829 testing strategy, RBAC, Room v18 ERDs, and mathematical models
Loanzo Master Executive Report PDF docs/reports/ Executive Pitch Deck & Regulatory System Report covering multi-asset collateral, verified data sources, RBAC, and FMEA risk matrix
Loanzo Master Presentation PPTX docs/reports/ Investor & Institutional Pitch Presentation for financial institutions and regulatory auditors
Loanzo Speaker Pitch & Defense Guide Markdown docs/reports/ Comprehensive Speaker Pitch Script & System Defense Guide covering fraud-proof architecture and economic models
Loanzo Unified Master Graphic Novel PDF docs/reports/ Complete Graphic Novel Edition illustrating borrower-lender mechanics, fraud mitigation, and tranche disbursements
Loanzo Manga Edition PDF docs/reports/ Manga Narrative detailing micro-entrepreneurs transitioning to secure institutional P2P finance

⚡ Quickstart & Developer Setup

Prerequisites

  • Android Studio: Ladybug (2024.2.1) or Koala (2024.1.1)+
  • JDK: Java Development Kit 17 (Azul Zulu 17 or OpenJDK 17 recommended)
  • Android SDK: API 34 (UpsideDownCake) with SDK Build-Tools 34.0.0
  • Gradle: 8.7+ (Wrapper included via gradlew)

1. Clone the Repository

git clone https://github.com/Satya0810/Loanzo.git
cd Loanzo

2. Configure Environment Keys

Create or verify your local.properties file in the root directory:

sdk.dir=C:\Users\<your-username>\AppData\Local\Android\Sdk

3. Build & Assemble Debug APK

Compile the codebase and assemble the production-ready debug APK:

# On Windows PowerShell / Command Prompt
.\gradlew.bat assembleDebug

# On macOS / Linux
./gradlew assembleDebug

The compiled APK will be generated at:

app/build/outputs/apk/debug/app-debug.apk

4. Run Unit & Architecture Tests

.\gradlew.bat testDebugUnitTest

🛠️ Technology Stack Breakdown

Area Technologies / Libraries
Language Kotlin 2.0.21 (with K2 Compiler)
UI Framework Jetpack Compose (BOM 2024.09.00), Material 3, Accompanist Navigation Animation
Asynchronous Kotlin Coroutines 1.8.0, Flow, StateFlow, SharedFlow
Dependency Injection Dagger Hilt 2.51.1, Hilt Navigation Compose 1.2.0
Local Persistence AndroidX Room Database 2.6.1 (SQLite v12), Encrypted DataStore Preferences
Background Processing AndroidX WorkManager 2.9.0 (Periodic Background Sync Worker)
Biometrics & Security AndroidX Biometric 1.1.0, Android KeyStore AES-256-GCM
Cloud & Realtime Firebase Firestore, Firebase Cloud Messaging (FCM), Firebase Authentication
Storage & Drive Google Drive REST API v3, Google Play Services Auth
Alerts & Bot Telegram Bot HTTP API, Retrofit 2, OkHttp 3 Logging Interceptor
Serialization Kotlinx Serialization, Google Gson

📱 Navigation & Screen Directory

com.loanzo.app
├── ui
│   ├── auth              # Login, Splash, Session Gate, Biometric Setup, KYC, Profile & Vault
│   ├── components        # Onboarding Carousel, Guided Tours, Blinking Tooltips, SwipeConfirm
│   ├── dashboard         # Home Command Center, Action Sheets (Chat/Report/Simulator), Financial Health
│   ├── loan              # Request Loan, Calculator, Tranche Requests, Agreement e-Sign, Guarantor
│   ├── marketplace       # P2P Social Bidding Feed, Post Details, Place Bid Sheet, Bid Acceptance
│   ├── notification      # Real-time System Notification Center & Audit Alert Logs
│   └── navigation        # NavGraph, Shared-Axis Horizontal Slide Specs, Routes Definition
├── domain                # Penalty Engine, Restructuring Engine, Purpose-Linked Rule Engine
├── data                  # Room v12 Database, DAOs, Entities, Firebase Sync, Drive Cloud Backup
└── util                  # Agreement Generator, BiometricAuthManager, ReportExporter, TelegramManager

🤝 Project Governance & License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Developed with precision and passion by Satyam Kumar and the Loanzo Engineering Team.


🌟 If you find this project informative or valuable, please consider giving it a star on GitHub! 🌟

Back to Top ↑