
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:
Desa Koperasi Quest Hub
Complete Legal & Accounting Quests:
๐ก 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()
}
๐ฎ๐ฉ Regulatory & Legal Compliance Engine
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.
- SAK EP Financial Ledger: Full Chart of Accounts (COA) with automated Balance Sheets and Cash Flow statements.
- Yarnen POS System: Handles cash transactions as well as harvest-credit (Yarnen) receivables ledger.
- Visual Store Shelf Planner: Built using
react-konvafor 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