Quick Use
ssh terminal.shop— order coffee, see the TUI in action- Read
github.com/terminaldotshop/terminalsource - Use their
sst.config.tsas a template for your own SST + Stripe app
Intro
Terminal Shop is a working coffee subscription business that you place orders for by SSH-ing into the shop — ssh terminal.shop literally drops you into a TUI checkout. Built by the SST team as proof that serverless TypeScript + Bun + Stripe + a creative TUI can ship a real consumer business. Read the source to see how SST's primitives compose in production. Best for: founders looking for a wild SST reference architecture, devs curious about terminal-as-storefront UX, anyone who wants coffee. Works with: any SSH client. Read time: 30 minutes for the source code tour.
Try it now
ssh terminal.shopThat's the whole onboarding. The TUI handles product browsing, cart, payment via Stripe, and shipping address — all over SSH.
What it teaches about SST
- SSH as a frontend. Custom SSH server in TypeScript using
ssh2+ Bun, routed through Cloudflare. Demonstrates that SST + TS is general enough to host non-HTTP protocols. - Stripe Connect integration. Real money flows; Stripe webhooks update SST DynamoDB tables.
- Edge auth. Cloudflare Worker validates SSH key fingerprints against the user table before terminating to the SST backend.
- Audit + observability. Every TUI key event logs to CloudWatch via SST's
Realtimeprimitive.
Source code highlights
// packages/functions/src/ssh-server.ts
import { Server } from "ssh2";
import { handleSession } from "./session";
const server = new Server({
hostKeys: [process.env.HOST_KEY!],
}, (client) => {
client.on("authentication", (ctx) => ctx.accept());
client.on("session", (accept) => handleSession(accept()));
});
server.listen(2222, "0.0.0.0");Why founders should read it
It's a 5-figure-revenue business that ships from one repo with under 2,000 lines of glue code. Whatever you think your MVP needs, Terminal Shop probably ships it with less. Studying the SST infrastructure file (sst.config.ts) is the most useful 10 minutes you'll spend learning SST.
Replicate this for your project
// sst.config.ts (skeleton from Terminal Shop)
export default $config({
app(input) {
return {
name: "my-shop",
removal: input?.stage === "production" ? "retain" : "remove",
home: "aws",
providers: { cloudflare: true, stripe: true },
};
},
async run() {
const products = new sst.aws.Dynamo("Products", { fields: { id: "string" }, primaryIndex: { hashKey: "id" } });
const checkout = new sst.aws.Function("Checkout", { link: [products], handler: "src/checkout.handler" });
return { checkoutUrl: checkout.url };
},
});FAQ
Q: Is the whole source actually public? A: Yes — github.com/terminaldotshop/terminal. They open-source the full stack including SST config, SSH server, TUI components, Stripe webhooks. Great reading material.
Q: Could I copy this exact pattern? A: Yes for the SST/Stripe/Cloudflare stack. The SSH-as-storefront UX is unusual — works because the audience self-selects (devs who SSH for fun). Replicating SSH retail without a tech-savvy audience won't move the needle.
Q: How much does it actually cost to run? A: AWS bills under $100/mo at their volume thanks to serverless + DynamoDB scaling. Most cost is Stripe fees + actual coffee + shipping. The infra footprint is famously small for the revenue.
Source & Thanks
Built by Terminal (SST team side project). Source open.
terminaldotshop/terminal — ⭐ 2,000+