Coder Social home page Coder Social logo

pentacent / keila Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 61.0 6.65 MB

Open Source Newsletter Tool.

Home Page: https://keila.io

License: GNU Affero General Public License v3.0

Elixir 67.46% SCSS 1.69% JavaScript 6.37% Dockerfile 0.32% CSS 0.62% Liquid 3.26% HTML 20.28%

keila's People

Contributors

aej avatar beeb avatar dompie avatar explorerkut avatar gbottari avatar jcambass avatar jdpdo avatar katafrakt avatar kianmeng avatar nelsonic avatar panoramix360 avatar pascalwengerter avatar wmnnd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keila's Issues

Add API for Contact health and bounces

I think it makes sense to introduce a point-based system to determine whether a Contact is "healthy".
This is to avoid sending emails to outdated contacts and avoid misuse of Keila by spammers.

Here is my current idea:

  • Sign-up with double-opt-in or Captcha receive a (permanent) health rating boost of five points
  • Interacting with an email (click/open) (temporarily) improves health rating by one point
  • A soft bounce (temporarily) decreases health by one point
  • A hard bounce (permanently) decreases health by five points
  • A complaint (permanently) decreases health by 100 points
  • Contacts with a health rating of less than 0 are excluded from campaigns

The API would look something like this:

  • Mailings.increase_contact_health(Contact.id(), integer()) :: :ok
  • Mailings.decrease_contact_health(Contact.id(), integer()) :: :ok

The Filter API should be adjusted to default to filtering for contact_health >= 0

Health ratings could be implemented either with a dedicated ledger-style table or as a simple field in the Contacts schema.

Feedback on this is very welcome 😃

Infinite loader

How can I check why my campaign is infinetely loading and is not sending properly?

image

Improve compatibility with desktop Outlook + Windows Mail

Outlook and Windows Mail are some of the world’s most popular email clients.

Right now, there are several severe display bugs with our version of the Cerberus theme:

  • Outlook 2019:
    3f6d5c2eab06

  • Windows Mail (Windows 10):

f3c973105b42

For reference: Thunderbird (correctly displayed email)

84be2bcbf6db

Update Solid dependency

Solid 0.7 now has the missing features from pentacent/solid and we can go back to the upstream version.

Migrations didn't go well

I have an issue with migrations. I have this message:


postgres    | 2021-09-28 19:56:25.903 UTC [38] ERROR:  relation "public.oban_jobs" does not exist at character 284
postgres    | 2021-09-28 19:56:25.903 UTC [38] STATEMENT:  SELECT o0."id", o0."state", o0."queue", o0."worker", o0."args", o0."meta", o0."tags", o0."errors", o0."attempt", o0."attempted_by", o0."max_attempts", o0."priority", o0."attempted_at", o0."cancelled_at", o0."completed_at", o0."discarded_at", o0."inserted_at", o0."scheduled_at" FROM "public"."oban_jobs" AS o0 WHERE (o0."state" = ANY($1)) AND (o0."inserted_at" > $2) AND ((o0."worker" = $3) AND ((o0."queue" = $4) AND (o0."args" @> $5 AND $6))) ORDER BY o0."id" DESC LIMIT 1
postgres    | 2021-09-28 19:56:26.014 UTC [38] ERROR:  current transaction is aborted, commands ignored until end of transaction block
postgres    | 2021-09-28 19:56:26.014 UTC [38] STATEMENT:  INSERT INTO "public"."oban_jobs" ("args","attempt","errors","max_attempts","meta","priority","queue","state","tags","worker") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) ON CONFLICT DO NOTHING RETURNING "id"

Anybody knows how to fix it or somebody have existing sql schema just to export into psql?

Get notifications for people that unsubscribed

There should be some sort of info if a user unsubscribes. The current way only works well if they've signed themselves up for a newsletter. With no information if someone has unsubscribed from the newsletter it's a lot of work to filter them out if you have the same contact in multiple campaigns or if you want to mark that person as "no newsletter" in your customer database that lives outside of keila.

Hope I followed you issue guidelines, really enjoying keila so far ;-)

Automatically run migrations + setup admin user on first launch

Many applications such as Postgres automatically create an admin user when the env variables ADMIN_USER and ADMIN_PASSWORD are set on first launch.

Keila should automatically run migrations (via Keila.ReleaseTasks.init()) and create an admin user when the env variables are set.

Usability, Password Input fields

Some sender configurations use password_input, while this is good for security it makes it harder for users to understand if they have set a value or not.
image

