An open-source, privacy-focused disposable email client built with Angular 17. Generate temporary email addresses instantly and receive emails in real-time — no signup required.
- Instant inbox generation — Create a disposable email address with one click
- Real-time email delivery — Emails arrive via WebSocket, no polling
- Lottery-style animation — Fun character-by-character address reveal
- Multiple domain support — Choose from available email domains
- Full email viewer — Read HTML and plain-text emails
- Scroll-triggered animations — Smooth reveal effects as you scroll
- SEO optimized — Meta tags, structured data, sitemap
- Analytics ready — GA4 integration with consent gating
- Ad-supported — Optional AdSense integration
- GDPR compliant — Cookie consent banner included
- Fully responsive — Works on mobile, tablet, and desktop
- Zero dependencies on backend package — Fully decoupled, connects via REST + WebSocket
- Node.js 18+
- npm 9+
- Angular CLI 17:
npm install -g @angular/cli - A running backend API (see API Contract below)
git clone https://github.com/your-username/disposamail-frontend.git
cd disposamail-frontend
npm installEdit src/environments/environment.ts to point to your backend:
export const environment = {
production: false,
apiUrl: 'http://localhost:3000', // Your API server
wsUrl: 'ws://localhost:3000', // Your WebSocket server
appName: 'DisposaMail', // Your brand name
appTagline: 'Temporary Email, Zero Hassle',
appUrl: 'https://your-domain.com',
gaTrackingId: '', // Google Analytics 4 ID (leave empty to disable)
adsensePublisherId: '', // AdSense publisher ID (leave empty to disable)
adsenseSlotId: '', // AdSense slot ID
storagePrefix: 'disposable_email_', // LocalStorage key prefix
};npm start
# Runs at http://localhost:4200
# API calls proxy to your backend via proxy.conf.jsonnpm run build:prod
# Output in dist/frontend/During development, API calls are proxied to avoid CORS issues. Edit proxy.conf.json:
{
"/api/*": {
"target": "http://localhost:3000",
"secure": false,
"changeOrigin": true
},
"/ws": {
"target": "ws://localhost:3000",
"secure": false,
"ws": true
}
}This frontend expects a backend API with these endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/domains |
List available email domains |
| GET | /api/inboxes/:address/emails |
Fetch emails for an inbox |
| GET | /api/emails/:id |
Get a single email by ID |
Connect to /ws with the query parameter inbox=<email-address> to receive real-time email notifications.
Message format:
{
"type": "new-email",
"data": {
"id": "string",
"from": "string",
"subject": "string",
"receivedAt": "ISO-8601"
}
}┌─────────────────────────────────────────────────┐
│ Landing Page │
│ ┌─────────────┐ ┌──────────────────────────┐ │
│ │ Hero + │ │ Email Card │ │
│ │ Lottery │ │ ┌────────────────────┐ │ │
│ │ Animation │ │ │ Inbox Generator │ │ │
│ │ │ │ │ (address + domains) │ │ │
│ └─────────────┘ │ ├────────────────────┤ │ │
│ │ │ Email List │ │ │
│ ┌─────────────┐ │ ├────────────────────┤ │ │
│ │ Marketing │ │ │ Email Viewer │ │ │
│ │ Sections │ │ └────────────────────┘ │ │
│ └─────────────┘ └──────────────────────────┘ │
└─────────────────────────────────────────────────┘
| Service | Purpose |
|---|---|
InboxService |
REST API calls for emails and domains |
WebSocketService |
Real-time email notifications |
InboxStateService |
Manages inbox list and active selection |
StorageService |
LocalStorage persistence |
AnalyticsService |
GA4 event tracking with consent |
DomainService |
Domain list management |
All brand references are centralized in src/environments/environment.ts:
appName— Displayed in navbar, footer, and copyrightappTagline— Shown below the brand nameappUrl— Used in SEO meta tags
Colors use CSS custom properties defined in component SCSS files. Key tokens:
--blue-50through--blue-700— Primary palette--slate-*— Neutral grays--amber-*,--emerald-*,--violet-*— Accent colors
- Set
gaTrackingIdto your GA4 measurement ID to enable analytics - Set
adsensePublisherIdandadsenseSlotIdto enable ads - Both are disabled when their IDs are empty strings
- Analytics respects the cookie consent banner
See CONTRIBUTING.md for development setup and guidelines.
This project is licensed under the MIT License — see LICENSE for details.