An Alchemy app on Google Cloud is one runtime, usually a Cloud Run
service, plus the resources it uses: databases, buckets, topics,
secrets. You connect them with typed bindings. Call
GCP.Firestore.ReadWriteDatabase(db) in your code and Alchemy gives
the service its own service account with exactly that role on that
database. The code is the IAM policy.
// src/Api.ts
import * as GCP from "@alchemy.run/gcp";
import * as Effect from "effect/Effect";
import * as HttpServerResponse from "effect/http/HttpServerResponse";
export default class Api extends GCP.Function<Api>()(
"Api",
{ main: import.meta.url, invokerIamDisabled: true },
Effect.gen(function* () {
const links = yield* GCP.Firestore.Database("Links", {
type: "FIRESTORE_NATIVE",
});
const db = yield* GCP.Firestore.ReadWriteDatabase(links);
return {
fetch: Effect.gen(function* () {
yield* db.set("links/demo", { url: "https://alchemy.run" });
const link = yield* db.get("links/demo");
return yield* HttpServerResponse.json(link?.fields ?? {});
}).pipe(Effect.orDie),
};
}).pipe(Effect.provide(GCP.Firestore.ReadWriteDatabaseHttp)),
) {} New here? Set up credentials, then start the tutorial.
Pick your runtime
- Cloud Run — HTTP services that scale to zero. The default, and what every page here builds on.
- Cloud Run jobs — batch work that runs to completion.
- Worker pools — always-on queue consumers with no URL.
- Cloud Functions — the same program, built by Google, no local Docker.
- GKE — Kubernetes Deployments and Jobs on Autopilot.
Not sure? See Choosing a runtime.
Data
- Firestore — documents as plain objects, no instance to size.
- Cloud Storage — buckets with read and write clients and signed URLs.
- Cloud SQL — Postgres over the Cloud SQL socket, with Drizzle.
- BigQuery — stream rows in, query with parameters.
- Memorystore — Redis on a private IP.
Messaging & events
- Pub/Sub — publish, then consume by push or pull, with filters and dead letters.
- Cloud Scheduler — cron handlers on your service.
- Storage events — run code when an object lands.
- Eventarc — react to Firestore changes and other Google events.
Frontend & APIs
- Websites — Astro, Next.js, Nuxt, SvelteKit, Vite, and more on Cloud Run.
- Effect HTTP and Effect RPC — typed APIs with typed clients.
AI, security, and operations
- Vertex AI — Gemini with no API key.
- IAM & bindings — exactly what each binding grants.
- Secret Manager & KMS — credentials and encryption.
- Logging & Monitoring — uptime checks and alerts in the same Stack.
- VPC and Private services — private IPs and service-to-service calls.
What are you building?
| You're building | Reach for |
|---|---|
| An HTTP API | Cloud Run + Firestore |
| A typed API | Effect HTTP on Cloud Run |
| A Postgres-backed app | Cloud SQL |
| A website | Websites |
| A static site | Static sites |
| Background jobs | Pub/Sub + a worker pool |
| An analytics pipeline | Pub/Sub → BigQuery |
| Scheduled work | Cloud Scheduler or a scheduled job |
| Upload processing | Storage events |
| A chat endpoint | Vertex AI |
| Kubernetes workloads | GKE |
Out of scope
Alchemy manages infrastructure, not end-user content. APIs whose
objects are a person's data are not modelled as resources: Gmail,
Forms, Calendar, Drive, Classroom, Chat, Tasks, Keep, People, Blogger,
YouTube, Fitness, Apps Script, Street View, Fact Check, and Business
Profile. Neither is prodtt-sasportal, a test copy of the SAS Portal
API.
The advertising and marketing APIs (Analytics Admin, Display & Video 360, Tag Manager, Workspace Reseller, AdSense, AdSense Platform, Ad Exchange Buyer II, Campaign Manager 360, and DoubleClick Bid Manager) need a user's OAuth consent, which a service account can't hold. The Content API for Shopping and Apigee Registry are retired by Google.
Where next
- Setup — connect your project.
- Tutorial — from an empty folder to CI/CD in five parts.
- Providers reference — generated docs for every GCP resource, well beyond the services covered here.