This together with the fact that one can set values in multiple tabs at the same time makes it hard for users to understand which config they have configured and which one is now actually active (separate issue):

Maybe we should consider rendering some placeholders like ***** when a value is set in the password fields. Or if we really want we could display the actual values stored in the database, this would also make it easier for users to ensure that they have configured the correct value without just resetting it.

Campaign Editor shows different Font than defined in Template

During a very quick test of the template editor I noticed that the Campaign editor shows the wrong font uppon selecting a previously created template.

Preview in Template Editor

Screenshot 2021-03-31 at 19 55 34

Preview in Campaing Editor

Screenshot 2021-03-31 at 19 55 58

Opening the Campaign Editor in split view renders the font correctly:

Screenshot 2021-03-31 at 20 00 03

Check handling of email addreses with special characters

I just noticed on another project that gen_smtp/Swoosh threw errors when using email addresses with special characters.
It needs investigating how Keila can/should handle email addresses such as äðç@example.com or foo@äðç.example.com if both of these cases are considered even valid email addresses.

Custom Contact fields

It should be possible to create and add custom fields associated with each Contact.

[Question] How to access Admin Dashboard

I'm a little confused as I'm seeing reference to an Admin Dashboard, but I'm not seeing it anywhere. My account was the first one but it doesn't seem i was given the admin role. I'm not seeing anything in the documentation either on how to even see who is the admin. Thanks for any help you can offer.

Show Contacts stats

There should be an overview of the number of Contacts plus a number of recent subscriptions.

The MVP doesn’t need to include historical data. A feature with daily aggregation of historical data could be added later.

Feature Requests and/or Questions

I've been playing with Keila and really like it's simplicity and distraction free interface over that of tools like Mailchimp. My use case for using this tool is to host a newsletter service for our staff to send emails out to donors who support our organization. Is there any plans for the following:

  • Allow SAML authentication and automatic account provisioning. I'm sure others would love facebook/twitter/google sign up too.
  • Administratively be able to set the email settings for a user so they don't have to
  • Allow predefined templates for all users that are non-editable.
  • Contact import from gmail, mailchimp, or other popular email services?
  • Administratively see user of organization usage and status.
  • Automated import of contacts from a data object such as json or other per user (a import of donors that have given towards a specific person)
  • Option to insert certain 'template tags' from the markdown editor and make is prettier for end user
  • Preview button regardless of editor (right now in markdown, you have to view code editor, then hit preview button)
  • Set a template as default
  • Create separate lists of contacts or segments within a project
  • Email/Webhook notice when a scheduled campaign is sent
  • Ability to send a test email of a campaign
  • Clone a template

I think that's all I got for now, but very excited about this project.

Improve onboarding experience

Right now, getting started with a new Keila account can be a little confusing. There should be an onboarding that explains

  • What a project is
  • What a sender is
  • What a template is
  • What a form is

Full API

Campaigns

GET /api/v1/campaigns - Fetch list of campaigns

POST /api/v1/campaigns - Create a new campaign
GET /api/v1/campaigns/:id - Fetch existing campaign
PATCH /api/v1/campaigns/:id - Update existing campaign

POST /api/v1/campaigns/:id/actions/send - Send existing campaign
POST /api/v1/campaigns/:id/actions/schedule - Schedule existing campaign

Contacts

GET /api/v1/contacts - Fetch list of contacts – needs pagination and filtering

POST /api/v1/contacts/actions/import - Import contacts
POST /api/v1/contacts/actions/export - Export contacts

POST /api/v1/contacts - Create a new contact
GET /api/v1/contacts/:id - Fetch existing contact
PATCH /api/v1/contacts/:id - Update existing contact

Provide docker-compose configuration

I just spent an awful amount of time today trying to get the provided pentacent/keila running on a private server, mostly due to a messy PostgreSQL setup.

Maybe a docker-compose.yml in the likes of the sketch below could be useful? Would be lovely to being able to "just" run docker-compose run -d app and be done with the setup 😎 happy to help with it, too!

version: "3"

services:
  app:
    image: pentacent/keila
    ...

  db:
    image: postgres:13.2
    ...

Update gen_smtp/OTP

There’s a breaking change in the latest patch release of OTP that’s interfering with gen_smtp: erlang/otp#4585

As soon as there is an update either of OTP or gen_smtp, we should implement it for Keila.

/bin/sh Error when deploying Docker Container

I'm running into an error when trying to deploy the docker image. I've tried building the image and deploying it on my local machine in a test env. Thanks for the help in advance. Love the project. Below is the log output from the default docker-compose.

