unlocking the future of trailer sharing

KEYWORDS

IoT integration, back-end development, API development, React, Bun, TypeScript, MariaDB

Team

Andres Kalle developer
Raiko Raidma developer
Vladislav Stafinjak analyst
Siim Sups project manager

Rent your own here

back-end development for Respo

Background

Respo, a well-established name in trailer sales and rentals, had a vision – what if people could rent or sell trailers remotely, without the hassle of in-person handovers? They wanted to unlock a whole new business model and reshape how people interact with one of the most practical assets on the road – trailers.

To bring their new idea to life, they turned to Teltonika’s devices. Teltonika is a leading Lithuanian tech company specializing in IoT (Internet of Things) and electronics solutions. Their wide-ranging product lineup includes GPS trackers, vehicle monitoring systems, and smart IoT devices that power connected experiences across industries.

Respo’s goal was to go beyond traditional rentals and sales and offer a way for individuals and businesses alike to rent or sell trailers remotely, without the usual friction of physical handovers. Imagine owning two trailers that mostly sit unused. Renting them out sounds great until you realize it means being there every time someone wants to pick one up. That’s where the pain point lies.

With the new solution, that pain point disappears. Users can rent a smart Teltonika-powered device from Respo, attach it to their trailer, and instantly make it rentable or sellable. Without ever needing to meet the renter or buyer in person. Think Airbnb, but for trailers.

Respo's trailer stations are equipped with custom-developed Teltonika devices, now in the client's hands for active testing. These self-serve stations let people rent or sell trailers without anyone needing to be there in person. Each station is fitted with a smart device that talks directly to Respo’s system, so users can unlock, rent, and return everything through the platform.

process

The project began in the most hands-on way possible, literally. The client walked into our office with a Teltonika circuit board in hand, wires exposed, and status LEDs blinking. They wanted us to get familiar with the hardware from day one, to understand how it works and what we’d be building around, especially on the back-end development side where reliable communication with the hardware was critical.

From there, they gave us full creative and technical freedom to come up with a solution. No strict specs, no heavy constraints, just a clear goal to build a solid, scalable system that could power remote trailer rentals and sales. And not just something that works today, but something ready for the long haul.

To make things even more interesting, the first version of the code was written entirely based on Teltonika’s documentation – before we’d ever connected a real device. Once we hooked up a real device to our freshly built server, some surprises popped up. These few quirks meant we had to go back and make some key adjustments to get everything working smoothly. It was definitely a learning curve, but also one of the most rewarding and interesting parts of the project.

We decided early on to architect the solution as a two-part system:

  • Device communication server – This one talks directly to Teltonika’s devices. But since their protocol doesn’t use standard web requests (like HTTP), we had to go deeper, dealing with raw TCP data and writing our own logic to handle byte-level communication.
  • Public API server – This is the part that external partners and front-end apps interact with. It’s the clean, well-documented layer that exposes data, sends commands, and generally makes everything human-friendly.

To bring it all to life, we chose tools that offered the right balance of speed, reliability, and flexibility for the job:

  • Bun: A fast and modern TypeScript runtime, chosen for its speed and ability to handle thousands of simultaneous device connections, making it perfect to ensure scalability.
  • React: For building the admin UI with responsiveness and reusability in mind.
  • MariaDB: A reliable SQL database solution that fit our needs and is compatible with the chosen hosting environment.
  • OpenAPI + Swagger UI: For documenting the public API in a way that’s clear, interactive, and easy for third-party developers to use.

As always with ambitious builds, the real fun began once we got deeper into testing and deployment. From unique hardware behavior to unexpected limitations in our hosting environment, a few surprises were waiting for us behind the curtain.

A close-up of the Teltonika circuit board powering Respo’s smart trailer system. Working directly with the hardware from day one gave us the insight needed to build a reliable system from the ground up.

challenges

Talking the talk (in Teltonika’s language)

The first major challenge was figuring out how Teltonika devices actually communicate. In most of our projects, we work with systems that use standard HTTP requests, which is an everyday protocol for web servers that’s built on top of TCP and usually comes with built-in support out of the box.

But Teltonika’s devices don’t follow that playbook. Instead, they use a custom, TCP-based protocol that required us to go one layer deeper. There was no convenient wrapper, no ready-made library. We did a deep dive into back-end development for IoT devices, where we had to handle raw data byte by byte and build a custom communication layer from scratch.

It pushed us outside of our usual territory, but it turned into a genuinely exciting challenge. One that gave our team a chance to experiment and solve problems in a way we don’t often get to in more conventional projects.

The logic of locks

The devices only gave us two binary signals:

  • Is the lock closed?
  • Is the trailer connected?

Sounds simple enough, right? But once we started layering in real-world expectations – like what if the lock doesn’t open when it’s supposed to, or someone returns the trailer but forgets to lock it – it got complicated, fast. Edge cases started popping up left and right, and the system had to be smart enough to handle all of them without missing a beat.

We ended up creating a detailed state machine and preparing for all possible transitions between various possible states, both valid and invalid. For the invalid states, we also added alerts and notification systems.

Keeping it private

We wanted the two server apps (device communication server and public API server) to talk privately, without exposing communication to the public internet. For that, we chose Unix domain sockets, which was new territory for us, but it worked, and kept the system locked down tight.

IoT integration for Respo
This scheme shows how Respo’s smart trailer system keeps track of what's going on – whether a trailer is locked or unlocked, present or missing, and how the system reacts in each case. It covers all the possible state changes, from a user unlocking to remove a trailer to edge cases like someone forgetting to lock up after returning one. Behind the scenes, it’s all driven by Teltonika devices and custom logic that helps the system stay smart and secure.

results

  • Fully functional system, now in the client’s hands for active testing.
  • Scalable architecture designed to support thousands of devices.
  • User-friendly solution that helps trailer owners easily earn from gear that would otherwise just sit around.
  • Remote rental model that removes the need for in-person handovers. 
  • Future-ready digital platform that brings innovation to a traditionally offline industry.
  • And for us, one unique experience and a fresh set of skills to take into future projects.