GithubHelp home page GithubHelp logo

afullsnack / baggit-tbdex-hack Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 561 KB

A wallet powered by the TBDex Decentralised Identity and Verifiable Credentials infrastructure

JavaScript 0.26% CSS 2.33% TypeScript 97.41%

baggit-tbdex-hack's Introduction

Edit in Eraser

BAGGIT - TBDex Hackathon

Project Overview

This project aims to develop a robust wallet, built on top of the TBDex protocol for unlocking frictionless commerce and financial access globally, for efficient and secure cross-border payment system. OUr solution leverages modern technologies and architectural patterns to address the complexities of international money transfers, focusing on speed, cost-effectiveness, and regulatory compliance.

Problem Statement

Traditional cross-border payments face several challenges:

  • Hight fees and hidden costs
  • Slow transaction speeds
  • Lack of transparency in exchange rates and transaction status
  • Complexity in navigating different regulatory environments
  • Security concern and fraud risks Our system aims to address these issues by providing a streamlined, transparent, and secure platform for international money transfers.

Architecture

We've adopted a micro-service architecture to ensure modularity, scalability, and ease of maintenance. The system is built on a cloud-native infrastructure, utilising containerisation and orchestration technologies.

Hight Level Architecture

+----------------+    +----------------+    +----------------+
|   User         |    |  Payment       |    |  Currency      |
|   Interface    | <- |  Processing    | <- |  Exchange      |
|   Service      |    |  Service       |    |  Service       |
+----------------+    +----------------+    +----------------+
         ^                    ^                     ^
         |                    |                     |
         v                    v                     v
+----------------+    +----------------+    +----------------+
|  Authentication|    |  Compliance    |    |  TbDex        |
|  & Authorization|   |  Service       |    |  protocol     |
+----------------+    +----------------+    +----------------+
         ^                    ^                     ^
         |                    |                     |
         v                    v                     v
+----------------+    +----------------+    +----------------+
|  Notification  |    |  TbDex pro-    |    |  Partner Fin-  |
|  Service       |    |  tocol.        |    |  anceial Inst. |
+----------------+    +----------------+    +----------------+

image.png

View on canvas

Design Considerations

  1. Decoupled Services: Each micro-service is responsible for a specific business capability, allowing for independent scaling and deployment.
  2. Event-Driven Architecture: Asynchronous communication between services using message queues ensures loose coupling and improve system resilience.
  3. **API Gateway: **Centralised entry point for all client requests, handling authentication, rate limiting, and request routing
  4. **Data Consitency: **Implementing the saga pattern for distributed transaction to maintain data consistency across services.
  5. **Observability: **Comprehensive logging, monitoring, and tracing across all services for easier debugging and performance optimisation.
  6. **Regulatory Compliance: **Built-in compliance checks and audit trails to meet international financial regulations.

Technology Stack

  • Backend: NodeJS, NextJS server actions for simplicity of implementation with the client., HonoJS for proxy services and speed.
  • **Frontend: **React with Typescript.
  • **Databse: **SQLite for lightweight transactional data
  • **Message Broker: **NATS.io, nats-ws (websocker)
  • **CI/CD: **Github actions
  • **Monitoring: **Prometheus, Grafana, ELK Stack

Key Components

  1. User interface: Handles user interactions where user chooses currency pairs to swap/convert, interact with PFI's, and presenting users with the best option in terms of their filter as well as comparability functionality for users to compare between multiple offers, and process their payments
  2. Payment processing service: Finalising payment is outside fo TBDex there was a need for a payment processing service to enable smooth transaction flow after an agreement has been reached with PFI
  3. Compliance Service: KYC/AML checks and regulatory reporting.
  4. TBDex Service: Create user DID's and issue verifiable credentials. Securely store user VC's. Seamlessly retrieve and provided user VC to requesting PFI

Data Flow

  1. User initiates a transaction through the UI interface.
  2. Transaction request is validated and routed to the TBDex service to fetch PFI offerings.
  3. Compliance Service performs necessary checks for new users.
  4. Currency Exchange Service calculates the exchange rate.
  5. Payment Processing Service coordinates the transaction execution.
  6. Notification Service keeps the user informed throughout the process.

Security Considerations

  • End-to-end encryption for all data in transit and at rest
  • Multi-factor authentication for user accounts
  • Regular security audits and penetration testing
  • Compliance with PCI DSS for handling payment card information
  • Implement rate limiting and fraud detection algorithms

Scalability

  • Horizontal scaling of micro-services based on load
  • Database sharding for improved read/write performance
  • Caching layer (e.g., Redis) for frequently accessed data
  • CDN integration for static assets and improved global performance

Future Enhancements

  1. Integration with blockchain networks for certain payment corridors
  2. AI-powered fraud detection system and reputation analysis
  3. Expansion of supported currencies and payment methods
  4. Mobile app development for iOS and Android platforms
  5. Enhanced analytics and business intelligence features

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about the project and TBDex, take a look at the following resources:

Deploy on Vercel

The easiest way to deploy the project is to use the Vercel Platform

Check out our Next.js deployment documentation for more details.

Diagrams

baggit-tbdex-hack's People

Contributors

afullsnack avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.