Commit graph

30 commits

Author SHA1 Message Date
Karan Sharma
e5c3196b31 feat: Add blobstore package
This commit introduces a `blobstore` package and refactors the existing
upload mechanism. Upload is now handled by `providers` and the two
bundled providers are `S3` and `Filesystem`. `app.Blobstore` initialises
the correct provider based on the configuration and handles `Put`,
`Delete` and `Get` operations.
2019-10-31 11:25:31 +05:30
Rohan Verma
712ad2d517 chore: minor refactors based on static checks
- 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
2019-10-29 11:03:51 +05:30
Karan Sharma
65ef23b79b feat: read config from env 2019-10-01 16:54:50 +05:30
Kailash Nadh
3fddd78ebf Refactor "unsubscribe from all" (self-blacklist) behaviour.
- Add an option to toggle allowing subscribers to blacklist themselves.
- Move the "unsubscribe from all" to the subscription management page
2019-07-21 20:45:35 +05:30
Kailash Nadh
3b7902802e Add data privacy export / wipe features (aimed at GDPR compliance).
- 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.
2019-07-21 19:21:23 +05:30
Kailash Nadh
275554e57e Refactor config error message 2019-07-12 17:19:26 +05:30
Kailash Nadh
e89a54b957 Refactor and add new build routines
- Fix version injection in build
- Refactor Makefile
- Add --new-config flag to generate sample config
- Add license
- Remove autogenerated frontend README
- Refactor make dist to do end-to-end build
- Refactor build and add goreleaser conf
2019-07-09 15:57:04 +05:30
Kailash Nadh
61c2a728ca Upgrade to stuffbin v1.0.0 2019-07-05 14:08:48 +05:30
Kailash Nadh
089522a2e5 Replace config struct tags 2019-06-26 17:02:42 +05:30
Kailash Nadh
65317503cf Remove hardcoded binary name from unstuff routine 2019-06-26 16:55:59 +05:30
Kailash Nadh
fe4f39f65d Replace viper with koanf 2019-06-26 16:53:23 +05:30
Vivek R
11ca4beddb chore: fix frontend directory structure 2019-05-27 17:17:26 +05:30
Vivek R
09117426ee feat: add config to enable/disable postgres ssl mode 2019-05-27 17:16:46 +05:30
Kailash Nadh
3a6f15e9dc Update list date on import before notif and run notif as a goroutine 2019-05-14 22:18:18 +05:30
Kailash Nadh
8701cb445a Fix import and campaign page and integrate new paginated lists API 2019-05-14 22:06:14 +05:30
Kailash Nadh
7eeb813f19 Add embedding of static assets for standalone dist binary
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
2019-01-03 16:48:47 +05:30
Kailash Nadh
ffd43cec6c Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +05:30
Kailash Nadh
5f0e3acfb9 Add bulk subscriber querying, segmentation, and management features
- Add a name / e-mail "quicksearch" input to the UI
- Implement row selection and aggregation at table level and a "select all" that selects all rows at the query level
- On selected subscribers, add bulk list management (add / remove / unsubscribe), blacklist, and delete
2018-12-18 10:54:55 +05:30
Kailash Nadh
c24c19b120 Add admin e-mail notifications.
- Add notifications for campaign state change
- Add notifications for import state change

Related changes.
- Add a new 'templates' directory with HTML templates
- Move the static campaign template as a .tpl file into it
- Change Messenger.Push() to accept multiple recipients
- Change exhaustCampaign()'s behaviour to pass metadata to admin emails
2018-11-28 13:29:57 +05:30
Kailash Nadh
1a39ed15ec Add support for campaign error tracking and auto-pause.
When a campaign exceeds N number of message send errors, for instance
SMTP errors, it is now auto-paused until there is manual intervention.

For this, the master goroutine in runner.Run() that was synchronising
between the tick based DB scanner and subscriber fetching has been
split into two. A new queue aggregates send errors from workers
again a threshold after which the campaign is paused.
2018-11-26 16:40:51 +05:30
Kailash Nadh
b333d05609 Fix merge conflicts 2018-11-06 15:59:13 +05:30
Kailash Nadh
f2c09e716c Refactor the import process
- Add 'Subscribe' and 'Blacklist' modes to the importer
- Removed 'override status' and the support for the 'status' field in import files
2018-11-05 16:59:09 +05:30
Kailash Nadh
31e180089e WIP: Add dashboard stats queries and endpoint 2018-11-05 11:19:08 +05:30
Kailash Nadh
de4e848e6d Sanitize config paths 2018-11-02 23:57:07 +05:30
Kailash Nadh
ad8787cab3 Load global configuration into the frontend as a JS dict using a <script> inclusion 2018-11-02 23:33:00 +05:30
Kailash Nadh
6c5cf0da7a Add support for campaign view tracking with {{ TrackView }} pixel tag 2018-11-02 13:20:32 +05:30
Kailash Nadh
81953d68d0 - Refactor and move template compilation from runner to models.Campaign to support adhoc template funcs
- Add support for {{ Track "https://url.com" }} in templates to register and track links
2018-10-31 18:24:21 +05:30
Kailash Nadh
d89b22e757 Add 'send campaign test' feature 2018-10-29 15:20:49 +05:30
Kailash Nadh
a1b5a39cfb Added preview component with preview support for campaigns and templates 2018-10-26 11:18:17 +05:30
Kailash Nadh
3ab21383b1 Fresh start 2018-10-25 19:21:47 +05:30