A starter template for building serverless applications with SST and integrating Rocicorp's Zero. This repository combines the power of SST for managing infrastructure with Zero’s real-time sync engine to deliver lightning-fast, reactive applications.
sst-zero is a zero-config starter repository designed to help you quickly build and deploy serverless applications using SST while leveraging Rocicorp's Zero. Zero is a general-purpose sync engine that ensures:
- Instantaneous Response: Achieve near-zero latency in UI updates.
- Automatic Reactivity: Data changes propagate immediately, keeping your UI in sync.
- Simplified Development: Offload complex state management and synchronization to Zero so you can focus on building great features.
By combining SST and Zero, you can build modern, scalable, and reactive serverless applications with minimal overhead.
- Rapid Development: Live reloading for AWS Lambda functions combined with Zero’s real-time sync.
- Serverless Infrastructure: Declaratively manage AWS resources using SST.
- Real-Time Data Sync: Integrate Zero to enable near-instantaneous UI updates and reactive experiences.
- TypeScript by Default: Enjoy a modern development experience with built-in TypeScript support.
- Simplified Deployment: Easily deploy and remove your application stack on AWS.
Before getting started, ensure you have:
- Node.js version 22.x
- AWS CLI (configured with your credentials)
- Bun installed (see instructions below)
- Docker installed and running
Note: SST is installed as a local dependency, so you do not need to install it globally.
This project uses Bun as its package manager, bundler, and test runner. Choose one of the installation methods below based on your operating system:
Install Bun using the recommended installation script:
curl -fsSL https://bun.sh/install | bashAlternatively, you can use Homebrew:
brew tap oven-sh/bun
brew install bunFor Windows (requires Windows 10 version 1809 or later), open PowerShell or cmd.exe and run:
powershell -c "irm bun.sh/install.ps1 | iex"Alternatively, if you prefer using npm or Scoop, you can install Bun globally:
npm install -g bunor
scoop install bunAfter installation, verify that Bun is installed correctly by running:
bun --versionClone the repository and install the dependencies using Bun:
git clone https://github.com/lukeshay/sst-zero.git
cd sst-zero
bun installThe following environment variables are required for the application to run:
DOMAIN=""
# DNS
CLOUDFLARE_API_TOKEN=""
CLOUDFLARE_ZONE_ID=""
# OR
ROUTE53_HOSTED_ZONE_ID=""
Start the development environment with live reload:
bun run devThis command starts the SST development server, which watches for code changes and updates your running stack accordingly. With Zero integrated, your application will benefit from reactive data updates and near-instantaneous UI responsiveness.
To deploy your serverless application to AWS, run:
bun run deployAfter deployment, test your live endpoints and monitor your resources via the AWS console.
To remove the deployed stack, run:
bun run removeContributions are welcome! Feel free to open issues or submit pull requests with any improvements or bug fixes. For more details on Rocicorp's Zero, check out the Zero Documentation.
This project is licensed under the MIT License – see the LICENSE file for details.