logo
Mail Forwarding (Self-Host)mail-forwarding-ui
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 (domain table)
  • 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_HOST must 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

Available scripts:

  • devnext dev
  • buildnext build
  • startnext start
  • linteslint

Possible Problems / Important Notes

ProblemCause
UI loads but actions failNEXT_PUBLIC_API_HOST wrong, unreachable, or with trailing slash
Domain not selectableDomain not present/active in the database
Mixed content / CORS issuesServe UI and API over HTTPS; ensure API allows the UI origin
Wrong values in productionIf you change .env.local, you must rebuild (npm run build)
Was this page helpful?
Built with Documentation.AI

Last updated today