🤝 TrustPay - A Peer-to-Peer Lending Platform

“Bringing trust and transparency to peer lending, one OTP at a time.”


🔥 What Inspired Me

As a student constantly exposed to the struggles of financial access, I saw a huge gap in how people with urgent monetary needs are forced into high-interest debt traps. On the other side, many are willing to lend small amounts if there's trust, transparency, and a secure system in place.

That’s when the idea struck me — why not build a platform that connects trusted borrowers and lenders, powered by technology and simple enough to be used by anyone with a phone number?
TrustPay was born from this thought — a platform that values people over paperwork.


🛠️ How I Built It

  • Framework: Built on Flask for its simplicity and modularity.
  • Database: Used SQLite with SQLAlchemy ORM for easy data management.
  • Modular Structure: Followed Flask blueprint architecture for maintainability.
  • OTP System: Integrated Fast2SMS API and Twilio for secure mobile verification.
  • User Roles: Created role-specific dashboards and auth flows for Lenders and Borrowers.
  • Models: Designed custom models — Lender, Borrower, Loan, Ledger, OTP — to structure all operations cleanly.
  • Security: OTP verification adds an extra layer of authentication for trust.

📚 What I Learned

  • How to build a production-style Flask application using blueprints and factories.
  • Integration of 3rd party APIs like Twilio and Fast2SMS for OTP handling.
  • Designing relational databases with SQLAlchemy, and how to model real-world entities.
  • Writing clean, modular, and scalable Python code.
  • Handling edge cases like expired sessions, invalid OTPs, and user feedback through flashing messages.

🚧 Challenges I Faced

  • OTP Delivery Delays: Some APIs like Twilio needed verified numbers or credits. Fast2SMS API required DLT registration and an INR 100 transaction to work.
  • Session Handling: Maintaining OTP verification and phone numbers using session without breaking flows was tricky.
  • Database Setup: Running the database and managing app context without launching the main app required extra setup logic.
  • Blueprint Imports: Dealing with circular imports and maintaining modular routing took fine-tuning.

💡 Final Thoughts

This project is more than just code — it's a step towards empowering real people with real needs.
Whether you're lending ₹100 or ₹10,000, XChange ensures it’s built on trust, verification, and transparency.

Built with 💻, coffee ☕, and a whole lot of passion.


Share this project:

Updates