keila_1     | Usage: keila COMMAND [ARGS]
keila_1     | 
keila_1     | The known commands are:
keila_1     | 
keila_1     |     start          Starts the system
keila_1     |     start_iex      Starts the system with IEx attached
keila_1     |     daemon         Starts the system as a daemon
keila_1     |     daemon_iex     Starts the system as a daemon with IEx attached
keila_1     |     eval "EXPR"    Executes the given expression on a new, non-booted system
keila_1     |     rpc "EXPR"     Executes the given expression remotely on the running system
keila_1     |     remote         Connects to the running system via a remote shell
keila_1     |     restart        Restarts the running system via a remote command
keila_1     |     stop           Stops the running system via a remote command
keila_1     |     pid            Prints the operating system PID of the running system via a remote command
keila_1     |     version        Prints the release name and version to be booted
keila_1     | 
keila_1     | ERROR: Unknown command /bin/sh

Allow customization of Markdown campaign template

I think it would be a pragmatic approach to allow users to create modifications to the default Markdown template before implementing a fully-fledged templating system.

My idea would be a workflow like this:

  • Templates page
  • Create new template
  • Editor with the following features:
    • Customize logo
    • Customize colors
    • Customize font

These changes could then be applied via the CSS parser. Adding ids to the affected parts of the default template might make it easy to inline and process.

Warning about leaving editor pages

When trying to leave the editor pages like the template or campaign editor and changes have been made, there should be a dialog warning about discarding progress.

Improvement suggestions for setup guide

Two things I've come across when trying to get the pentacent/keila Docker image running today:

  1. I needed to create a SECRET_KEY_BASE environment variable myself. It would be nice if it was mentioned in the setup guide, since it's quite easily done with:
mix phx.gen.secret
  1. I am not sure if the DATABASE_URL environment variable needs the @HOST config parameter. In the docs you mention URL following the schema postgres://user:password/database, while the official documentation suggests something along the lines of DATABASE_URL="ecto://USERNAME:PASSWORD@localhost/database".

Send later feature

Instead of sending campaigns immediately, there should be an option to automatically send campaigns at a later date.

This should be implemented as an Oban scheduled job.

  • Implement Mailings.campaign_deliver_later with Oban scheduled job for sending
  • Implement interface for scheduling campaigns from campaign editor. Include option to select timezone.

Introduce PurgeCSS for Tailwind

When checking if Webpack works on #26 I realized that the ../css/app.ass/ is ~4MB in size. This is due to Tailwind creating a lot of helper classes and can be optimized for production use via PurgeCSS.

Here's a guide, happy to take care of this eventually (unless someone else is quicker than me 🤓 )

WYSIWYG Editor for Markdown emails

Prosemirror has a schema for graphically editing Markdown.

This editor should be added to the Campaign editor in order to allow non-technical users to create simple campaigns. It will make Keila more useful even without a full WYSIWG HTML editor.

The WYSIWYG editor should support the following features:

  • Headings h1-h3
  • buttons (h4 + link)
  • links
  • bold/italics/underline
  • images (choosing URL + title/alt)
  • unordered lists
  • ordered lists
  • horizontal rule

Shared SES Adapter

When setting up an instance of Keila, you might not want to let users configure their own Senders. Instead, you might want to configure one or several globally available senders and let your users only configure some aspects about them. In order to solve this, I propose to:

1. Implement SharedSenders

SharedSenders are a new schema, very similar to the existing Senders. Unlike them, they are available globally and don’t belong to a project. In order to implement them, we need to:

  • Create new schema + build context functions
  • Add admin interface for configuring SharedSenders

2. Expand the SenderAdapters.Adapter behaviour

In order to implement a SharedSender for SES, there needs to be a mechanism to verify a sender via the SES API. So we should expand the SenderAdapters.Adapter behaviour:

  • Add Adapter.verify/1 callback. This should return :ok | {:error, message} | {:action_required, message}

3. Implement Keila.Mailings.SharedSenderAdapters.SES and Keila.Mailings.SharedSenderAdapters.Smtp

  • Implement SharedSenderAdapters in core
  • Add them to UI

4. Add configuration options

  • Add configuration option to disable non-shared senders
  • Add configuration option to disable shared senders

Add Precedence: Bulk header?

A user on r/selfhosted suggested to add the Precedence: Bulk header to all campaigns sent with Keila.
The idea is that it stops services such as GMail from sending automated out-of-office replies.

