fredwu

fredwu

Just launched my 3rd Elixir/Phoenix SaaS

Hey folks,

Just wanted to share my journey and experiences so far. Preface: I’ve been using Elixir for about 10 years now, so relatively experienced. Over the years I’ve contributed to and released a few open source libraries in Elixir too (Petal, ExDoubleEntry, Crawler, Simple Bayes and OPQ, etc).

I’ve worked on many commercial projects in Elixir, but about 2-3 years ago I started building my own SaaS products - mostly because there were products I wanted to use but didn’t exist.

First was Persumi - a blogging platform that turns your blog into audio, because I started consuming way more audiobooks and podcasts than I do blogs and books.

Then there was Rizz.farm - a Reddit lead generation platform, because I wanted a tool to help me organically grow Persumi.

And a few weeks ago, I started building FeedBun - a browser extension that decodes food labels for healthy eating, because I wanted something similar and all I can find were barcode scanning tools.

Anyway, the products themselves aren’t the focus, because this is an Elixir forum, let’s talk about the tech.

Several years ago I stumbled upon Petal when I was trying to find a boilerplate to save me time building things like auth. Quickly I started contributing to it, and I’m very happy and proud to be part of a project that have helped many (myself included) launch products faster.

All three products were built on Petal, and Postgres. I deploy them to Fly.io - which has been a mixed bag experience for me. I still like its globally-distributed nature, but stability isn’t their strength. For Persumi and Rizz.farm, I also used Fly’s (unmanaged) Postgres, and have only just very recently migrated them to Fly’s managed Postgres. The experience again was a mixed bag - at the time of my migration, their managed Postgres didn’t support the citext extension. Though according to their docs it’s now supported? I can’t confirm.

For FeedBun, I opt’ed to using Supabase. So far it’s been a painless experience so fingers crossed.

Persumi and Rizz.farm were both mostly hand-written, in a sense that Github Copilot back in the day didn’t do much beyond some basic auto-completion, which in itself was a hit and miss. It took me three months to build Persumi, and six weeks to build Rizz.farm, both were built whilst having a full time job.

The apps themselves are relatively straightforward. For Persumi I did initially experiment doing TTS (text-to-speech) inference on CPU locally on the server. Turns out it was a bad idea so I quickly pivoted to using Azure and Google’s TTS. With Rizz.farm there’s also integration with Reddit API and Google’s Search API. Reddit’s API is… “interesting” - kind of feels like looking at API docs from the 2000s, ha.

This time around, building FeedBun was “a little different”. Well, the tech stack is the same, just with more integration with LLM providers, I integrate with AWS Bedrock, Google Vertex, OpenRouter, Perplexity and OpenAI. This is so that I have a rich suite of LLM models to pick and choose, and to experiment and benchmark for different tasks. I built a bespoke solution to always have a list of LLM models (preferably from different providers) for any given task, so that if one LLM fails, the next one would come in and take over. I’ve configured “model groups” - ones that are hand-picked to do certain tasks, for example, smaller, low latency models for quick extraction tasks, grounded models for doing research tasks to greatly reduce / eliminate hallucination, etc.

Out of all the LLM models, surprisingly, my favourite ones are from Amazon’s Nova family. There are very cheap, and are extremely fast (low latency). My least favourite models are actually the OpenAI ones… No hate, just for some reason their models didn’t work very well for the prompts I have. In total I have about two dozens of LLM models configured in my app (not all are used).

The fact that I was able to release FeedBun as an alpha build, in just a few weeks, all comes down to using AI to help me code. I use Claude Code after having used Cursor for a while. Claude Code with Opus is quite good. Sometimes it drives me crazy, but overall I could not have built FeedBun in such a short amount of time without it, so I’m grateful for the advancements we’re seeing in the machine learning space.

Anyway, I’ve been rambling, this post was entirely hand-written, lol. Just thought I’d jot down these thoughts to share. If you’ve got any questions please feel free to ask.

Where Next?

Popular in Discussions Top

jdumont
I could write forever about this, but I’ll do my best to keep it succinct. For anyone familiar with event sourcing, what is your opinion...
New
tcoopman
Yesterday I watched OpenTelemetry: From Desire to Dashboard and it triggered me to take a new look at telemetry in Elixir. But I don’t k...
New
fredwu
Hey folks, Just wanted to share my journey and experiences so far. Preface: I’ve been using Elixir for about 10 years now, so relatively...
New
sym_num
I created a Forth processor in Elixir. This is my hobby project. https://github.com/sasagawa888/Forth
New
marciol
Thinking about how Contexts on Phoenix 1.3 are beautiful in the simplicity, elegance and minimalism, coalesced in the smallest unity of E...
New
jonator
FLAME is basically the dream for running AI agents that need system command access such as coding agents. However, I have concerns about ...
New
bartblast
Added by a user on X: https://x.com/aldicodes/status/1952095492139299036
New
bartblast
I recently started a discussion about reactive patterns in Hologram, but I realized I need to step back and design the composability arch...
New
ronindev
Hey everyone! :waving_hand: I just wanted to recommend https://seenode.com/ for deploying Phoenix apps. I’ve been using it recently and ...
New
sergio
Laravel just announced their Series A round for $57 million. If Laravel wasn’t already the defacto PHP stack, it now most certainly is. T...
New

Other popular topics Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement