Inspiration

BackPocket was born from a simple realization: when people face unusual or urgent practical problems, they often know the outcome they need but have no idea which trade, tool, or service category to search for. Traditional directories fail because customers shouldn't need a trade certification just to frame an ambiguous issue. We set out to build an AI-operated rescue desk that turns plain-language problem descriptions into safe, bounded action plans.

What it does

BackPocket acts as an AI-operated rescue desk. A customer describes their problem, location constraints, and available tools. Gemini 2.5 Flash processes the request through four structured operational roles:

Scope and Safety: Red-teams the request to support, escalate, refer, or decline unsafe actions. Constraint & Plan B: Explains the root cause and provides reversible, bounded steps. Fulfillment: Generates permitted tasks, prohibited actions, required tools, and arrival safety checks. Business Operations: Pairs the request with an authorized catalog offer. A request can receive free triage or a flat-rate $15 Remote Rescue Plan. Deterministic policy rules verify all pricing and safety bounds before any offer becomes a customer commitment.

How we built it

BackPocket is built on Google Cloud and Next.js:

Compute & AI: Hosted on Cloud Run using Vertex AI with Gemini 2.5 Flash. Database & Auth: Firestore manages case state, event idempotency, and decision logs, while Cloud SQL handles user identity. Commerce: Integrated with Stripe Checkout and Webhooks. Total charges are deterministically validated against stored catalog versions.

Resilience: Asynchronous Next.js API routes process webhook events inside Firestore transactions with non-stealing time leases to guarantee idempotency.

Challenges we ran into

Our greatest engineering challenge was preventing plausible AI outputs from turning into unauthorized business promises. Edge cases emerged at integration boundaries:

HTTP 409 Conflict responses so Stripe defers delivery until active execution completes. Sample & Ping Webhooks: Stripe test pings and unmatched financial events previously threw missing-metadata errors; we refactored the pipeline to acknowledge unmatched events gracefully with HTTP 200 OK (outcome: "ignored"). Safety Overrides: Ensuring AI never bypasses physical safety constraints required strict post-generation verification layers.

Accomplishments that we're proud of

Fail-Closed Safety: A decline is treated as a successful, safe outcome rather than a system error. Strict Idempotency: Payment processing, customer receipts, and entitlements are bound to atomic Firestore transactions. Clear Operational Boundaries: Remote services operate live while higher-risk onsite dispatch features remain safely gated behind explicit evidence requirements. Transparent Pricing: The system enforces exact price matches and refuses to let model output dictate currency or subtotal amounts.

What we learned

Our core insight from building BackPocket is that AI confidence is not system authorization. While large language models excel at reasoning over unstructured human problems, deterministic application code must retain sole authority over financial transactions, state mutations, and physical safety guarantee.

What's next for Backpocket.help

The next phase for backpocket.help is expanding arm's-length customer adoption for Remote Rescue Plans and preparing a controlled field pilot for onsite services. Expansion will follow a strict, evidence-first model—activating one jurisdiction, one approved procedure, and one generalist capability profile at a time.

Built With

  • antigravity
  • claude
Share this project:

Updates