However, RFC 2076 says this header is "Non-standard, controversial, discouraged".
A later RFC, RFC 3834 also mentions the header and kinda-not-really suggests its use to avoid automatic responses.

I was also unable to find any official docs from Google on this.

So if anyone has any practical previous experience using this header, that would be greatly appreciated.

Add Click Tracking

There should be a new Context, Keila.Tracking.

This context should have the following functions:

  • register_link(campaign_id, url)
  • track_click(recipient_id, link_id)
  • track_open(recipient_id)

Tusk is not keila

In the readme it's stated that the word in Finnish for an elephant's tusks is "keila", but I cannot find any source for this being true. Google Translate does think so, I guess because the name of a fish called cusk or tusk is keila in Finnish. If you translate the plural "tusks", it responds with the correct "syöksyhampaat" ("syöksyhammas" being the singular form).

So the name of this project, if interpreted in Finnish, either means a bowling pin (the most used connotation I reckon, so used that "bowling" is actually "keilaus/keilailu"), a beam ("valokeila" = "beam of light"), or this fish (which probably most don't even know about, I sured didn't before this).

Admin user + admin panel

Keila already has a group-based authorization system (Keila.Auth)

The first user should automatically be assigned an admin role in the root group.

Users with admin role should have access to a simple admin panel, allowing them to see a list of users.

Contact segmentation

It should be possible to segment users by contact fields as well as interaction data with previous campaigns.

Docker-Compose deployment fails with ERROR: Unknown command /bin/sh

Using the example in the ops folder using the docker-compose.yml file, when trying to start the Keila container, I get the following error:

postgres is up-to-date
Starting keila ... 
Starting keila ... done
Attaching to keila
keila             | Usage: keila COMMAND [ARGS]
keila             | 
keila             | The known commands are:
keila             | 
keila             |     start          Starts the system
keila             |     start_iex      Starts the system with IEx attached
keila             |     daemon         Starts the system as a daemon
keila             |     daemon_iex     Starts the system as a daemon with IEx attached
keila             |     eval "EXPR"    Executes the given expression on a new, non-booted system
keila             |     rpc "EXPR"     Executes the given expression remotely on the running system
keila             |     remote         Connects to the running system via a remote shell
keila             |     restart        Restarts the running system via a remote command
keila             |     stop           Stops the running system via a remote command
keila             |     pid            Prints the operating system PID of the running system via a remote command
keila             |     version        Prints the release name and version to be booted
keila             | 
keila             | ERROR: Unknown command /bin/sh
keila exited with code 1

My docker-compose looks like this:

#Keila
  keila:
    image: pentacent/keila:latest
    container_name: keila
    ports:
      - "4000:4000"
    depends_on:
      - postgres
#    build:
#      context: ../
#      dockerfile: ops/Dockerfile
    environment:
      SECRET_KEY_BASE: "[REDACTED]"
      DB_URL: "postgres://postgres:postgres@postgres/postgres"
      URL_HOST: "keila.domain.com"
      MAILER_SMTP_HOST: "smtp.emailserver.com"
      MAILER_SMTP_USER: "[email protected]"
      MAILER_SMTP_PASSWORD: "[REDACTED]"

  postgres:
    image: postgres:alpine
    container_name: postgres
#    ports:
#      - "5432:5432"
    environment:
      POSTGRES_PASSWORD: postgres

This is similar to this issue I think - #64 - what other details can I provide?

Note: Not actual key or smtp password.

Bright flash during page transitions

Noticed this when navigating around the application locally: Everytime a link is clicked and the browser performs a (full) page transition, there's a tiny white flash screen for half a second - at least for me (Firefox, macOS, Darkmode).

I tried setting html, body, main {background-color: black} but that didn' work (since it's arguably a full page reload).

Perhaps Phoenix Liveview isn't fully configured yet to only replace the page content within the main tag or something? Guess that one is a quick win!

Upgrade Ecto to 3.6

There should be no breaking changes affecting Keila in this new release of Ecto.

Image & File Uploads

Right now, Keila has no way of including files or images with emails.

Before we start working on this, I think we should clarify the following questions:

  1. Do we want to support inlining images and email attachments?
  2. Which types of storage should be supported?
  3. Should Keila support bring-your-own-storage?
  4. Should Keila support processing (i.e. cropping/resizing) images?
  5. Can we rely on available libraries to do some of the heavy-lifting?

And finally: Even if the answer to all of the above questions is Yes: Which of these are absolutely necessary for version 1.0?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.