lukasz-mical

$ cd .. — all case studies

Magnoliowa Twin icon

03 · case-studies/magnoliowa-twin.md

Magnoliowa Twin

A system that opens a gate with one tap: from the app, from a widget or with a physical Bluetooth button.

role
Fullstack developer — architecture, frontend, API and deployment
stack
SwiftUI · Kotlin Compose · FastAPI · ESP32 · Next.js · Astro
platforms
iOS · Android · Raspberry Pi

# problem

Only the gate’s own radio remote could open it. The goal was to open it from a phone — without touching the gate drive.

This is a project where software ends at a physical relay: mobile apps, a server, firmware and a panel have to work together within a second.

# how it works

Phone

A tap in the app, a widget or a quick settings tile.

Gate server

FastAPI on a Raspberry Pi checks the token and switches the relay.

Gate remote

The relay “presses” the button of the original remote.

Drive

The gate opens as if someone had used the remote.

An optional ESP32-C3 button sends a signal to the phone over Bluetooth. The app running in the background passes it to the server and returns the result, which the button confirms with an LED.

# key decisions

  1. Leave the drive aloneThe relay is wired into the existing remote, not the motor. The gate keeps working as before and the system can be removed without a trace.
  2. Phone as the main path, Bluetooth as an extraThe basis is an authenticated request from the app. The BLE button is for those who do not want to unlock their phone.
  3. Two native apps with the same scopeSwiftUI on iOS and Jetpack Compose on Android. That is what makes the Control Center widget and the quick settings tile possible.
  4. One API for every clientBoth apps, the firmware and the Next.js admin panel use the same API. The contract is described in one place.

# what it consists of

  • iOS app
  • Android app
  • Control Center widget
  • Quick Settings tile
  • push notifications
  • opening history
  • BLE button on an ESP32
  • gate state sensor
  • admin panel
  • public site in Astro

# result

One tap opens the gate — in the app, a widget or on the Bluetooth button — with no changes to the drive.

The original remote keeps working as before, and the whole system can be removed without a trace.

itmbw.pl iconnext case studyitmbw.plread ->