GmailInbox

GmailInbox (Gmail Workspace)

Local-first Gmail command center for turning a large inbox into a small set of decisions: top jobs, reply queues, calendar blocks, goals, briefings, and agent-assisted follow-up.

The core idea is simple: private data stays local, public research is delegated to NodeBench, and every agent output needs evidence.

GmailInbox is the public source distribution of Gmail Workspace. Start with Quick Start, then Gmail OAuth setup when connecting a real account. Read PUBLIC_EXPORT.md for the export boundary, and keep real account data, tokens, and local configuration out of git.

The setup route below is checked against tracked files. Connecting Gmail, calling providers, and running the app still require validation in your own environment.

Visual Showcase

This repo is meant to communicate by artifact: every feature claim should have a public-safe visual, a QA dogfood note, and a reproducible script.

Artifact What It Proves File
Today Queue demo A public-safe, minimal career-inbox triage surface: one queue, one decision, daily sweep archive public/demo/today-queue.html
Magic resend / reply QA Draft, check, and approval-gate follow-up without sending externally public/demo/gmail-magic-resend.gif
One workspace lanes Today, Inbox, Calendar, and Goals stay distinct and readable public/demo/workflow-lanes-demo.gif
Snapshot correction Before/finding/after dogfood proof for UI changes public/demo/qa-dogfood-snapshots.png
Person-state matrix Same lanes adapt to job seeker, recruiter, student, and operator states public/demo/person-state-matrix.png
Remotion storyboard End-to-end video scenes generated from sanitized assets public/demo/remotion-workflow-storyboard.png

Today Queue / Minimal Inbox Triage

The latest public-safe artifact is a deliberately simplified career-inbox interface:

Open the standalone demo:

public/demo/today-queue.html

Privacy note: the demo uses synthetic/anonymized names, companies, and messages. The private Gmail/LinkedIn tracker that inspired it is not committed.

Today Queue minimal inbox triage demo

Agent Method / Redesign Skill

This repo includes a dedicated agent playbook for reproducing the meta-research and redesign process:

Claude Code can load the skill directly. Codex, Cursor, Windsurf, and other agents can read the same SKILL.md as a portable methodology: inspect the current UI, research comparable interaction patterns, collapse the workflow into Now / Prep / Batch / Later, produce a synthetic public artifact, and verify both UX and privacy before publishing.

The current agent rail method also documents the run trace contract: keep the chat usable by default, show a compact run strip, and put the full step/tool/telemetry ledger behind an inspect drawer.

Gmail Magic Resend / Reply QA

Gmail magic resend QA flow

Feature contract:

QA Dogfood Corrections

QA dogfood before finding after correction

Every visible UI correction should leave a trail: what looked wrong, what the dogfood finding was, and what changed.

Clear Lanes

One workspace clear lanes demo

The downsized navigation is intentional: one workspace with stable lanes instead of many similar pages.

User And Person States

User states and person states matrix

The same workspace should work for different people by changing defaults, copy, and artifacts, not by fragmenting the app into more tabs.

Remotion End-to-End Workflow Video

Remotion end-to-end workflow storyboard

The Remotion demo is scene-based so the video can explain every state transition: scale problem, private memory, top jobs, NodeBench research, identity trends, and QA proof.

npm run demo:video
npm run demo:video:vertical

Public-Safe Overview GIF

Public-safe Gmail Inbox animated demo

Runtime At A Glance

+------------------------- USER / BROWSER -------------------------+
| Next.js workspace UI                                              |
| Today, Inbox, Calendar, Settings, TopJobEmails, Pinned Context     |
| Runs on localhost:3030 now; Vercel is the public web host target   |
+-------------------------------+----------------------------------+
                                | fetch / REST
                                v
