Commit graph

36 commits

Author SHA1 Message Date
Kailash Nadh
f3e80da339 Clean up root and move app to cmd directory 2020-08-08 13:54:25 +05:30
Kailash Nadh
b822955ac9 Add BasicAuth to admin endpoints.
This removes the Nginx dependency for protecting admin pages.
BasicAuth is configured in config.toml. This is a "temporary"
setup until a full fledged auth mechanism is added.
2020-08-08 13:11:49 +05:30
Kailash Nadh
378e8145fe Add campaign search UI. 2020-08-01 19:46:47 +05:30
Kailash Nadh
ccf1c499ad Refactor pagination constants 2020-08-01 18:57:33 +05:30
Kailash Nadh
ec097909db Add support for List-Unsubscribe header.
- Added as a setting in the settings UI.
- Refactor Messenger.Push() method to accept messenger.Message{}
  instead of a growing number of positional arguments.
2020-08-01 17:54:51 +05:30
Kailash Nadh
13a252a7b3 Add missing 'opt-in' campaign feature to the new UI 2020-08-01 15:31:13 +05:30
Kailash Nadh
64d44707c2 Add {{ templating }} support to e-mail subjects 2020-07-05 18:39:24 +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
Kailash Nadh
ca032c89d6 Refactor manager.CampaignMessage's exposed fields 2020-03-08 15:02:20 +05:30
Kailash Nadh
892d5d2a20 Remove 'govalidator' package dependecy 2020-03-08 13:03:38 +05:30
Kailash Nadh
d4aea0a436 Add support for pushing non-campaign message with workers.
- Refactor campaign.Message into campaign.Message and
  campaign.CampaignMessage
- Remove ad-hoc goroutines (flawed approach) that were used to push
  admin and optin notifications.
- Provision for largscale pushing of ad-hoc, non-campaign messages
  such as transactional messages (in the future).
2020-03-08 12:27:41 +05:30
Kailash Nadh
5f6a4af6b4 Cleanup unnecessary pointers 2020-03-08 11:07:24 +05:30
Kailash Nadh
8853809713 Refactor and cleanup initialization.
- 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.
2020-03-08 00:06:48 +05:30
Kailash Nadh
83b49df39d Add missing error logs 2020-03-07 23:00:55 +05:30
Kailash Nadh
276942ab91 Replace outdated UUID lib 2020-03-07 20:37:48 +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
32a543bf4f Fix incorrect campaign API response when there are no campaigns 2019-12-06 21:39:18 +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
Kailash Nadh
649d1b11f0 Fix 'send later' switch + date not updating on campaign edit 2019-08-26 23:45:18 +05:30
Kailash Nadh
81d3046374 Refactor Messenger/Emailer to accept attachments 2019-07-18 12:40:48 +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
ffd43cec6c Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +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
1673cba964 Fix campaign send rate calculation 2018-11-27 11:44:54 +05:30
Kailash Nadh
6a1ee77dcf Fixed message rendering in test messages 2018-11-06 08:52:20 +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
acee18c58c Refactor dummyUser struct for use in multiple places 2018-10-31 19:50:26 +05:30
Kailash Nadh
b4e6ed658a Refactor and fix obsolete campaign template compilation and validation routines 2018-10-31 19:42:07 +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