← All projects
Project record1 mention
Originally shared on Hacker News

Server-rendered SaaS template

This SaaS starter template uses Dokploy to deploy a NodeJS app alongside a Pocketbase instance on the same server for fast database reads and writes. It avoids the Pocketbase client library entirely—API calls are wrapped in dedicated server-side API routes—and the whole app is server side rendered, with custom cookie middleware enabling Pocketbase's built-in auth in an SSR setup.

Last shared
01 / The problem

What it addresses

Backend-in-a-box tools like Pocketbase push a client-library-directly-to-DB paradigm and their auth isn't SSR-ready out of the box, requiring custom cookie middleware to make it work with server side rendering.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Server-rendered SaaS template

    This SaaS starter template uses Dokploy to deploy a NodeJS app alongside a Pocketbase instance on the same server for fast database reads and writes. It avoids the Pocketbase client library entirely—API calls are wrapped in dedicated server-side API routes—and the whole app is server side rendered, with custom cookie middleware enabling Pocketbase's built-in auth in an SSR setup.

    Problem: Backend-in-a-box tools like Pocketbase push a client-library-directly-to-DB paradigm and their auth isn't SSR-ready out of the box, requiring custom cookie middleware to make it work with server side rendering.

    Posted by @reassess_blind · Original source ↗

    Source text · @reassess_blind · · Source ↗

    Working on redesigning my SaaS template. It uses Dokploy to deploy the NodeJS app, and Pocketbase instance within the same server, so DB reads and writes are very fast. Also doesn't use the Pocketbase client library at all, all calls are wrapped in their own API routes and everything is server side rendered.