Building PAKDE: Offline-First Village Co-op Software Powered by Tauri v2 & Gamification


In most 48-hour hackathons, the default instinct is to spin up a Next.js cloud web app or a React Native mobile app. Itโ€™s convenient, familiar, and easy to copy-paste.

However, rural village reality doesnโ€™t care about developer convenience.

When building PAKDE (Penguat Administrasi Koperasi Desa Offline-First), we designed for real-world conditions: spotty 3G village connections, low-spec desktop PCs, and complex double-entry SAK EP accounting compliance.

Here is whyโ€”and howโ€”we built PAKDE using Tauri v2 (Rust), React 19, SQLite (SQLCipher), and a Duolingo-inspired RPG gamification engine.


๐ŸŽฎ Try the Interactive Quest Engine Demo

Below is an interactive live preview of PAKDEโ€™s Sense of Direction quest hub. In the desktop application, completing daily accounting and legal compliance quests awards XP and levels up the village co-opโ€™s RAG status:

Interactive Demo โ€ข PAKDE Simulator

Desa Koperasi Quest Hub

RAG Status: DEVELOPING (Madya)
Village Guild Level
Level 2
Co-op Governance XP
350 XP
Crypto Security
๐Ÿ”’ SQLCipher + HMAC

Complete Legal & Accounting Quests:

Complete Daily Yarnen POS Reconciliation
Legal: UU No. 25/1992 Art. 30
+100 XP
Run SAK EP General Journal Audit
Legal: SAK EP Financial Compliance
+150 XP
Generate Member SHU Surplus Dividend Draft
Legal: SHU Dividend Rule
+200 XP

๐Ÿ’ก The Anti-Hackathon Trope Philosophy

Why reject traditional Cloud SaaS and Mobile Apps for rural administration?

Challenge Why Web Cloud SaaS Fails Why Mobile App Fails The PAKDE Solution (Tauri v2 + Rust)
Connectivity Freezes on 3G/4G packet loss Fails during local ISP blackouts 100% Offline-First (Local SQLite)
Screen Real Estate N/A Screens are too small for SAK EP ledgers & shelf planners Desktop Native (Optimized for wide screens)
Hardware & Storage Heavy JS bundles lag on old PCs Storage full of WhatsApp media & bloatware ~10MB Executable (Runs off a USB flash drive)

โš™๏ธ Core Technical Architecture

PAKDE combines high-performance Rust desktop bindings with modern React frontend components:

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚                   PAKDE Tauri v2 Desktop                    โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚    React 19 + TypeScript     โ”‚   Rust Backend Engine        โ”‚
  โ”‚    - Zustand State           โ”‚   - SQLCipher (AES-256)      โ”‚
  โ”‚    - React-Konva Shelf Plan  โ”‚   - HMAC Progress Signer     โ”‚
  โ”‚    - Gamification Quest UI   โ”‚   - Zero-Knowledge Sync      โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”’ Cryptographic Progress Signing & Encrypted Database

To prevent local stat-tampering while maintaining zero cloud dependence, PAKDE cryptographically signs local XP and quiz achievements using HMAC-SHA256:

// Rust Backend (Tauri v2) - Securing local progress state
use hmac::{Hmac, Mac};
use sha2::Sha256;

#[tauri::command]
pub fn verify_quest_completion(quest_id: &str, xp_earned: u32, secret_key: &[u8]) -> bool {
    let mut mac = Hmac::<Sha256>::new_from_slice(secret_key).expect("HMAC can take key of any size");
    mac.update(format!("{}:{}", quest_id, xp_earned).as_bytes());
    
    // Validate integrity before updating SAK EP ledger
    mac.verify_slice(&get_saved_signature(quest_id)).is_ok()
}

PAKDE translates complex statutory requirements into straightforward RPG quests:

[!IMPORTANT] UU No. 25/1992 Legal Integration: Every step of cooperative governanceโ€”from mandatory initial savings (Simpanan Pokok) to annual member assemblies (RAT) and surplus distribution (SHU)โ€”is enforced as a level requirement.

  1. SAK EP Financial Ledger: Full Chart of Accounts (COA) with automated Balance Sheets and Cash Flow statements.
  2. Yarnen POS System: Handles cash transactions as well as harvest-credit (Yarnen) receivables ledger.
  3. Visual Store Shelf Planner: Built using react-konva for village WASERDA retail layout optimization.

๐Ÿš€ Get Started with PAKDE

Pre-built native installers are available for Windows and macOS:

Written by Okihita โ€ข Published on okihita.dev