Under The Hood

The Robapp Architecture.

I built this because I really dont like nor do I have social media and instant messaging apps, yes, no whatsapp. So hey, why not just whip up my own.

Flutter (Dart)

For the mobile app side. Currently only avaible on Google Playstore until I get my new macbook.

Provider Local Auth

PHP & MySQL

A custom REST API handling authentication, invite generation, and data persistence. No frameworks—just optimized, raw PHP interacting with a normalized SQL schema.

PDO JWT REST

MQTT (Mosquitto)

Used for instant, sub-100ms message delivery while the app is open. MQTT provides a lightweight pub/sub model perfect for typing indicators and live chat.

Pub/Sub QoS 2

Janus WebRTC

Self-hosted WebRTC Gateway on a Linux VPS. It acts as an SFU (Selective Forwarding Unit) to manage audio/video streams, handling NAT traversal via STUN/TURN.

WebSockets DTLS-SRTP

Firebase (FCM)

Critical for waking the app from a "killed" state. Used for incoming call alerts (VoIP style) and background message notifications when MQTT is disconnected.

Cloud Functions HTTP v1 API

Tailwind & HTML5

The interface you're looking at right now. A clean, responsive design using utility-first CSS, interacting directly with the same PHP API used by the mobile app.

Engineering Challenges Solved

1

WebRTC Behind NAT

Setting up Janus on a VPS requires complex networking. I had to configure STUN/TURN servers to punch through firewalls and ensure the WebSocket connection (WSS) was properly secured with SSL behind an Nginx reverse proxy to prevent mixed-content errors.

2

The "Killed State" Problem

MQTT is great for live chat, but it dies when the app is closed. I implemented a dual-delivery system: if the user is online, they get the message via MQTT instantly. If offline, the PHP backend detects the disconnect and routes a high-priority FCM payload to wake the device up.

3

Synchronous PHP vs Async Needs

Sending emails and push notifications takes time. Since PHP is blocking, this would slow down the API response. I optimized this by handling media uploads and database commits first, returning a "Success" response to the UI immediately, and attempting the heavy lifting (notifications) as the final step of the execution flow.