AI Agent built with Vertex AI (Gemini 1.5 Pro) + Cloud Run for the DeployFest hackathon.
| Layer | Tech |
|---|---|
| Frontend | Next.js 14, TypeScript, Tailwind CSS |
| Backend | Express, TypeScript,@google-cloud/vertexai |
| AI | Vertex AI — Gemini 1.5 Pro with function calling |
| Deploy | Google Cloud Run |
Prerequisites: Node 22+, a GCP project with Vertex AI API enabled.
# Backend
cd backend
cp .env.example .env # fill in GCP_PROJECT_ID
npm install
npm run dev # http://localhost:3001
# Frontend (separate terminal)
cd frontend
cp .env.example .env.local # BACKEND_URL=http://localhost:3001
npm install
npm run dev # http://localhost:3000# Authenticate
gcloud auth login
gcloud auth configure-docker
# One-shot deploy
chmod +x infra/deploy.sh
./infra/deploy.sh <YOUR_GCP_PROJECT_ID>On hackathon day (9:45 AM reveal):
backend/src/agent/prompts.ts— UpdateSYSTEM_PROMPTto reflect the problem domain.backend/src/agent/tools.ts— Replace stub implementations intoolHandlerswith real logic.frontend/app/page.tsx— Update the title and description.- Set
NEXT_PUBLIC_APP_TITLEinfrontend/.env.local.
├── backend/
│ └── src/
│ ├── agent/
│ │ ├── agent.ts # Agentic loop (Vertex AI function calling)
│ │ ├── tools.ts # Tool definitions + handlers (swap on day)
│ │ └── prompts.ts # System prompt (swap on day)
│ └── routes/chat.ts # POST /api/chat
├── frontend/
│ ├── app/
│ │ ├── page.tsx # Main page
│ │ └── api/chat/route.ts # Next.js proxy to backend
│ └── components/
│ ├── ChatInterface.tsx # Chat UI with loading state
│ └── MessageBubble.tsx # Message + tool call visualizer
└── infra/
├── cloudbuild.yaml # Cloud Build CI/CD
└── deploy.sh # Manual one-shot deploy