Earthquake Safety App

Website

My uni colleagues and I recently launched an earthquake safety app. Through this project, I add new knowledge mostly on mobile development and the App Store / Play Store submission process.

The system consists of three main parts: a backend server, a Flutter mobile app, and a crawler.

Earthquake safety app architecture

The crawler polls earthquake data from two sources, the BMKG API and the BMKG website. When it detects an earthquake above magnitude 5.0, the system checks the earthquake location and notifies users within a 50 km radius. I added several guardrails to reduce false positives, and I used the Haversine algorithm to calculate the distance between the earthquake location and user devices.

The mobile app connects to the backend server and supports authentication, data display, family management, and earthquake notifications. It is built with Flutter.

The backend server handles the API, authentication, and Firebase integration. It is built with TypeScript, Bun, ElysiaJS, Drizzle ORM, and Better Auth.

The deployment runs on a VPS, managed by Coolify with two services and one PostgreSQL database.

The landing page is also an Astro site deployed on the VPS.

Challenges

This is my second Flutter app, and my first app where I directly handled the App Store and Play Store submissions. A lot of the work was tedious like generating app assets, testing across iOS and Android, and handling store review requirements.

I also received multiple submission rejections because I could not submit the app as an emergency app. I had to change the category to Health before it was finally approved.

Lessons

I learned that I can build, deploy, and monitor an end to end product by myself.

I also really like Better Auth. It removed a lot of the usual complexity around authentication, so I did not have to spend too much time thinking about auth flows.

I do not think I could have completed this in under two months without the help of Codex and Claude Code. I used them for:

  • Defining the PRD with /interview skills
  • Generating the app UI design based on our brand guidelines
  • Converting the generated HTML designs into Flutter code
  • Brainstorming the backend architecture
  • Developing features based on the backend architecture
  • Generating unit tests

Future Work

I am currently working on automating update deployments with a build script so I can release faster to both app stores. I Am also exploring Shorebird so I can ship some updates directly without going through the full store submission process every time.