Here's the tech stack I used to build this site (if anyone cares). Using Typescript on the frontend and backend

  • Frontend - Next.js, TailwindCSS, Apollo

  • Backend - Node.js, Express, Apollo (GraphQL), TypeORM, TypeGraphQL. Database is PostgreSQL. Redis used for sessions.

  • Servers are hosted on Google Cloud Run, and PostgreSQL database hosted on Digital Ocean (a lot cheaper than Google Cloud). GitHub actions for CI/CD, and pnpm workspaces for the monorepo (actually I didn't set up the last two for this project yet, but I did for my more recent projects so definitely will implement).

I've got mixed feelings on GraphQL to be honest. I like that the schema is built into it, but I'm not a big fan of Apollo, and the tooling is more immature than REST APIs.

These days I'm just using traditional REST APIs for my projects as it's simpler (eg. for mindgarden.app which is a Notion clone I've been building). I built zsync last year though when I was more comfortable with GraphQL. I guess we'll see which makes more sense. Beauty of using TypeGraphQL/TypeORM is that it makes it relatively simple to implement both. With a public API, I think it makes sense to offer both a REST API and a GraphQL API.

I also want to add websockets support so that posts update in real-time. Honestly there should just be a good backend abstraction that offers the REST API, GraphQL, and websockets (eg. feathersjs does this). If there's a good abstraction for this please post in the comments. Otherwise maybe I'll end up making my own, admittedly for the fun of it.

That's the challenge with building stuff as an engineer though - so easy to get lost in technical rabbit holes when users don't give a f about your tech stack as long as your product has the right features and works.

jeremybernier🔗 | 1 year ago

FYI: A couple weeks ago I migrated off GraphQL and back to a traditional REST API (Node.js, Express), and using react-query on the frontend (which I don't like, so I'll replace with something else). Took me way longer than I expected to migrate the backend, largely because the previous code sucked. But for my sanity was worth it.

mvasilkov🔗 | 1 year ago

When trying to submit a comment, I've got a popup to log in — but after I did, the comment was gone. It wasn't very intelligent, that comment, just some mild agreement on Next.js and TypeScript being good, and GraphQL being meh. So nothing of value was lost. And we got this bug report in return! Basically a win-win situation.

jsavage🔗 | 1 year ago

Haha sorry about that terrible UX and thanks for letting me know, def gotta fix that.