ENGINEERING ★ 41 upvotes 2012

How we built our HTML email editor using liquid, wysihtml5 and premailer

Retrospective Overview & Key Insights

Distilled analysis of the business dynamics, operational challenges, and strategic takeaways:

In this technical retrospective (2012), @atestu shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.

Core Principles for Independent Builders:
1
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
2
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
3
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:

HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.

Community Discussions & Critical Reviews

High-signal perspectives, counter-arguments, and peer founder insights debated on Hacker News (9 total discussions):

CH @chadyj Peer Contributor

Great work guys! I think you hit the nail on the head with the template style being the best approach for easily putting together emails with clean code. HTML email editors are in a terrible state and that is why I have created Sendicate (http://sendicate.net)

For more reasons why you should ditch the traditional WYSIWYG style approach have a look at:

1. http://www.chadyj.com/post/21569743980/content-sections-as-poetry-an-email-wysiwyg 2. http://www.chadyj.com/post/21158280879/die-wysiwyg-die-lets-focus-on-content-instead 3. http://www.chadyj.com/post/20729167319/email-newsletters-are-broken-there-has-to-be-a-better

DR @drivebyacct2 Peer Contributor

I'm trying really hard not to scoff. This is pretty much a standard way of doing any sort of embedded content in any templating system or language that has ever existed. Ever.

I'd recommend running the child HTML through some sort of validation to clean up the markup or otherwise ensure it doesn't alter the content that follows it in the template.

Also, depending on your userbase, it may be easier, or actually recommended, to use something like Markdown instead. It won't let them shoot themselves in the foot like HTML or a rich text editor will. I've seen content that was heavily formatted and styled that looked atrocious in the template, do to the template's parental styling or just poor user taste.

JF @jfhollingworth Peer Contributor

Out of interest, is that using https://github.com/jhollingworth/bootstrap-wysihtml5?

DU @dullboy Peer Contributor

How do you handle the problem that there might be HTML tags between "{{" and the keyword "content", or between "content" and "}}" ?

CO @corkill Peer Contributor

What service do you use to send the emails?

HISTORICAL ERA Web 2.0 Genesis (2007–2013)
COMMUNITY SCORE ★ 41 points
TOTAL DISCUSSIONS 9 comments
TOPICS & TECH STACK: