This is a submission for Weekend Challenge: Generosity Edition
What I Built
LendingChain is a decentralized, zero-interest micro-lending platform built on Solana Devnet to celebrate the UN International Day of Charity. It connects socially conscious global lenders with grassroots entrepreneurs in emerging economiesβspecifically focusing on clean energy, sustainable agriculture, indigenous women-led crafts, and tech education.
Unlike traditional charitable donations, where funds often disappear into administrative overhead, or commercial microfinance institutions that charge predatory 25%β45% APRs, LendingChain provides 0% interest capital directly to verified non-custodial Solana escrows. Our goal is to leverage sub-cent transaction fees to make $5β$25 micro-loans viable and transparent, allowing loan repayments to cycle back to the lender to be re-lent indefinitely (the "Generosity Multiplier").
Demo
Live Application: https://micro-lend.web.app
(Feel free to explore the interactive "Discovery" mode, fund a loan, or apply for a loan using the seamlessly embedded Solana wallet!)
Code
Astro Starter Kit: Minimal
npm create astro@latest -- --template minimal
π§βπ Seasoned astronaut? Delete this file. Have fun!
π Project Structure
Inside of your Astro project, you'll see the following folders and files:
/
βββ public/
βββ src/
β βββ pages/
β βββ index.astro
βββ package.json
Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/ directory.
π§ Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321
|
npm run build |
Build your production site to ./dist/
|
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run |
How I Built It
LendingChain is built with a modern, high-performance tech stack focused on a seamless user experience and cryptographic transparency:
Frontend Architecture: Built with Astro and React. I focused heavily on premium UI/UX, utilizing TailwindCSS, custom Vanilla CSS, and Framer Motion for micro-interactions (like magnetic buttons and smooth page transitions) to inspire trust and engagement.
Authentication & Web3: I integrated Privy to create frictionless, embedded Solana wallets. Users can log in with email or social accounts and immediately participate on-chain without needing a browser extension, or if they have a Solana wallet, they can use it too.
Backend & Real-time State: We migrated the loan applications ("Apply") and funding logic ("Lend") to Firebase Firestore. Using Firestore's
onSnapshotlisteners, the application state (total funds raised, lenders count) syncs in real-time across all connected clients.Blockchain Integration: We utilized the Solana Devnet to handle non-custodial escrows, leveraging the SPL Memo program to permanently record lenders' dedications and ensure verifiable impact tracking.
Deployment: The statically generated Astro frontend is deployed globally via Firebase Hosting.
A key technical challenge was smoothly transitioning from local mocked data to a live Firestore database while preserving the optimistic UI updates. I utilized Firestore transactions to safely update the loan's raised amounts and record the transaction document atomically when a user lends to a project.
Prize Categories
- Best Use of Solana: LendingChain relies on Solana's ultra-low fees to make micro-lending economically viable, using embedded wallets and SPL Memos for permanent on-chain transparency.
- Best Use of Google AI: Leveraged Google AI Studio and Gemini models to accelerate development, polish the application UI/UX, seamlessly migrate local state to Firebase Firestore, and streamline the Firebase Hosting deployment.
Top comments (0)