How idinging/freemail works
Freemail is a temporary-email service with a browser UI and a Cloudflare Worker backend. The main workflow is: a user signs in, creates or selects a mailbox, then reads incoming mail; the Worker parses each inbound message, optionally forwards it, stores its raw EML and metadata, and serves mailbox and message APIs. Sending is a separate, optional branch routed by sender domain to configured providers. The graph uses the sampled frontend, API, authentication, and inbound-handler code plus README-documented capabilities; unsampled subsystem links are omitted where caller ownership is not established.
Main entry points: server.js Worker entry · api/index.js API dispatcher · handler.js Inbound handler · db/index.js Database access
Components 24
Browser experience
- Mailbox interface
public/js/app.js - View routing
public/js/app-router.js - Browser cache
public/js/storage.js
Worker and API
- Worker entry
src/server.js - Login routes
src/routes/auth.js - Auth middleware
src/middleware/app.js - API routes
src/routes/api.js - API dispatcher
src/api/index.js - Mailbox APIs
src/api/mailboxes.js - Email APIs
src/api/emails.js - Send API
src/api/send.js - User administration
src/api/users.js
Email processing
- Inbound handler
src/email/handler.js - Parsing and codes
src/email/parser.js - Forwarding rules
src/email/forwarder.js
Persistence
- Database access
src/db/index.js
Outbound providers
- Provider routing
src/email/providers/index.js
Other components
- Mailbox user
- Email routing
- D1 database
- R2 EML store
- Resend
- SendFlare
- Cyberpersons
Connections 26
- Mailbox user → Mailbox interface: uses
- Mailbox interface → Worker entry: requests APIs
- Mailbox interface → Browser cache: caches data
- View routing → Mailbox interface: switches views
- Worker entry → Login routes: mounts routes
- Worker entry → Auth middleware: protects API
- Worker entry → API routes: mounts routes
- Worker entry → Inbound handler: dispatches email events
- API routes → API dispatcher: dispatches requests
- Login routes → Database access: reads/writes users
- API dispatcher → Mailbox APIs: dispatches mailbox APIs
- API dispatcher → Email APIs: dispatches email APIs
- API dispatcher → Send API: dispatches send API
- API dispatcher → User administration: dispatches user APIs
- Mailbox APIs → Database access: reads/writes mailboxes
- Email APIs → Database access: reads email metadata
- Email routing → Worker entry: delivers messages
- Inbound handler → Parsing and codes: parses message
- Inbound handler → Forwarding rules: applies forwarding
- Inbound handler → Database access: writes message metadata
- Inbound handler → R2 EML store: stores raw EML
- Database access → D1 database: reads/writes records
- Send API → Provider routing: routes outbound mail
- Provider routing → Resend: sends via
- Provider routing → SendFlare: sends via
- Provider routing → Cyberpersons: sends via