Devlog: Automating Live-Ops with GA4, Gemini AI, and Zero-Trust Cloud Functions

TL;DR: Millennium Falck Enterprise has successfully automated the telemetry-to-insight pipeline for the iOS game Silly Con Valley. Using Google Analytics 4, Gemini 2.5 Flash, and Cloud Firestore, the system compiles weekly community play stats into a satirical VC newsletter delivered dynamically to players on launch—requiring zero manual maintenance.

Silly Con Valley is an iOS startup simulator game developed by Millennium Falck Enterprise. In our quest for absolute efficiency and peak corporate sarcasm, we automated our weekly live-ops dashboard update. Instead of manually writing satirical VC reports analyzing player metrics (e.g., explaining why a 62% bankruptcy rate is “bullish”), we built a fully serverless data aggregation and generation pipeline.

How does the automated Live-Ops pipeline work?

The system runs on a serverless loop that fetches telemetry, aggregates it, runs it through generative AI, and publishes it back to the client-side game interface. The architecture operates in four automated stages:

  • 1. Sunday Trigger: A Cloud Scheduler cron job invokes our Firebase Cloud Function weekly at midnight.
  • 2. Telemetry Retrieval: The function queries Google Analytics 4 (GA4) using @google-analytics/data to retrieve player metrics (CEO archetypes, average valuation, and bankruptcy ratios).
  • 3. Satirical Synthesis: The raw metrics are structured and passed to the Gemini 2.5 Flash API with a instructions to output a strict JSON payload containing a VC-style newsletter.
  • 4. Firestore Publish: The function writes the structured JSON report directly to Cloud Firestore under live_insights/report_[year]_w[week].

How is player telemetry safely collected and queryable?

We leverage Google Analytics 4 to track anonymized user sessions. Our Firebase Cloud Function aggregates specific gameplay events from the last 7 days:

  • game_started logs the chosen ceo_archetype (e.g., “The Hacker”, “The Trust Fund Kid”).
  • ipo_secured tracks the final company ipo_valuation.
  • game_over records the game outcome (e.g., “bankruptcy” vs “IPO”) to compute the community failure rate.

How does Gemini AI write the VC newsletters?

To prevent format leakage or client-side parsing failures, the Cloud Function uses the Node.js @google/genai SDK with a strict JSON schema enforced. Gemini 2.5 Flash receives the raw stats and returns a structured format:

{
  "title": "A satirical title mimicking VC thought-leadership publications",
  "summary": "A 2-sentence summary of the week's market status",
  "outlook": "A humorous, elitist VC analysis of player bankruptcy rates"
}

Why is the pipeline zero-trust?

By running the pipeline entirely within the Google Cloud ecosystem, we eliminated the need for hardcoded service account keys or .json credentials. The authentication is managed via Application Default Credentials (ADC). The Firebase Admin SDK automatically authenticates using the runtime environment’s IAM service account, which has read-only access to our GA4 property and write access to Firestore. External API keys (like the Gemini key) are stored and decrypted securely using Google Cloud Secret Manager.

How does the iOS client retrieve the live newsletter?

On app launch, the game’s Swift client fetches the latest insight document from Firestore using the LiveContentManager class:

func fetchMarketInsights() async throws -> [LiveMarketInsight] {
    let snapshot = try await Firestore.firestore().collection("live_insights").getDocuments()
    return snapshot.documents.compactMap { doc in
        try? doc.data(as: LiveMarketInsight.self)
    }
}

If the user is offline, the client gracefully falls back to a cached local plist. Online users receive an immediate, dynamically generated dashboard representing last week’s aggregate community play stats, operating at a maintenance cost of exactly $0.00.

From a Synth-Pop Song to a Billion-Dollar IPO: The Story Behind Silly Con Valley

I started out last October when I came back from my gig in Germany. It was a peak moment in my life, but afterward, I felt super empty. Usually, when I get that feeling, I know I need to start creating something new.

Interestingly enough, Silly Con Valley didn’t start as a game. It started as a song.

I was trying to capture the aesthetic of Silicon Valley in the 80s and 90s.

Picture this: You wake up in Palo Alto, have a cup of coffee, and smell the crisp air of California. You start up your Volvo Amazon and start heading to your company HQ. The sun is shining. You enter the office, and everyone is buzzing around. You can feel that there’s something big happening—a new OS being built, some groundbreaking technology waiting to be discovered. You spend long hours in the office, watching the sunset through the blinds, just dreaming of changing the world.

That was the setup, and I composed a track that completely captured that mood. Usually, I’d just release the song and see what happens, but for this particular track, I felt it could benefit from something else. What could it be? A short film? A music video? I didn’t know, but those didn’t feel like the proper channels.

And then it hit me. I had tried to make a couple of games last summer, and one of them was a tycoon-style prototype. What if this was a startup tycoon game where you try to create a billion-dollar company?

The game would use my music as a core mood setter for the different phases of the startup journey, and its visual style would lean heavily into the retro aesthetic of the 90s.

So, my journey began. I used AI to assist in the coding and the graphics, but the heart and soul of the idea came straight from my mind. If I sum up all the hours I’ve spent making the first release of the game, it comes out to about four weeks of full-time work (37.5 hours a week). That broke down into two solid weeks to develop the mechanics and craft the “SiliconOS 95” vaporwave-infused desktop interface, one week of rigorous playtesting, and a final week for setting up Google AdMob, AppConnect, and all the administrative stuff.

I’m super proud of the outcome and wish to expand the gameplay and mechanics even further. The game has become a full-on simulator for living the chaotic startup life.

It is deeply satirical because, let’s face it, the whole tech world is like that. I think the tech industry has really forgotten the skill to laugh at its own absurdity. Hopefully, this game will be a place to laugh and gag about the daily tropes that we churn out without a blink of an eye—whether that’s pivoting your product to chase “AI/ML Hype” and “Fintech Scams,” or burning $10,000 a week on influencer parties.

A 10-year-old Juha dreamed of many things. Making games was one of them. Now I can once again hug my 10-year-old me and say, “We did it again.”

Hopefully, you’ll take it for a spin and test it out. Pitch the finicky VCs, try not to go bankrupt, and chase that $1 Billion IPO. It would make me—and my 10-year-old version—really happy. 🙂