ClearBox is an open-source Next.js app for high-volume inbox cleanup.
It scans unread Gmail metadata, groups messages into actionable categories, adds finance insights, and provides AI-assisted actions (roast, reply drafting, and cleanup workflows).
- Fast triage for large unread inboxes
- Batch actions instead of one-by-one cleanup
- Privacy-first session workflow
- Finance-focused grouping by provider
- Built-in dark mode and responsive UI
- Google OAuth sign-in with Gmail access
- Unread scan and category grouping
- Category management:
- Search within category
- Select/unselect visible emails
- Mark read, archive, remove as spam
- AI reply draft generation
- Roast generator (Claude or local Ollama)
- Finance center:
- Separate finance page
- Currency and provider filters
- Provider tabs and combined view
- Group-level remove action
- Daily movement chart and transaction list
- Celebration/share flow after inbox cleanup
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS 4 + CSS modules
- Auth.js / NextAuth v5
- Gmail API (
googleapis) - Anthropic SDK (optional) or Ollama (local)
git clone https://github.com/axonixtools/clearbox.git
cd clearboxnpm installcp .env.example .env.localSet these values in .env.local:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Auth.js
AUTH_SECRET=
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000
# AI provider option A: Anthropic
ANTHROPIC_API_KEY=
USE_OLLAMA=false
# AI provider option B: Ollama
USE_OLLAMA=true
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2npm run devOpen http://localhost:3000.
npm run dev
npm run lint
npm run build
npm run start- Create/select a Google Cloud project.
- Enable Gmail API.
- Create OAuth Client ID (Web Application).
- Add redirect URI:
http://localhost:3000/api/auth/callback/google
- Add production redirect URI after deployment.
- Put client ID/secret in
.env.local.
ollama pull llama3.2
ollama serveThen set USE_OLLAMA=true.
app/
api/
dashboard/
components/
dashboard/
landing/
lib/
types/
- The app reads email metadata required for categorization and actions.
- Access is scoped through OAuth.
- Session-scoped behavior is used throughout the dashboard flow.
Contributions are welcome.
- Fork the repo
- Create a feature branch
- Make changes with tests/lint passing
- Open a PR with clear scope and screenshots for UI updates
MIT
- Maintainer email:
axonixtools@gmail.com