Skip to content
/ cella Public

TypeScript template to build local-first SaaS with hono pg drizzle electric-sql react shadcn.

License

Notifications You must be signed in to change notification settings

cellajs/cella

Repository files navigation


Cella

Single stack TypeScript template to build local-first SaaS.

Website · Prerelease · MIT license


Caution

Please be aware this is a prerelease. It does not meet production requirements yet and large breaking changes still occur regularly. Want to contribute? Let's connect! ✉️ [email protected]

Contents


Installation

Prerequisites

  • Node: Check node with node -v. Install Node 20.x or 22.x. (ie. Volta).
  • Docker: Install Orbstack or Docker

First step is to clone

git clone [email protected]:cellajs/cella.git && cd cella

Use .env.example to create .env files in /backend, /email and /tus. Install and run docker.

pnpm install
pnpm docker

Start all servers:

pnpm dev

Page-related resources are handled by fetching from an API. Content-related resources use a local-first strategy with ElectricSQL. Generate backend migrations for both and client-side schemas for electrified schemas.

pnpm generate

Lastly, seed your db (with dev running) to sign in as admin user.

pnpm seed

Check it out at localhost:3000! Generated API docs can be found at localhost:4000/docs. Manage your local db with local.drizzle.studio.

More info

  • Please install Biome for code style. Fix with pnpm run check:fix and type check with pnpm run check:types
  • EADDRINUSE errors? Try sudo lsof -i :1080 -i :3000 -i :4000 and then kill -9 *PID* with a space-separated list of PID
  • pnpm cache issues? Try pnpm store prune
  • turbo cache issues? Try adding --force to the command
  • docker cache issues? Try docker builder prune --force


💙💛 Big thank you too drizzle-orm, hono, tanstack-router, electric-sql & shadcn.