Back to Projects
fintech
2025-Present
Case Study

PayAll

LoRaWAN-based digital payment system with DAG blockchain, double-entry accounting, and mobile app.

Key Metrics

55K+

Lines of Code

200+

API Endpoints

32

Database Models

4

Applications

Overview

PayAll is a complete fintech ecosystem I solo-developed for Builderson Group. It's a LoRaWAN-based digital payment system designed for areas with limited internet connectivity. The system features a custom communication protocol, DAG blockchain for transaction verification, and a complete suite of applications including mobile app, backend, and admin dashboard.

My Role

Solo Developer & Architect

I designed and implemented the entire PayAll ecosystem from scratch - from the custom LoRaWAN protocol to the mobile application. This included protocol design, blockchain implementation, backend development, mobile app creation, and integration with LoRaWAN hardware.

Challenges

Offline-First Payment Processing

Traditional payment systems require constant internet connectivity. PayAll needed to work in areas with limited or no internet access, using LoRaWAN for transaction transmission.

Transaction Integrity Without Central Authority

Ensuring transaction validity and preventing double-spending without relying on a central server that might be unreachable was a fundamental design challenge.

Custom Protocol Over LoRaWAN

LoRaWAN has severe bandwidth limitations (max ~242 bytes per message). Designing an efficient protocol that could encode complete payment transactions within these constraints required creative solutions.

Financial Accuracy Requirements

Payment systems demand absolute accuracy in accounting. Implementing double-entry bookkeeping with proper audit trails while maintaining performance was critical.

Solutions

PayAll Protocol (PA001-PA955)

Designed a custom binary protocol optimized for LoRaWAN constraints. Each message type (PA001 for auth, PA100 for transactions, etc.) uses efficient encoding to maximize data within bandwidth limits.

DAG Blockchain with FPC Consensus

Implemented a Directed Acyclic Graph blockchain using Fast Probabilistic Consensus. This allows parallel transaction processing and eventual consistency even with intermittent connectivity.

ChirpStack Integration

Built a complete integration with ChirpStack for LoRaWAN gateway management. This handles device provisioning, message routing, and network server communication.

Double-Entry Accounting Ledger

Implemented a proper double-entry accounting system where every transaction creates balanced debit/credit entries. This ensures financial accuracy and complete audit trails.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    CLIENT APPLICATIONS                          │
├─────────────────────────────────────────────────────────────────┤
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐         │
│  │ Flutter      │  │ Admin        │  │ Merchant     │         │
│  │ Mobile App   │  │ Dashboard    │  │ Terminal     │         │
│  └──────────────┘  └──────────────┘  └──────────────┘         │
└─────────────────────────────────────────────────────────────────┘
           │                    │                    │
           ▼                    ▼                    ▼
┌─────────────────────────────────────────────────────────────────┐
│                    COMMUNICATION LAYER                          │
│  ┌──────────────────────┐  ┌──────────────────────┐           │
│  │ REST API (Internet)  │  │ LoRaWAN (Offline)    │           │
│  └──────────────────────┘  └──────────────────────┘           │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    PAYALL BACKEND                               │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐         │
│  │ PayAll       │  │ Transaction  │  │ Accounting   │         │
│  │ Protocol     │  │ Processor    │  │ Engine       │         │
│  │ Handler      │  │              │  │              │         │
│  └──────────────┘  └──────────────┘  └──────────────┘         │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐         │
│  │ User         │  │ Wallet       │  │ Audit        │         │
│  │ Management   │  │ Service      │  │ Logger       │         │
│  └──────────────┘  └──────────────┘  └──────────────┘         │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    BLOCKCHAIN LAYER                             │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                  DAG BLOCKCHAIN                           │  │
│  │  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐     │  │
│  │  │ Block 1 │──│ Block 2 │──│ Block 3 │──│ Block N │     │  │
│  │  └─────────┘  └─────────┘  └─────────┘  └─────────┘     │  │
│  │                  FPC Consensus Engine                     │  │
│  └──────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    LORAWAN INFRASTRUCTURE                       │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐         │
│  │ ChirpStack   │  │ LoRa         │  │ Device       │         │
│  │ Network      │  │ Gateways     │  │ Registry     │         │
│  │ Server       │  │              │  │              │         │
│  └──────────────┘  └──────────────┘  └──────────────┘         │
└─────────────────────────────────────────────────────────────────┘

Technical Highlights

Custom LoRaWAN Protocol

Designed the PayAll Protocol (PA001-PA955) - a binary protocol optimized for LoRaWAN's 242-byte message limit. Includes message types for authentication, transactions, balance queries, and system commands.

DAG Blockchain Implementation

Built a Directed Acyclic Graph blockchain from scratch with Fast Probabilistic Consensus. This allows parallel transaction validation and handles network partitions gracefully.

Biometric Authentication

Integrated fingerprint and face recognition in the Flutter app for secure transaction authorization. Combined with device binding for additional security layers.

Double-Entry Accounting

Implemented a complete double-entry bookkeeping system with 32 database models. Every transaction creates balanced journal entries ensuring financial accuracy.

Offline Transaction Queue

Built a robust offline queue that stores transactions locally and syncs when connectivity is available. Handles conflict resolution and ensures eventual consistency.

Results & Impact

55K+

Lines of Code

200+

API Endpoints

32

Database Models

4

Integrated Applications

PA955

Protocol Messages

Lessons Learned

  • LoRaWAN's bandwidth constraints force elegant, efficient protocol design
  • DAG blockchains are better suited for IoT applications than traditional linear chains
  • Double-entry accounting is non-negotiable for financial systems - shortcuts create nightmares
  • Offline-first architecture requires careful thought about conflict resolution
  • Solo development of complex systems requires excellent documentation habits

Technologies Used

FastAPI Flutter PostgreSQL Redis LoRaWAN ChirpStack Blockchain

Interested in Similar Work?

I'm available for freelance projects and full-time opportunities. Let's discuss how I can help bring your ideas to life.

Get in Touch