+------------------------- NEXT API RUNTIME ------------------------+
| app/api/* route handlers                                          |
| career-fit, nodebench/job-research, pinned-artifacts, chat, Gmail  |
| MCP-compatible tool handlers live in src/lib/tools.ts              |
+----------------+---------------------------+----------------------+
                 | better-sqlite3            | public-safe MCP/REST
                 v                           v
+---------------- LOCAL PRIVATE STORE -------+    +--- NODEBENCH PUBLIC LAYER ---+
| SQLite WAL in src/data/*.db                     | Hosted MCP gateway             |
| emails, private_email_bodies, pinned_artifacts  | Render service endpoint        |
| private_identity_claims, job_research_contexts  | Convex public research/ledger  |
| Raw Gmail bodies, resumes, and local scoring    | Reusable sourced dossiers      |
+----------------+----------------------------+    +---------------+--------------+
                 | aggregate shards + claims                       | public packs
                 v                                                  v
+---------------- AGENT / MODEL LAYER ------------------------------+
| Local demo agent or OpenRouter / Anthropic / OpenAI / Gemini       |
| Sees snippets, aggregate shard summaries, and public context packs |
| Does not receive raw resume files or raw Gmail bodies by default   |
+-------------------------------------------------------------------+

What It Does

Privacy Boundary

This repo is designed to be publicizable without exposing a real Gmail account, but only if generated private artifacts stay out of git.

Safe to commit:

Do not commit:

The .gitignore enforces the main local-only artifact paths. See docs/publication-checklist.md before publishing changes, and docs/publication-decisions.md for the decision log behind the cleanup.

Demo Video

The public Remotion source uses sanitized SVG assets. Generated videos are local-only by default because a video can easily capture private screenshots or account text.

npm run demo:video:audio
npm run demo:video
npm run demo:video:vertical

Outputs are written to public/demo/ and ignored by git:

For a public release, render with sanitized assets, inspect the frames, then upload the final MP4 as a GitHub Release asset or LinkedIn upload rather than committing it into repo history.

Quick Start

This public tree does not track .env.example. Create .env.local in the repository root only when configuring an integration, using the setting names in Gmail OAuth setup and the sections below. Keep local credentials out of git.

npm install
npm run seed
npm run dev

Open http://localhost:3030.

Optional model keys:

Without a model key, the app uses a deterministic demo agent for core flows.

Real Gmail

Gmail OAuth is local-first:

Set up OAuth with:

GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...

Redirect URI:

http://localhost:3030/api/auth/google/callback

NodeBench Integration

The Gmail app can call the hosted NodeBench MCP gateway for public research:

NODEBENCH_MCP_URL=https://nodebench-mcp-unified.onrender.com?profile=gmail-research
NODEBENCH_MCP_PROFILE=gmail-research
NODEBENCH_MCP_CLIENT_ID=gmail-dashboard-local

Tokens are optional for anonymous metered usage:

NODEBENCH_MCP_TOKEN=...
NODEBENCH_GMAIL_RESEARCH_TOKEN=...

Allowed outbound signals:

Never send:

Architecture

The headline runtime diagram is intentionally visible at the top of this README.

Deployment boundary:

More detailed runtime diagrams for the NodeBench job bridge, private memory pipeline, and pinned context matching live in docs/RUNTIME.md.

Next.js app
|-- src/app                workspace routes and API routes
|-- src/components         inbox, jobs, shell, context, approvals
|-- src/lib/db.ts          SQLite schema, read models, local persistence
|-- src/lib/tools.ts       MCP-compatible tool handlers
|-- src/lib/nodebench      public research bridge
|-- src/lib/pinned-*       local pinned context
|-- scripts                ingest, verify, trend, demo, NodeBench jobs
|-- remotion               demo video composition

Useful Scripts

npm run typecheck
npm run build
npm run seed
npm run verify:nodebench
npm run nodebench:top-jobs
npm run gmail:body-ingest
npm run private-context:status
npm run private-context:judge
npm run demo:video

Publicizing Safely

Before publishing changes from this public source tree:

git status --short
git diff --cached --name-only
rg -n "gmail.com|Downloads|client_secret|refresh_token|access_token|BEGIN PRIVATE|local private path" .

Then inspect any media that would be committed:

git ls-files public

The current policy is: publish source, sanitized assets, and docs; keep private videos, screenshots, databases, logs, and generated identity artifacts local.

This repository is already the public source distribution. If you develop in a separate private workspace, generate a sanitized export for further distribution:

npm run public:export -- C:/tmp/gmail-inbox

See PUBLIC_EXPORT.md for the public export’s documented exclusions.

Change history.