EmailAttachmentLog
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v38View latest version
A Val Town project that receives emails with attachments, stores them in blob storage, and displays them in a dashboard with a Remarkable-inspired black and white aesthetic.
├── backend/
│ ├── index.ts # Main Hono app
│ └── routes.ts # API routes
├── frontend/
│ └── index.html # Dashboard UI with Tailwind CSS
├── shared/
│ ├── storage.ts # Blob storage utilities
│ └── types.ts # Shared type definitions
├── dashboard.ts # HTTP entry point
├── email-handler.ts # Email processing logic
├── getFiles.ts # Email trigger entry point
└── README.md
This component:
- Receives incoming emails with the email trigger
- Extracts the first attachment from each email
- Stores the attachment content in blob storage
- Maintains metadata about each attachment
- Sends a confirmation email to the sender
This component:
- Uses Hono as the backend framework
- Provides a REST API for accessing attachments
- Serves a frontend with Tailwind CSS
- Displays all received attachments in a clean, minimal interface
- Shows metadata for each attachment (filename, sender, date, etc.)
- Allows viewing and downloading of attachments
- Features a responsive design with a black and white aesthetic inspired by Remarkable
- Backend: Hono.js for API routing
- Frontend: HTML, JavaScript, and Tailwind CSS
- Storage: Val Town blob storage
- Styling: Tailwind CSS via CDN for minimal black and white aesthetic
Attachments are stored in blob storage with the following structure:
attachments:list- JSON array of all attachment IDsattachment:{id}:content- Raw content of the attachmentattachment:{id}:metadata- JSON metadata about the attachment
- Send an email with an attachment to your Val Town email address
- The attachment will be automatically stored
- View all attachments on the dashboard