A little app to help me mark stuff as mailed.
npm install
npm run devThe Vite dev server includes a proxy to bypass CORS during development.
# Build the Docker image
docker build -t mail-scanner .
# Run the container
docker run -p 3000:3000 mail-scanner
# Or with a custom port
docker run -p 8080:8080 -e PORT=8080 mail-scannerThe app will be available at http://localhost:3000 (or your custom port).
npm run build
npm startThis builds the frontend and starts the Express server on port 3000.
- Enter your Hack Club Mail API key in the app. (Or import via QR code)
- Point your camera at the QR code on the letter.
- Profit!
For CORS reasons, there is an express server that proxies requests to the Hack Club Mail API:
POST /api/letters/{id}/mark_mailed→https://mail.hackclub.com/api/v1/letters/{id}/mark_mailedGET /api/letters/{id}→https://mail.hackclub.com/api/v1/letters/{id}
API keys are passed from the client through the proxy and never stored server-side.
The app requires no configuration - users provide their own API keys in the UI.
Optional:
PORT- Server port (default:3000)