Mail Forwarding (Self-Host)
mail-forwarding-ui
Next.js frontend for managing forwarding aliases via the Mail Forwarding API. Built with React, TailwindCSS, Radix UI, and ShadCN.
mail-forwarding-ui is the web UI for the Free Mail Forwarding Service, maintained by a member of Haltman.io. It is a Next.js application that talks to the mail-forwarding-api to let users:
- Request alias creation (subscribe)
- Request alias removal (unsubscribe)
Tech stack: Next.js, React, TailwindCSS, Radix UI, ShadCN
This UI is not standalone: it must point to a working API instance, and domains must be authorized in the database.
Prerequisites
- A running mail-forwarding-api (already deployed and reachable)
- Domains already present/authorized in the core stack database (
domaintable) - Node.js (current LTS recommended)
- npm (or compatible package manager)
Installation
git clone https://github.com/haltman-io/mail-forwarding
cd ./mail-forwarding/mail-forwarding-ui/
npm install
Configuration
Create a .env.local file in the project root:
NEXT_PUBLIC_API_HOST=<API URL WITHOUT SLASH ON END>
Example:
NEXT_PUBLIC_API_HOST=https://mail.haltman.io
NEXT_PUBLIC_API_HOSTmust not end with/NEXT_PUBLIC_*variables are embedded into the frontend build and visible to users — do not put secrets here
Running
npm run dev
npm run build
npm run start
Available scripts:
dev→next devbuild→next buildstart→next startlint→eslint
Possible Problems / Important Notes
| Problem | Cause |
|---|---|
| UI loads but actions fail | NEXT_PUBLIC_API_HOST wrong, unreachable, or with trailing slash |
| Domain not selectable | Domain not present/active in the database |
| Mixed content / CORS issues | Serve UI and API over HTTPS; ensure API allows the UI origin |
| Wrong values in production | If you change .env.local, you must rebuild (npm run build) |
Was this page helpful?
Built with Documentation.AI
Last updated today

