Hacker News new | ask | show | jobs
by vasanthk1125 478 days ago
Tech Stack

    Backend: Elixir & Phoenix
    Database: PostgreSQL with Supabase (originally CockroachDB, big mistake)
    Auth: Supabase
    Frontend: Next.js
    UI Components: shadcn
    GraphQL API: Absinthe
    Hosting: Fly.io (Phoenix) + Vercel (Next.js)
    Storage: Cloudflare R2 + CDN
5 comments

What happened with cockroach? :)
They switched to a non-free license about 6 months ago [0]. This is not just the usual BSL terms of "do not compete with our hosted offering, but use it in your own product without issue", but they mandate telemetry from the free version.

Oxide and Friends did a great episode on it at the time [1].

[0] https://www.cockroachlabs.com/docs/stable/licensing-faqs

[1] https://oxide-and-friends.transistor.fm/episodes/whither-coc...

I am curious too
Why Next.js and not Liveview?

Little note: It seems the search is only by book title, not by author and not resilient to typos.

LiveView just has fewer libraries. For example, we use a rich-text editor called TipTap, and I’m not sure there’s anything similar for LV.

Yeah, search is currently by book title and series name. It should handle typos pretty well—Meilisearch allows for up to two—but I still need to tweak it further

Does Phoenix have auth? Any reason you chose supa over phoenix? And do you store user info (reviews+stuff) in phoenix and just reference it with the supa uuids or do you store user generated info on their own in supa?
Phoenix doesn’t have built-in auth, and setting it up with Guardian (the JWT library for Elixir) took too much time. Since we were already using Supabase for Postgres, we decided to go with its auth to move faster. Supabase provides a UUID after authentication, which we then use throughout the rest of the database.
Why do you use supabase and not just postgres?

Do you use supabase’s api interface to do the queries? Or do you use supabase for other features?

When I first started working on the website nine months ago, I didn’t even know what Postgres was, so going with an easier option made sense. Right now, we also use Supabase for auth and emails.

For queries, we don’t use Supabase’s API interface—we interact with Postgres directly through our backend

Thanks for your answer. Interesting take that you did not know about postgres, but chose an api for storage instead. I would have done the opposite.
Well, they use Supabase for auth. Perhaps there's other integration there.
Why Elixir & Phoenix and Next.js?