Conclusion
We've setup a simple realtime offline-enabled chat application against a vanilla serverless/Postgres stack with the help of Replicache.
It's a little bit more work than an all-in-one system like Firebase, but you can implement it directly against your own stack without reliance on a giant third-party system.
This particular application is trivial, but the techniques generalize to much more complex systems. For example, see Repliear our realtime collaborative bug tracker.
Feedback
We would love to have your feedback about this setup guide: was it easy to follow, is there anything that's unclear, suggestions for improvements, etc. Please feel free to contact us with your feedback!