Simple API for double opt-in waitlist signups using Go, Gin, GORM, mariadb and Resend for email sending.
Provides the following endpoints:
POST /v1/waitlist
with JSON body:{"email": "mail@example.com", "additionalInformation": {"firstName": "John"}}
(additionalInformation is optional)POST /v1/waitlist/opt-in
with JSON body:{"email": "mail@example.com", "confirmationToken": "[token provided in email]"}
POST /v1/waitlist/opt-out
with JSON body:{"email": "mail@example.com"}
- Clone the repository
- Copy the .env.sample (
cp .env.sample .env
) and adjust its contents (please take a look at their usages, a more detailed documentation will be provided soon) - Make sure docker (with compose) is installed
- Build the Go app and image using
docker compose build
- Run the app and DB using
docker compose up -d
(leave out -d if you don't want it to run in background, e.g. for debugging)
- More detailed documentation on setup and environment variables
- Export of registrations to JSON and an authorized admin API endpoint
- Support second email after confirmation
- Support manual email sending without Resend, using SMTP connection