On Air
Connecting to the server...

Menu

How to launch a web radio station with an open-source approach?

DIY tech stack of Lahmacun Radio.

Author: Pavel Kirpikau

Photos by: Lahmacun Radio

19.07.2024
knowledge

Running an independent community radio station requires navigating a complex web of technical challenges. From managing audio archives to integrating live broadcasting, the software stack behind the scenes can make or break a station's operations.

lahmacun-art-01-ready.jpg

In this article, we'll dive into the software architecture powering Lahmacun Radio, a community radio station based in Budapest, Hungary. Over the past five years, the Lahmacun Radio team has built a robust, open-source stack that provides the flexibility and independence they value.

This in-depth look at Lahmacun Radio's software stack is the result of a recent workshop, where two key members of the team shared their insights and experiences. Peter Bokor, the station's founder, provided an overview of the guiding technical principles, emphasizing the team's commitment to independence. Endre Frenyó, a software developer who has volunteered with the IT group since 2021, shared insights into the technical implementation, including the integration of platforms like Azuracast and custom backend development.

The Lahmacun Radio Software Stack

Lahmacun Radio's technical infrastructure is a modular, open-source software stack that evolved over five years. This stack was built with three key principles in mind: independence, cost-effectiveness, and ethical technology choices.

lahmacun-tech-02-ready.jpg

The resulting software stack includes the following key components:

  • The Archive Engine (Arcsi)
  • Azuracast Integration
  • Front-end and Mobile App (Nuxt.js + React Native)
  • Payments and Donations (Stripe)
  • Backend services (Headless WP API and custom)
  • Hosting (DigitalOcean)

Independence is a core value for the Lahmacun Radio team. They wanted to avoid relying on proprietary, closed-source platforms that could limit their control and flexibility. Instead, they use a self-hosted, open-source approach wherever possible, giving them the freedom to customize and maintain their systems as needed.

Cost-effectiveness was another important factor. As a volunteer-run, community-focused station, Lahmacun Radio had to be mindful of their budget. By using free and low-cost open-source tools, they built a robust technical foundation without incurring prohibitive expenses.

Lastly, the team placed a strong emphasis on the ethical and social impact of the technologies they chose. They carefully evaluated service providers and software to ensure alignment with their values around privacy, sustainability, and supporting the open-source community. For example, in choosing a payment processor, the Lahmacun Radio team prioritized Stripe over PayPal due to Stripe's stronger alignment with their ethical standards. As Peter noted, "Stripe is much, much more easily passes our moral checklist compared to PayPal."

lahmacun-tech-01-ready.jpg

The resulting software stack is a modular architecture, with each component serving a specific purpose and communicating through well-defined interfaces. This approach allows the Lahmacun Radio team to swap out or modify pieces as needed, without disrupting the overall system. In the following sections, we'll explore the key components of this flexible, independent, and cost-conscious technical foundation.

The Archive Engine (Arcsi)

At the core of Lahmacun Radio's technical infrastructure is a custom-built audio archive system called Arcsi. This in-house developed component was crucial part of the team's goal to maintain independence and control over their technical stack.

arcsi-archive-01.jpg

The main reason for creating Arcsi was to avoid depending on proprietary, third-party platforms for managing the station's audio archives. Both commonly used platforms for hosting radio station archives (Soundcloud and Mixcloud) has their own limitations and tradeoffs. The Lahmacun Radio team wanted to have full flexibility in how they organized, stored, and provided access to their growing collection of shows and episodes.

Arcsi is designed as a modular, API-driven system that serves as a "smart database" for Lahmacun Radio's audio content. It provides a RESTful interface for the frontend applications to fetch, search, and play back archived episodes. Under the hood, Arcsi manages the storage and organization of the audio files, which are hosted on DigitalOcean's cloud infrastructure (our referral link offers 200 USD for 60 days to try DO services).

Arcsi features:

  • Custom DB of audio media content w/ tags
  • External media storage
  • Authentication
  • Azuracast connector for media upload
  • 3-wayswagger-documented API (frontend, media storage, Azuracast)
  • Admin UI

arcsi-back-01.jpg

One of the key features of Arcsi is its ability to manage a custom database of audio media content, with tags allowing the frontend to offer robust search and filtering. Users can browse the archives by show, genre, date, and other attributes.

To ensure the reliability and scalability of the archive system, Lahmacun Radio has implemented a comprehensive CI/CD pipeline for Arcsi. This includes automated testing, deployment, and monitoring, helping the team maintain a stable and performant archive engine without the need for constant manual intervention.

