This is a major breaking change that moves away from having the
entire app configuration in external TOML files to settings being
in the database with a UI to update them dynamically.
The app loads all config into memory (app settings, SMTP conf)
on boot. "Hot" replacing them is complex and it's a fair tradeoff
to instead just restart the application as it is practically
instant.
A new `settings` table stores arbitrary string keys with a JSONB
value field which happens to support arbitrary types. After every
settings update, the app gracefully releases all resources
(HTTP server, DB pool, SMTP pool etc.) and restarts itself,
occupying the same PID. If there are any running campaigns, the
auto-restart doesn't happen and the user is prompted to invoke
it manually with a one-click button once all running campaigns
have been paused.
- antd+react was resulting in extremely clunky and unreadable
spaghetti frontend code (primarily due to how antd is).
- Buefy is lighter by an order of magnitude, has excellent
responsive views (especially tables) and usability.
- Vue's templating produces far more readable template code.
- Clean up main.go (by moving init to init.go) and improve
composition comprehension.
- Refactor app context and init struct and field names.
- Update package dependencies in initialisation.
- Lists can now be marked as single | double optin.
- Insert subscribers to double opt-in lists send out a
confirmation e-mail to the subscriber with a confirmation link.
- Add `{{ OptinURL }}` to template functions.
This is a breaking change. Adds a new field 'optin' to the lists
table and changes how campaigns behave. Campaigns on double opt-in
lists exclude subscribers who haven't explicitly confirmed subscriptions.
Changes the structure and behaviour of how notification e-mail routines,
including notif email template compilation, notification callbacks for
campaign and bulk import completions.
- unchecked returns fixed (most)
- remove unused constants
- remove unsed structs
- function parameters unused or incorrectly used
- removed if else chains for error checks
- use regex MustCompile instead of compile
- spell checks
- preallocate slice cap when size known
- scope issues inside range
- Toggle options to enable self-service data export and wipe
options on the public unsubscription page. Subscribers can get
a copy of all data on them e-mailed to them as JSON, or
instantly wipe all their data.
- Refactor "unsubscribe" pages and URIs to "subscription".
- Add export icon to subscriber admin view.
This is a big commit that involves drastic changes to how static assets
(.sql and template files, the whole frontend bundle) are handled.
listmonk distribution should be a self-contained single binary
distribution, hence all static assets should be bundled. After
evaluating several solutions, srtkkou/zgok seemed like the best bet but
it lacked several fundamental features, namely the ability to fall back
to the local filesystem in the absence of embedded assets (for instance,
in the dev mode). Moreover, there was a lot of room for cleanup.
After a PR went unanswered, github.com/knadh/stuffbin was created. Just
like zgok, this enables arbitrary files and assets to be embedded into a
compiled Go binary that can be read during runtime. These changes
followed:
- Compress and embed all static files into the binary during
the build (Makefile) to make it standalone and distributable
- Refactor static paths (/public/* for public facing assets,
/frontend/* for the frontend app's assets)
- Add 'logo_url' to config
- Remove 'assets_path' from config
- Tweak yarn build to not produce symbol maps and override
the default /static (%PUBLIC_URL%) path to /frontend