Introducing rx
Tired of all the scaffolding and roles, buckets, tables, auth, payments, and everything else you have to set up every time you start a new project? rx is here for you.
Introducing rx, a cloud client for getting stuff done. It makes it really easy to deploy any TypeScript function to the cloud. You just have to write some code, hit Cmd + S to save in your editor, and your changes are deployed automatically. It redeploys every time you save, usually in under a second, so your changes are live instantly. It has a bunch of stuff built in and nothing to configure. It's just plain functions.
Each function has access to secrets, storage, auth, payments, and more, all built right in!
Use the power of the cloud without any new concepts to learn. By the time you scroll to the bottom of this document, you'll be an rx expert.
π₯ Bottomless storage for objects, files, logs, and secrets
π₯ Free auth and analytics
π₯ No cold starts
Write functions in TypeScript
export async function sayHello () {
return 'Hello there!'
}
Automatically deploy to the cloud as you save
rx dev
Create environments with a single command
rx deploy prod
Use virtually infinite secrets, object, and blob storage
const user = context.storage.get('some-user-id-key')
const apiKey = context.secrets.get('some-api-key')
Each function has access to a powerful context object
context.ai
context.auth
context.cache
context.functions
context.payments
context.request
context.secrets
context.send
context.schedule
context.storage
Call any user's public functions
const response = context.call({
user: '@someUser',
function: 'doStuff'
})
Lookup data from any other user or function's storage
const user = context.storage.get({
user: '@someUser',
function: 'doStuff',
key: 'some-user-id-key'
})
Send email and SMS notifications to yourself
context.email('That was easy!')
context.sms('Hey, this is an important alert!')
Auth is finally easy
export function doStuff (context: Context) {
if (context.hasRole('admin')) {
return 'Hey admin!'
}
if (context.isAnonymous()) {
return 'Hey, you might want to sign in for more features!'
}
return 'Hey user!'
}
Return JSON, React JSX pages, or anything else
export function homePage (context: Context) {
return (
<>
<h1>Home</h1>
<p className="text-xl text-blue-300">
TypeScript, Tailwind, and more are built in with
no configuration and no build tools!
</p>
</>
)
}
Use AI to generate text, scrape websites, and more
const rhymes = await context.ai('What rhymes with orange? π')
const articles = await context.ai({
prompt: 'What articles are on these pages?',
schema: {
articles: z.array(z.object({ title: z.string() }))
},
data: {
urls: [
'https://cnn.com/',
'https://news.ycombinator.com/'
]
}
})
Schedule things to run in the future
Use English, like immediately
, within 24 hours
, after 5 minutes
, next week
, every last Friday of the month
or use a timestamp or cron syntax.
export function onUserSignup (context: Context) {
const { email } = context.request
context.schedule({
when: 'immediately',
function: context.functions.sendWelcomeEmail,
params: { email }
})
}
Payments, and more, all built right in
Create checkout links so that customers can pay you.
const link = context.payments.createCheckoutLink({
product: {
name: 'Fur coat',
price: '$249.99'
},
discount: {
percent: 20
},
link: {
expiresIn: '30 minutes'
}
})
Powered by
Coming soon
β¨ Browse all data in a nice spreadsheet-like GUI
β¨ Typed remote function calls
β¨ Import packages from any language
β¨ Share functions publicly
β¨ Deploy in your own cloud account (AWS, GCP, Azure, DigitalOcean, Fly, Docker)
Beta access
Excited to try this out and want to get started right away?
Drop your email to get added to the beta. When accepted, you'll receive an API key and instructions via email.
You can also watch some short 1 minute intro videos here.
Not in the beta yet? You should reserve your username, like rx.run/you.
See the latest updates from our blog.