Overall, the Arcsi archive engine has been a cornerstone of Lahmacun Radio’s independent and cost-effective approach to building their technical foundation. By developing this custom solution, the team has gained greater control over their audio assets and the ability to tailor the archive system to their specific needs. Find more about Arcsi on Lahmacun’s Radio GitHub. While Arcsi module is not yet well documented, Lahmacun Radio’s team can help you get started.

Integrating with Azuracast

In addition to their custom-built Arcsi archive system, the Lahmacun Radio team needed a robust live broadcasting solution. Independence is a core value, so they wanted to avoid relying on proprietary, closed-source platforms that could limit their control and flexibility. This led them to Azuracast, an open-source, self-hosted radio automation platform.

azura-demo.gif

Integrating Azuracast, however, was no easy task. One of the key challenges was scheduling and managing live broadcasts. Azuracast's native scheduling capabilities are not very agile, particularly when it came to handling dynamic show lengths and ensuring a smooth transition between live and pre-recorded content.

To overcome this, the team developed a custom solution that combined Azuracast's functionality with homegrown Liquidsoap-based scripts. As Endre described, this hybrid approach allowed them to maintain precise control over the scheduling and playout of their live shows, while still leveraging Azuracast's core broadcasting capabilities. Lahmacun’s custom Liquidsoap script for flexible scheduling of the radio stream can be found on GitHub.

416015841_889075693225980_1247691882365994949_n.jpg

At Radio Plato, we followed a similar path searching for a reliable self-hosted radio server solution and migrated to AzuraCast a couple of years ago. If we were starting a radio today, we’d recommend Azuracast (for tech-savvy teams) or Radio Cult - fully managed online radio hosting which meets most independent radio needs. You can read more about Radio Cult on MMN Mag.

Front-end and Mobile App

In addition to the backend components like the Arcsi archive system and the Azuracast integration, Lahmacun Radio has invested significant effort into their front-end and mobile application.

The team chose a Nuxt.js-powered website for the web side, enabling a seamless single-page application experience with Vue Server-Side Rendering. This front-end interface provides access to the live radio stream, archived content, and station information.

front-lahmacun-01.jpg

Lahmacun Radio has a mobile app built using React Native and TypeScript, providing a native experience for listeners on iOS and Android, allowing access to the radio's content on the go.

Mobile app development has its challenges. As Peter mentioned, "the features are limited. Compared to the website, we don't have like people call it a feature duality, so to say. So we don't map with the app everything compared to the desktop browser. It's not because we don't want to, it's because we didn't have time and resource for that."

Despite constraints, the Lahmacun Radio team has prioritized essential features for the mobile app, like live broadcasts and archived content access. They are currently in the process of refurbishing the app, moving it to the Expo development environment, and expanding its capabilities to better match the functionality of the web-based platform.

Payments and donations

Lahmacun Radio has focused on improving user experience and functionality around payments and donations, integrating Stripe. The team chose Stripe based on its ethical and social impact of the technologies they use. They carefully evaluated Stripe to ensure it aligned with their values around privacy, sustainability, and supporting the open-source community.

With Stripe integration, Lahmacun Radio has been able to create a branded donation experience for their listeners.

stripe-lahmacun-01-comp.jpg

The team has considered the user experience and workflow around payments and donations. For example, they've implemented a system where show hosts can select their own shows and have the donations associated with their content. This helps Lahmacun Radio track financial contributions and allocate them appropriately.

Lahmacun Radio isn't using a full paywall or subscription model, but the Stripe integration has provided them with a flexible and cost-effective way to accept donations and support their community-driven radio station.

Conclusion

Through building a robust, open-source software stack, the Lahmacun Radio team has not only achieved their goal of maintaining independence and control over their technical infrastructure, but also gained valuable insights that they hope to share with the broader community radio ecosystem.

By emphasizing independence, cost-effectiveness, and ethical technology choices, Lahmacun Radio has created a modular and flexible system that allows them to adapt and evolve as their needs change. From the custom-built Arcsi archive engine to the seamless integration with Azuracast for live broadcasting, each component of their software stack has been tailored to their specific requirements.

lahmacun-team-02-comp.jpg

By sharing their experiences, including successes and the challenges, Lahmacun Radio team aims to inspire and guide community radio stations in building resilient and independent technical foundations. They're open to collaboration and eager to help others on a similar journey, through direct support or contributing to open-source projects that have been integral to their development.

Learn more about Lahmacun Radio - https://lahmacun.hu/community/

All Lahmacun Radio open-source development - https://github.com/lahmacunradio

More like this
Connecting to the server...