Commit graph

54 commits

Author SHA1 Message Date
Kailash Nadh
378e8145fe Add campaign search UI. 2020-08-01 19:46:47 +05:30
Kailash Nadh
8c0804ba9f Refactor blacklist to blocklist 2020-08-01 16:45:29 +05:30
Kailash Nadh
9c8b7ad7f8 Fix broken tag clearing on lists and campaign updation 2020-08-01 13:09:52 +05:30
Kailash Nadh
942eb7c3d8 Add settings UI and "hot reload" support to the app.
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.
2020-07-21 00:23:57 +05:30
Kailash Nadh
61f8fae50d Add 'overwrite?' option to bulk import.
- Fix minor UI inconsitency on import states.
- Minor refactor to importer initialisation.
2020-07-05 21:35:17 +05:30
Kailash Nadh
e7da8fa668 Fix ordering of records on the subscribers page 2020-07-05 19:23:45 +05:30
Kailash Nadh
db032d3001 Change campaign status to draft on removing schedule 2020-07-05 18:42:38 +05:30
Kailash Nadh
24192a327f Refactor and fix media uploads.
- Fix path related issues in filesystem and S3.
- Add checks for S3 "/" path prefix.
- Add support for custom S3 domain names.
- Remove obsolete `width` and `height` columns from media table (breaking)
- Add `provider` field to media table (breaking)
2020-07-05 17:35:05 +05:30
Kailash Nadh
feb5ba09be Add new dashboard (with new metrics) 2020-07-04 22:25:02 +05:30
Kailash Nadh
97583fe4b4 Rewrite frontend with Vue+Buevy and ditch React+Ant Design.
- 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.
2020-07-04 00:12:14 +05:30
Kailash Nadh
3a9a2ef4ec Refactor get-campaign to accept uuid + get body 2020-04-26 15:51:26 +05:30
thejaswinipathi
c93ba78938
Changed on PR comment 2020-04-22 14:25:42 +05:30
Kailash Nadh
07856d34a2 Fix bug in e-mail scheduling 2020-03-08 15:29:53 +05:30
Kailash Nadh
442dec9341 Fix broken subscriber data export 2020-03-08 14:36:50 +05:30
Kailash Nadh
c08ca14a5b Add subscription forms 2020-03-07 20:22:01 +05:30
Kailash Nadh
6be3352f52 Refactor/merge optin-list fetch queries 2020-02-09 16:25:19 +05:30
Kailash Nadh
022b35c4a7 Add support for sending 'opt-in' campaigns.
- Campaigns now have a `type` property (regular, opt-in)
- Opt-in campaigns work for double opt-in lists and e-mail
  subscribers who haven't confirmed their subscriptions.
- Lists UI shows a 'Send opt-in campaign' optin that
  automatically creates an opt-in campaign for the list
  with a default message body that can be tweaked before
  sending the campaign.
- Primary usecase is to send opt-in campaigns to subscribers
  who are added via bulk import.

This is a breaking change. Adds a new Postgres enum type
`campaign_type` and a new column `type` to the campaigns table.
2020-02-09 11:36:15 +05:30
Kailash Nadh
a2d21a8bf0 Refactor opt-in subscriber selection queries 2020-02-09 11:36:15 +05:30
Kailash Nadh
ea302d11b7 Use default template if there isn't one in campaign creation 2020-02-09 11:36:15 +05:30
Kailash Nadh
871893a9d2 Add double opt-in support.
- 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.
2020-02-09 11:36:15 +05:30
Kailash Nadh
6681f189fc Fix 'send_at' option on the UI and bug in starting scheduled campaigns 2020-01-19 20:46:25 +05:30
Kailash Nadh
649d1b11f0 Fix 'send later' switch + date not updating on campaign edit 2019-08-26 23:45:18 +05:30
Kailash Nadh
31b9690d74 Remove orphan func 2019-07-21 21:22:26 +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
81fe874ee7 Refactor subscriber delete query to support UUIDs 2019-07-20 12:54:30 +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
d9585a7365 Add pagination to the lists page 2019-05-14 16:41:05 +05:30
Kailash Nadh
b467c9bc3f Fix incorrect sort order in stats SQL queries 2019-05-08 13:20:27 +05:30
Kailash Nadh
b078c0006c Fix missing lists fetch in query-campaigns 2019-04-23 22:36:20 +05:30
Kailash Nadh
cfec13c589 Optimize campaign and subscriber queries
- Simplify campaigns querying to separate statistics gather into
  a separate query for lazy loading.
- Simplify subscribers query to separate list fetching into
  a separate query for lazy loading.
2019-04-01 17:07:24 +05:30
Kailash Nadh
93c952082c Refactor campaigns query into two: 'query' and 'get' 2019-03-30 12:38:02 +05:30
Kailash Nadh
178604dbbf Refactor campaigns view
- Fix sorting issues
- Add status filter
- Add name + subject search
2019-03-28 17:17:51 +05:30
Kailash Nadh
01b43b992f Refactor get-campaigns query
The get-campaigns query was doing two direct joins with the campaign_views
and link_clicks tables (that have very large number of relationships)
to get the view and click counts. Now the campaigns are selected first
in a CTE and their views and counts are aggregated in two more CTEs,
and the whole thing is then aggregated to produce the final results.
2018-12-20 10:52:13 +05:30
Kailash Nadh
f54170d509 Add view and click counts to campaign API response and UI 2018-12-18 23:46:29 +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
cf5df3e476 Fix counting unsubbed users in campaign stats counts 2018-11-26 19:06:11 +05:30
Kailash Nadh
c132af22b1 Add automatic unsub of users blacklisted from admin 2018-11-26 19:01:18 +05:30
Kailash Nadh
4cd66d1790 Fix duplicates in multi-list campaigns with overlapping subscribers. 2018-11-26 18:16:20 +05:30
Kailash Nadh
b333d05609 Fix merge conflicts 2018-11-06 15:59:13 +05:30
Kailash Nadh
9511a78d91 Add welcome dashboard
- Add a stats overview API to aggregate global stats
- Add bizcharts to the project to render visualisations
- WIP: Add stats widgets and visualisations to the dashboard
2018-11-06 15:14:26 +05:30
Kailash Nadh
87873d0d33 Make subscriber fetching for previews random 2018-11-06 08:52:59 +05:30
Kailash Nadh
44442b2b62 Switch UI subscriber addition to a new insert-only query 2018-11-05 19:15:29 +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
6c5cf0da7a Add support for campaign view tracking with {{ TrackView }} pixel tag 2018-11-02 13:20:32 +05:30
Kailash Nadh
595bdb241a Set all campaign templates to default when a used template is deleted 2018-11-02 00:07:02 +05:30
Kailash Nadh
1473961ef0 Fix next-campaigns query to return campaign_ids with 0 counts as well when there were 0 subscribers in target_lists. This would result in started_at never being updated in the update sub query. 2018-11-01 17:51:29 +05:30
Kailash Nadh
d712afff97 Fix error on campaign creation when there are 0 target in target lists 2018-11-01 17:50:03 +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
f449f49107 Fix the completely broken unsubscribe query 2018-10-30 11:17:50 +05:30