Inspiration

Our team works in AI, and we have always been fascinated by the concept of Decentralized Federated Learning. But the real inspiration for PearUp came from the incredibly attractive idea of pure P2P decentralized systems. We wanted to merge these two passions to flip the model of traditional dating apps, which silo your sensitive behavioral data on centralized servers. We realized we could build a fully decentralized app where the algorithm collaboratively learns what features users prefer, without a central server ever seeing who anyone actually swipes on.

What it does

PearUp is a purely decentralized P2P dating app. Each device trains its own local neural network based on your swipes. The only data shared across the P2P network is the weight update (a small array of floats), never the raw swipe data. Any device in the swarm aggregates these updates using sample-weighted Federated Averaging (FedAvg) to build a collectively smarter matchmaking model. It also features zero-config auto-joining, persistent local user profiles, and direct encrypted P2P messaging.

How we built it

We built PearUp for the HackUPC 2026 hackathon using the Pear (Holepunch) protocol for true P2P decentralization.

  • P2P Networking: We utilized Hyperswarm for peer discovery via DHT and UDP hole-punching. We layered an epidemic relay protocol over it to ensure messages and weight updates reach peers even when direct hole-punching fails (e.g., across strict NATs or AP isolation).
  • Distributed Ledger: Hypercore serves as an append-only, tamper-proof weight log per peer, while Autobase handles multi-writer linearization to merge logs from all peers into one causal timeline.
  • Dual ML Implementation: We built a Pure-JS neural network (with an Adam optimizer and backprop from scratch) for the Pear app's Bare runtime, and a TensorFlow.js sequential model for Node.js testing and visualization. Both share the exact same weight serialization format.
  • UI & Viz: The frontend is a three-tab Electron renderer, and we built a separate WebSocket-based live dashboard with Chart.js to monitor the swarm's neural networks converging in real-time.

Challenges we ran into

Building a fully distributed machine learning network within the strict 36-hour hacking window of HackUPC was a massive race against the clock.

The biggest technical hurdle was scaling our P2P network. While connecting two or three peers together locally was straightforward, maintaining stable P2P connections for more than 3 users over the live network caused massive headaches, especially when dealing with proxies on certain public networks, such as the university one, that actively interfered with direct peer connections.

Additionally, because the Pear runtime uses Bare rather than full Node.js, we couldn't use native machine learning bindings. This forced us to write a custom Pure-JS neural network entirely from scratch. Let's just say doing raw math and backpropagation in pure JavaScript on zero sleep is never exactly fun.

Accomplishments that we're proud of

We are incredibly proud of bringing such a complex, multi-layered architecture to life in a single weekend. Specifically, we are thrilled with how three distinct parts of PearUp came together:

  • The UI: We designed and built a clean, intuitive, three-tab interface that makes swiping, editing your profile, chatting, and navigating the app feel incredibly smooth and responsive.
  • The Instant P2P Chat: Getting a fully decentralized, encrypted messaging system working directly between devices, with zero central servers and real-time delivery, is a major joy for us.
  • Distributed Federated Learning (DFL): Successfully building a functional DFL pipeline over a live Hyperswarm is our biggest technical achievement. Watching multiple peers train independently and collaboratively converge on a smarter matchmaking model, while ensuring raw user data never leaves the device, was an incredible moment for the team!

What we learned

We gained deep, hands-on experience with Decentralized Federated Learning (DFL), sample-weighted FedAvg mathematics, and the entire Holepunch P2P primitive stack (Hyperswarm, Hypercore, Autobase, Pear). We learned just how incredibly difficult it is to build these distributed systems from the ground up, but we also learned how empowering it is to work with a straightforward framework that handles a lot of the really difficult, dirty work for you, even if we still decide to get our hands quite dirty under the hood!

What's next for PearUp

For a production environment, we plan to implement real profiles loaded from a distributed Autobase-backed ledger (replacing mock data). We also want to layer on Differential Privacy (DP-SGD) and secure aggregation to completely cryptographically prevent any theoretical weight inference attacks. Finally, our next major milestone is getting PearUp fully deployed on Android so users can actually swipe on the go!

Built With

Share this project:

Updates