L — a multi-tenant AI cloud-architect assistant you can run under your own domain on Google Cloud.
Each customer gets an unguessable private entry URL. Their team members open it, leave a nickname, and chat with L — a Gemini-powered Google Cloud solutions architect (Vertex AI with Google Search grounding, any language, Mermaid architecture diagrams, file uploads). You, the operator, manage everything from an IAP-protected /admin console: tenants, rate limits, budgets, full conversation browsing, audit logs, and an AI-generated daily report.
- Per-tenant private entries — 128-bit random slugs (
/c/<slug>), revoke/rotate instantly; per-nickname conversation lists; shareable per-conversation URLs - L, the architect — Vertex AI Gemini + Google Search grounding, answers in the user's language, renders Mermaid diagrams in-chat, analyzes uploaded logs/configs/screenshots/PDFs
- Cost is a hard boundary — three-layer circuit breaker (global daily USD → per-tenant daily USD → RPM), reserve-then-call so concurrency can't blow through budgets
- Admin console — usage dashboard, tenant CRUD, conversation browser grouped by user, attachment download, audit trail, AI daily report
- Config center — model ID, pricing table, budgets, rate limits, prompt version: all editable in the admin UI, effective on all instances in ≤30 s, no redeploy
- Security by design — multi-tenant isolation enforced at the store layer (IDOR-tested), prompt-injection hardening, upload allow-list + magic-byte sniffing, zero service-account keys (ADC everywhere), Cloud Run reachable only through the load balancer
- Responsive UI — customer chat (light/dark themes) and admin console both work on mobile, verified by viewport e2e tests
One Next.js (App Router) monolith on Cloud Run behind a dedicated global external ALB: public chat routes pass Cloud Armor per-IP throttling; /admin/* and /api/admin/* sit behind IAP (plus an application-layer JWT re-check). Firestore holds tenants/conversations/usage with tenantId-prefixed paths as the isolation primary key; uploads live in a private GCS bucket proxied by the app (no signed URLs, no public access). Cloud Scheduler triggers the daily report over OIDC. Everything is Terraform-managed.
Design docs (in Chinese): PRD · Architecture & security · L system prompt · Coding standards
nvm use # Node 22
npm install
npm run dev # http://localhost:3100 — in-memory store + mock LLM, no costDefaults (see .env.example): AGENTL_STORE=memory, AGENTL_LLM=mock, AGENTL_ADMIN_MODE=open — /admin is open locally and chat never calls a real model. To develop against real Firestore/Vertex, copy .env.example to .env.local, set your project, and run gcloud auth application-default login.
npm run check # typecheck → lint → unit + coverage gates (80% global / 95% core modules)
npm run test:e2e # Playwright: full journeys, isolation/IDOR, uploads, throttling, mobile viewportsPrerequisites: a fresh GCP project (billing enabled), a domain you control, gcloud + terraform + Node 22.
cp infra/terraform.tfvars.example infra/terraform.tfvars # project, domain, admin account
cp deploy.env.example deploy.env # same project/region for the build
./deploy.shdeploy.sh runs the quality gates, creates the Terraform state bucket, applies all infrastructure (LB + managed cert + Cloud Armor + IAP + Firestore + buckets + Scheduler), builds the image with Cloud Build, and back-fills the IAP audience in a second apply. If your DNS zone is not in Cloud DNS, point your domain's A record at the lb_ip output; the managed certificate provisions within ~15–60 minutes.
All deployment identity (project ID, domain, admin email) lives only in your local terraform.tfvars / deploy.env — both are gitignored.