Infrastructure from Code (IfC) is the logical evolution of cloud. Instead of writing low-level, control-plane specific instructions, IfC infers requirements from application logic and provisions the optimal cloud infrastructure.
import { api, data, events } from '@some-ifc-sdk'
api.post("/users", async (req, res) => {
const { email, name } = req.body;
const newUser = await data.set(`user:${email}`, { email, name });
res.send({ user: newUser });
});
data.on("created:user:*", ({ item }) => {
console.log("New user created!");
events.publish("user.created", { after: "1 day" } item)
});
events.on("user.created", (event) => {
console.log('user.created event received!');
// Send a follow up email, call an API, etc.
})
“Programming languages and cloud infrastructure will converge in a single paradigm: where all resources required will be automatically provisioned, and optimized by the environment that runs it.
~ Shawn "swyx" Wang
There is a lot more to Infrastructure from Code and the capabilities it enables. A number of platforms like Ampt, Encore, Shuttle, Modal, Nitric, Klotho, and more are already offering some variation of IfC.
Stay tuned as we'll be adding more information to this site as the ecosystem continues to evolve.