https://interval.com/ Skip to main content DocsGetting startedPricing More * Changelog * Security Search Log inSign up 10x better internal apps with 1/10th the code Build web apps for tasks like managing accounts, moderating content, and editing database records. All in your backend codebase, with zero frontend code. Get started Free for solo hackers and small teams. src/server/interval.ts 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 import Interval from "@interval/sdk"; import { getCharges, refundCharge } from "./db"; new Interval({ actions: { refund_user: async (io, ctx) => { const email = await io.input.email("Email"); const charges = await getCharges({ email }); const toRefund = await io.select.table( "Select one or more charges to refund", { data: charges } ); ctx.loading.start({ label: "Refunding charges", itemsInQueue: toRefund.length, }); for (const charge of toRefund) { await refundCharge(charge.id); ctx.loading.completeOne(); } }, }, }).listen(); interval.com Acme Corp. Actions Refund user Find and refund transactions for a user Invite from waitlist Create user account, send welcome email, and notify ops team to schedule onboarding call Moderate comments Scan recent comments to approve or mark as spam or off-topic Ban user Delete their account and disallow access Everything you need to go from script to internal app Interval is a batteries-included approach to building internal tools within your codebase. Just write business logic to power your tools in your backend, Interval handles the rest. User interfaces Nobody wants to spend time building UIs for internal tools. With Interval, just write business logic and sprinkle in calls to I/O methods when you need to collect input or display output. Explore I/O methods Because you're collecting input and displaying output right from your Node app, there's no need for REST/GraphQL APIs to connect a frontend and backend. const data = await db.charges.find({ userId: user.id }); const charges = await io.select.table('Select charges', { data, }); Select charges description amount date [ ] Subscription payment $27.00 4/20/2022 [*] Subscription payment $27.00 3/20/2022 [ ] On-demand 24-hr pass $15.00 3/7/2022 Because you're collecting input and displaying output right from your Node app, there's no need for REST/GraphQL APIs to connect a frontend and backend. Authentication By the time your Interval code is called, users have already been fully authenticated through email, Google, or SSO. Authentication docs Refund user Search for a user[ ] Alex Arena alex@interval.com Log in Email address Log inSign in with Google Logs Use the logging API to display progress to users running your Interval apps and to store logs for audits + reference. Logs docs if (charge.refunded) { ctx.log('Skipped already refunded charge:', charge.id); } LogsHistory Skipped already refunded charge: ch_m54TCsHu94RUWI Skipped already refunded charge: ch_C9toPWrldLU39Q Skipped already refunded charge: ch_1vCGbZcspTUawo Skipped already refunded charge: ch_qono23mc7VEtLz Notifications Dispatch notifications directly from your Interval actions. Your teammates can receive notifications however they want: through your group messaging app or email. Notifications docs if (refundAmount > 10) { await ctx.notify({ title: 'Refund over threshold', message: `A charge of ${refundAmount} has been refunded.`, }); } Interval APP6:10 PM Your Refund user action on Interval triggered a notification. Refund over threshold A charge of $10 has been refunded. View the transaction that sent this notification here. Permissions Need to gate who can access your tools? Use the Interval dashboard to set up tiered access for teams. Product support Jean Streichjean@interval.com Shelley Wernershelley@interval.com Kyle Sanokkyle@interval.com Kim Hermannkim@interval.com Refund user Availability Organization Visible to anyone in the organization. Teams Visible only to teams explicitly granted access. Billing support6 members Runner Product support4 members Viewer Scheduled actionsComing soon Automatically run actions on an hourly, daily, weekly, or monthly schedule. Receive notifications when actions complete, and use I/O methods to prompt for user intervention whenever unexpected conditions occur. Scheduled actions docs Scheduled actions docs Built for engineers { Other tools force you to learn how to work in their custom environments and runtimes. Interval supercharges your existing codebase. Made for Node + TypeScript We built Interval from the ground up specifically for Node + TypeScript. Interval's I/O methods do the heavy lifting of parsing, sanitizing, and type checking all user input. With Interval, your code is safer by default. const = await io.search('Find a user', { placeholder: 'Search by name, email, or ID', onSearch: async query => db.findUsers(query), }); const user const user: { id: string; email: string; firstName: string; lastName: string; imageUrl: string | null; } Build in code Code is the primary source of truth for Interval actions. Configuration can be done either through the Interval dashboard or directly in code. Build in your codebase Love your ORM? Interval is just a regular Node module. When you add Interval to your existing app, you can use the same shared functions, environment variables, and 3rd party libraries as the rest of your app. Run on your infra Interval apps can be deployed wherever you deploy your app. Your code never leaves your infra and by design, Interval can't see your code or your secrets. Start building now Create an account and build your first app in minutes, or read the docs to learn more about Interval. Create an accountRead the docs [dashboard-] 548 Market St PMB 31323 San Francisco, CA 94104 (c) 2022 Product * Docs * Pricing * Security Company Contact + Privacy