Skip to content

technicaldee/hailcaesar

Repository files navigation

Hail Caesar

Hail Caesar is a mobile-first, full-screen AI comic strategy game for the Gemini Live Agent Challenge.

You are emperor. Every turn:

  1. Gemini writes the new state of Rome.
  2. Gemini generates 3 new comic panels (top-left scene 2, top-right scene 3, full-width bottom scene 1).
  3. Narration reads the turn with comic bubble highlights.
  4. Consequence and next actions appear.
  5. Your choice or spoken decree branches the campaign.

Hackathon Category

This build targets Creative Storyteller.

It uses interleaved mixed output per turn:

  • narrative_text
  • visual_description_for_imagen
  • stat_changes
  • player_options

See buildInterleavedBundle in server.js.

Stack

  • Gemini SDK (required): @google/genai
  • Text model: gemini-2.5-flash
  • Image model (Nano Banana): gemini-2.5-flash-image
  • Frontend: vanilla web app + Web Speech API (SpeechRecognition, speechSynthesis)
  • Backend: Node.js + Express
  • Google Cloud service: Cloud Run (deployment script included)

Requirements Coverage

  • Leverages a Gemini model: Yes
  • Built with Google GenAI SDK or ADK: Yes (@google/genai)
  • Uses at least one Google Cloud service: Yes (Cloud Run deployment path)
  • Multimodal input/output: Yes (voice input, narrated audio output, generated visuals, structured interleaved turn data)

Local Run

cd /Users/edidiong/Desktop/hackerthon/aura-narrator-live
npm install
cp .env.example .env
npm start

Open http://127.0.0.1:8787

Cloud Run Deployment (Production Path)

One-time setup

gcloud auth login
gcloud config set project YOUR_GCP_PROJECT_ID
gcloud services enable run.googleapis.com cloudbuild.googleapis.com artifactregistry.googleapis.com

Deploy

chmod +x scripts/deploy-cloud-run.sh
./scripts/deploy-cloud-run.sh YOUR_GCP_PROJECT_ID us-central1 hail-caesar

The script builds and deploys the backend to Cloud Run, then prints the service URL.

Architecture Diagram

flowchart LR
  U["Mobile Player"] --> FE["Web UI (Comic Panels + Voice Controls)"]
  FE --> API["Express Backend (Cloud Run)"]
  API --> GEMTXT["Gemini 2.5 Flash via @google/genai (story turn JSON)"]
  API --> GEMIMG["Gemini 2.5 Flash Image (Nano Banana panels)"]
  API --> FE
  FE --> U
Loading

Proof Artifacts To Submit

  • Public repo URL
  • <4 min demo video showing real turn progression
  • short Cloud Console recording showing Cloud Run service running
  • architecture diagram (above)

Environment Variables

  • PORT default 8787
  • GEMINI_API_KEY (Gemini Developer API mode)
  • GEMINI_MODEL default gemini-2.5-flash
  • IMAGE_MODEL default gemini-2.5-flash-image
  • IMAGE_ENABLED default true
  • TEXT_TIMEOUT_MS default 26000
  • IMAGE_TIMEOUT_MS default 50000
  • GOOGLE_GENAI_USE_VERTEXAI set true to use Vertex AI mode
  • GOOGLE_CLOUD_PROJECT required when GOOGLE_GENAI_USE_VERTEXAI=true
  • GOOGLE_CLOUD_LOCATION default us-central1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors