I joined Yapin and ended up writing a client for it twice

by Ilyes Hernandez

4 min read

I joined Yapin on October 17. It was still called Yapper then. Six days earlier, a small YouTuber named Antic had put out a video about building his own Discord alternative with AI. It started as something he did for fun, and by the time I signed up, that video had brought a lot of people along with me. Antic's original video

My first impression was that if you changed the primary color back, large parts of the app could pass for Discord. I kept noticing little UI decisions that felt like what you get when you ask AI to reproduce a familiar interface and accept the first thing that looks close. Still, Antic had put his own money into it, people were showing up through his channel, and we could actually hang out in the thing he'd made. I liked it enough to stick around. Two or three days in, I was already wondering how hard it would be to change the parts that bothered me.

The first people who used Yapmod

I knew how to put a web app in a desktop window, and I wanted a Yapin app I could run on my Mac. With Tauri I could open Yapin in the system WebView and run a little JavaScript of my own once the page loaded. Yapin was small enough that I could find the piece of the interface I cared about, change it, and see the result right there in the app I was using. That prototype became Yapmod.

CSS themes let people change the colors themselves. JavaScript plugins could go a bit further and add things to the interface. I made a Yapin server for the project, and people joined, installed the client, and started asking when they could use their changes in a browser. Then they asked about phones. I'd picked a desktop window because that was what I wanted on my own machine. Nobody who'd come for the themes had much reason to care about that decision.

I also had to admit I'd done something pretty close to what bothered me about Yapin in the first place. I'd used AI heavily on the prototype. I tested what it produced, saw the feature working, and moved on to the next thing before I'd really read the code. That caught up with me when I tried to work out which parts a browser extension would need. Themes, plugins, and desktop behavior had all grown up together. Even I had trouble telling where one ended and the next began.

Writing it a second time

By late October I'd decided to start over. The question that helped me was a pretty mundane one. If I fixed a bug in a plugin, why should somebody have to download a new desktop app to get the fix?

I wrote the shared client first. It builds to one JavaScript file that can run wherever Yapin is open. The browser extension came next, which gave me somewhere to use the client with none of the desktop code around. Then I rebuilt the Tauri app. It could take care of the tray, notifications, and window controls while loading the same client I'd just used in a browser tab. Each piece got its own repository in the Yapmod organization. Yapmod on GitHub

That sounds tidy in a paragraph. It took me weeks. Say a plugin adds a section to Yapin's settings. You can get that section to show up once and think you're done. Then you navigate away and come back. Yapin uses React, the element you attached the section to is gone, and the plugin still thinks it's on the page. I wanted someone writing a character counter or a quick-reply button to be able to spend their time on that. Getting the client to handle those little disappearances, and to clean up properly when someone switched a plugin off, was a big part of the rewrite. More about the plugin system

The rebuilt client reached 1.0 on November 19. The desktop app followed on November 20. On November 23 I published the mobile build, an APK for Android and an IPA for iOS. Of everything I shipped that month, the phone version is the one that makes me happiest about the rewrite. Someone had asked me a perfectly reasonable question about using Yapmod on their phone. A month earlier my best answer was that I'd built it for my Mac. Now I could send them a file. First mobile release

What I'm building now

On November 28 I started writing Base, the community bot I'd wanted to build since my first days on Yapin. Running the little server around Yapmod meant I finally had a place of my own where I'd want to use it.

Base pairs a bot with a dashboard for the people who run a server. Moderation gives staff a private inbox for member reports and a history of the cases they've handled. News is where they can put together an announcement. There's also a separate message composer so they can draft a regular server message and see how it'll look before sending it. Welcome handles greetings when people join, Security handles things like member verification, and Analytics tracks activity such as joins, departures, and messages.

The part I care about most right now is what happens after someone submits a report. On the member's side, that should be a private conversation. On the staff side, the next moderator who comes along should be able to see what happened and whether anybody's dealt with it yet. Six weeks ago I was looking at Yapin and thinking about the color I'd change. Today I'm spending my time on what a moderator sees when they open that inbox. That's where building a client for a few people took me.