A full-stack React + Node.js application that helps you view and manage all unsubscribe links from your Gmail inbox.
- ๐ Google OAuth Authentication - Secure login with your Google account
- ๐ง Enhanced Gmail API Integration - Comprehensive email discovery with advanced search patterns
- ๐ Real-time Analytics Dashboard - Live statistics with automatic updates
- ๐ Advanced Search & Filtering - Find specific senders, sort by date/sender, show unsubscribed emails
- ๐ฑ Mobile Responsive Design - Works perfectly on all device sizes
- โจ๏ธ Command Palette - Quick actions with keyboard shortcuts (โK/Ctrl+K)
- ๐๏ธ Keyboard Shortcuts - Refresh (โR), Toggle Views (โโงV), Toggle Theme (โโงT)
- ๐๏ธ Modal Email Viewer - Full email content with sanitized HTML rendering
- ๐ Sender Group View - Bulk operations grouped by sender for efficient management
- ๐๏ธ Auto-Archive - Automatically archive emails after unsubscribing
- ๐ Dark/Light Mode Toggle - Seamless theme switching with system preference detection
- โจ Beautiful Animations - Smooth transitions, hover effects, and modern Material Design
- ๐จ Enhanced Styling - Gradient backgrounds, status-based coloring, and professional design
- โก Instant Feedback - Real-time updates, loading states, and visual confirmations
- ๐ Security First - Rate limiting, input validation, and secure token handling
- ๐ Optimized Performance - Efficient API calls, pagination, and state management
- ๐ Error Handling - Comprehensive error boundaries and user-friendly error messages
- React 19 with TypeScript
- Material-UI for components and theming
- Vite for fast development and building
- React Router for client-side routing
- Axios for API calls
- Node.js with Express
- Google APIs for Gmail integration
- JWT for authentication
- Helmet for security headers
- Rate limiting and CORS protection
- Node.js 18+ (LTS recommended)
- pnpm (recommended) or npm
- Google Cloud Console project with Gmail API enabled
git clone https://github.com/ajshul/unsubscribe-dashboard.git
cd unsubscribe-dashboard
pnpm install๐ For detailed setup instructions, see SETUP_GUIDE.md
The setup guide includes:
- โ Step-by-step Google Cloud Console configuration
- โ OAuth consent screen setup
- โ JWT secret generation
- โ Environment variable configuration
- โ Troubleshooting common issues
Quick setup:
- Google OAuth: Create project โ Enable Gmail API โ Create credentials
- Environment:
cp .env.example .envand fill in your credentials - JWT Secret: Generate with
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
# Start both frontend and backend
pnpm dev:full
# Or start them separately:
pnpm dev:server # Backend on port 3001
pnpm dev # Frontend on port 5173Visit http://localhost:5173 to see the app!
unsubscribe-dashboard/
โโโ src/
โ โโโ components/ # React components
โ โ โโโ Dashboard.tsx # Main dashboard with global shortcuts
โ โ โโโ Login.tsx # OAuth login page
โ โ โโโ Header.tsx # App header with command palette button
โ โ โโโ UnsubscribeTable.tsx # Email table with dual views
โ โ โโโ SenderGroupView.tsx # Bulk operations by sender
โ โ โโโ EmailViewerModal.tsx # Full email content viewer
โ โ โโโ CommandPalette.tsx # Keyboard shortcut command palette
โ โ โโโ StatsCards.tsx # Real-time statistics display
โ โโโ contexts/ # React contexts
โ โ โโโ AuthContext.tsx # Authentication state management
โ โ โโโ ThemeContext.tsx # Dark/light theme management
โ โโโ theme/
โ โ โโโ theme.ts # Material-UI theme configuration
โ โโโ utils/
โ โ โโโ api.ts # API client with Gmail integration
โ โโโ App.tsx # Main app with routing
โโโ server/
โ โโโ routes/
โ โ โโโ auth.js # OAuth authentication routes
โ โ โโโ gmail.js # Gmail API routes with enhanced search
โ โโโ index.js # Express server with security middleware
โโโ .env.example # Environment variables template
โโโ SETUP_GUIDE.md # Detailed setup instructions
โโโ README.md # Project documentation
| Command | Description |
|---|---|
pnpm dev |
Start frontend development server |
pnpm dev:server |
Start backend development server |
pnpm dev:full |
Start both frontend and backend |
pnpm build |
Build for production |
pnpm preview |
Preview production build |
pnpm lint |
Run ESLint |
-
Build the frontend:
pnpm build
-
Deploy the
distfolder to your hosting provider -
Set environment variables:
VITE_GOOGLE_CLIENT_IDVITE_APP_URL(your production domain)VITE_API_URL(your backend API URL)
-
Deploy the server code to your hosting provider
-
Set environment variables:
GOOGLE_CLIENT_SECRETJWT_SECRETNODE_ENV=productionPORT(usually provided by host)
- Environment Variables: Never commit
.envfiles - JWT Secret: Use a strong, random secret in production
- HTTPS: Always use HTTPS in production
- Rate Limiting: API calls are rate-limited per user
- Input Validation: All inputs are validated and sanitized
- CORS: Properly configured for your domains
OAuth Error "unauthorized_client"
- Check that your redirect URIs are correctly configured in Google Cloud Console
- Ensure the client ID matches exactly
"Failed to fetch emails"
- Verify your Gmail API is enabled
- Check that you've granted the correct scopes
- Make sure your access token hasn't expired
Backend connection issues
- Ensure both frontend and backend are running
- Check that the proxy configuration in
vite.config.tsis correct
- Command Palette - Quick actions with keyboard shortcuts (โK visible button + hotkeys)
- Bulk Operations - Sender group view with bulk unsubscribe and batch processing
- Modal Email Viewer - Full email content viewing with sanitized HTML rendering
- Auto-Archive - Fully functional automatic email archiving after unsubscribe
- Enhanced Gmail Search - Comprehensive patterns finding significantly more unsubscribe emails
- Show Unsubscribed Toggle - View archived/processed emails with proper filtering
- Real-time Statistics - Live count updates that accurately reflect processed emails
- OAuth Scope Enhancement - Added
gmail.modifypermissions for archiving functionality - Beautiful Modern UI - Gradient backgrounds, smooth animations, and professional styling
- Unsubscribe History Tracking - Persistent database storage of actions
- PWA Support - Installable progressive web app
- Scheduled Sweeps - Automated cleanup jobs
- Email Categories - AI-powered automatic categorization
- Smart Suggestions - Machine learning recommendations
- Export Data - CSV/JSON export of unsubscribe history
- Multiple Email Accounts - Support for multiple Gmail accounts
- Heat-Map Calendar - Visual inbox volume analytics
- Undo/Restore - 7-day recovery for accidental unsubscribes
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If this project helped you, please give it a โญ on GitHub!