My journey from zero to a Play Store app https://github.com/eamag/flutter-gcloud-liquipedia-dota2-app

Why

Sometimes I watch Dota 2 esports tournaments to relax, but I don’t like to watch boring games. I know that some of the teams bring the best games, and I’m trying to use liquipedia to find when the next match starts. That was too much work, so I thought: maybe with the latest AI advancement and a mature app developer ecosystem I can just write a simple app for my Pixel Watch.

The idea

  • A simple Wear OS app, two lists - matches from favorite teams and all matches
  • An ability to search for a team and add them to the favorites
  • Notification 1 hour before the match

Sounds easy, right?

Flutter

I’ve found this article and started with the initial design. Using LLMs I actually built the first version with the mocked static data super quickly, and most of my problems came from the lack of RAM on my PC. Android Studio installation on Ubuntu was also weird, in the end I deleted the official installation from their website and used a snap package. Almost immediately I found out that Flutter Wear OS integration is outdated, the packages are not maintained anymore and things just didn’t work. I’ve decided to just build an android app for now an add watch support later

State management

I’m coming from the data science world, so I had no idea about state management. I’ve actually fought a lot, LLMs like ChatGPT didn’t help me debugging, and I couldn’t find solutions to my problems in the flutter docs. In the end I found another app and copied the solution from there (FutureBuilder), but I still have no idea how to refresh my original screen after selecting my new favorite teams, I’ve just added a button to refresh.

Notifications

I’ve added flutter_local_notifications first, remembering a cooler conversation that apple/google can justify their 30% cut by providing notification service for apps. That didn’t work as I wanted, so I had to dig deeper and use Firebase notifications instead. I’ve also got an idea that instead of the logic of notification settings I should just add an option to add an event to a calendar, which I did quickly. 

Receiving notification on the app was easy, so I finally could do an easy part - the backend. 

Backend

I’m using python, and I recently deployed an app on render.com, so I decided to try to run a simple fastapi server there. That wasn’t working because I had to set up some env vars for firebase, and after checking deta.space I finally decided to move to google cloud.

FastAPI scheduling

Deploying there was easy, but understanding the billing and different services was hard. I’ve decided to use Google Cloud Run, and have a cron job running in the background of my fastapi app checking if I have to send a notification for a match using local cache. I’ve tried LLM suggestions which were outdated, looked into FastAPI docs where they don’t specify how to run a background job, but have a reference to a lifespan event. This is not exactly what I wanted but I tested locally and it worked

Deploying

I’ve decided against using any databases for now to keep things simple, saying for now it’s ok to send a notification several times if my server goes down, but I didn’t think about how cloud run actually works, so I was missing some of the notifications when I had no requests. But for MVP it should be fun, so I created a dockerfile and deployed everything with 1 line (thought I had to clean up google storage so I don’t have to pay for it later)

Publishing to the Play Store

Overall a very frustrating experience

  • First I had to pay 25 later, when you’ve got the developer buy in.
  • Then I had to fill in countless forms about ad_ids, privacy policies, hundreds of redirects to different screens (alpha, beta, closed, open testings, dashboards, not available track…)
  • Finally I’ve recorded a usage video of my app, made a couple of screenshots and published for a review (that took several days)
  • I’ve got a bit mad of waiting, so I’ve decided to try out using Flutter to build a Progressive Web App from my codebase, but it just didn’t work: notification registration worker, CORS for images, some random errors…
  • In the end I published it to the closed test, and had to find users to join my Google Group and download my app from a special link page

I would say it’s not a friendly process for individual developers, but my guess is Google gave up on them some time ago and want to support big corporations instead…

My thoughts

I really hoped I could just build this in a weekend, with an AI writing most of the code for me, and dev infra taking care of the rest. I see how much quicker I can write code at work, but in a completely new area I can’t trust AI yet, and can’t just follow tutorials either. I still have to read all the docs, github issues, error messages, so I don’t think we can be replaced by AI. Yet.