CantApp: A Flutter Lyrics App with Algolia Full-Text Search

Giovanni Mugelli
Giovanni Mugelli

A mobile app for browsing, searching, and displaying song lyrics — built with Flutter and Dart, with Algolia powering instant full-text search and Firebase handling content and authentication.

Music has always been central to how I think about projects. CantApp began as a simple idea: a clean, distraction-free app for reading lyrics. What it became was a practical education in the architecture of a production-grade Flutter application — search infrastructure, content management, monetisation, and the ergonomics of multi-screen mobile navigation.

Cant is a nod to canto, Italian for song. The project was designed as a reusable template — a starting point that other developers could fork and adapt for their own content domains.

Why Flutter?

At the time CantApp was built, Flutter had just passed version 2.0 and the community was exploding. The promise of a single Dart codebase that compiles to native iOS and Android — with pixel-perfect rendering that does not depend on platform UI components — was compelling. After years of working with React Native (which bridges to native components) and Xamarin (which uses native renderers), Flutter's approach of owning the entire rendering pipeline felt refreshingly direct.

Dart, too, proved a pleasant surprise. Its syntax sits comfortably between Java and JavaScript, its sound null safety system catches entire categories of runtime errors at compile time, and the hot reload cycle is the fastest I have experienced in mobile development.

The Search Problem

Lyrics apps live or die by search. A user who cannot find a song in under two seconds will close the app. Firebase Firestore, the natural persistence choice in the Flutter ecosystem, does not support full-text search — it can query by prefix, but not by arbitrary substring or relevance ranking.

The solution is Algolia, a search-as-a-service platform that indexes content and provides millisecond full-text search with typo tolerance and relevance tuning. A Firebase Cloud Function syncs new and updated lyric documents to the Algolia index automatically. The Flutter client then queries Algolia directly for search, while Firestore handles authenticated reads for the full lyric content.

This split architecture — Algolia for discovery, Firestore for content — is a pattern that scales well and keeps the client code clean.

Monetisation with AdMob

CantApp integrates Google AdMob for interstitial advertising between song views. Integrating AdMob in Flutter requires careful handling of the ad lifecycle — loading ads asynchronously, respecting rate limits, and ensuring ads do not interrupt the reading experience mid-lyric.

The implementation uses a dedicated ad service class that pre-loads the next ad while the user is reading the current lyric. By the time they navigate away, an ad is ready without any visible loading delay.

App Icon and Splash Screen

The custom app icon and splash screen were among the last things added — and among the most fiddly. Flutter's icon generation tooling has improved considerably since then, but at the time, producing the correct asset sizes for the App Store and Play Store required a separate script and careful manual verification.

The icon design is clean and typographic, consistent with the app's minimal aesthetic.

Reflections on Flutter for Production

CantApp convinced me that Flutter is a serious tool for production mobile development. The ecosystem has some rough edges — particularly around platform-specific packages and the iOS build toolchain — but the developer experience for the core UI work is excellent.

The full-text search architecture (Algolia + Firestore + Cloud Functions) has become a pattern I return to regularly. It is well worth the initial setup cost for any app where content discovery is a primary use case.

The source code and template are available on GitHub under a public template licence.