Let's Low-Code Backend with Fastgen (@fastgenhq)

Ray Deck shows how FastGen handles the hardest 5% of no-code projects with custom JavaScript or Python code blocks that can run for hours, bypassing API timeouts. He walks through authentication, PostgreSQL, and event-driven workflows, then demonstrates syncing Circle community data to Xano and running heavy lifting asynchronously from Zapier.
Chapters
I've been using FastGen to augment my no-code, low-code product stack in order to be able to get my projects done faster. And you can too. I'm going to show you a little bit about how I've done that and how you might as well. I'm Ray Deck, and at SageChange, we focus on the hardest 5% of no-code, low-code projects and the tools and approaches that allow us to solve those problems just much, much more easily. So let's get into it. FastGen is one of the newer no-code, low-code backends out there. It joins Xano, it joins Backendless, it joins, you know, Buildship, and even some other newer ones in the play for giving you a better no-code, low-code experience for solving backend-related problems. Now, what's a backend-related problem? That would include— I'm sort of going over to the FastGen app right now. That would include what they think about it is in terms of authentication. That's where you have user management. It includes the ability to host a database, which is sort of the model part of it. It includes the ability to set up APIs, which you can access through a web-based interface, which is the primary thing we'll be talking about today. And also the ability to set up workflows that can be triggered either by those APIs or by, you know, scheduled events, where you're saying you want something to run every once in a while. And the core of where FastGen, I think, is really exceptional is where it opens up your ability to use code and compose code into your environment. Like many of these backend systems, it provides, you know, a little bit of, if you will, table stakes, you know, access to logging, access to a database, you can add more tables and set up relationships, because otherwise, covers using a PostgreSQL database. But what you're going to find when you're working with these no-code tools is that there are some that are really, really good at providing you with like a database layer and a model. There are some that are really, really good at providing you with like no-code composition functionality. And there's some that are really good at providing you with connectors to other applications. And there's some that are really, really good at providing you with, you know, access to code that you can just sort of compose in. And it's this last one that they do super well. And one of the big ways you can experience this is through their APIs. So I'll show you an example I already created in just a second. But you know, you can create a new route, you have GET, you know, POST, PATCH, and DELETE available to you as methods for creating APIs. If I just say I want to do a POST, just to guarantee I don't have HTTP caching, you can decide where you're going to expose it in terms of what path it has on your FastGen domain, which they set up for you. And they also support custom domains, as you might imagine. Whether you want it to be authenticated. And this actually is a really cool piece of what they do. Because instead of having it be, you can say you just want to be public, which makes it very easy for testing. But you can also support either direct integration with their user management. So it's coming in on a per-user basis based on who's authed. Or you can make use of their API tokens. And you can set up API tokens through settings that then you can give to other machines that you want to go talk to your FastGen backend. This last one I find to be really, really useful about FastGen because it allows me to more easily compose it into the rest of my no-code, low-code stack. And I'll talk in a second about how I do that with Zapier. The— and then, you know, you can do some other steps in here that, you know, has more features, obviously. But the big thing that they provide is they provide a bit of flow of validation of a sort of flow control sitting in their system. Right? So you can say, hey, you know, if a certain condition is true, come on, there we go. You know, and then you can determine what that condition is. And you can set up variables, which you're going to test things about the environment, you can get information from the database, you can be making third-party API calls. There are a bunch of things you can do in terms of control flow inside, which is about 80% complete, I'd say. And they keep on adding new stuff every day. So it's pretty impressive the way it keeps on growing. And hopefully that validates some of the concerns I've had so far in relatively short order. And then the, the, but the thing that really makes them shine is the ability to introduce this custom code block. Because in this custom code block, you can bring, you know, either JavaScript or Python into your, you know, into your low-code stack, and you can do it very easily and very quickly. So if you were to, you know, select Python, you can just sort of start coding. And then, you know, they take a very standard serverless functionality approach to it, where you can say, here is your, you know, fastgen. Well, if you click away, you will lose it. You can, by the way, this button that expands is super helpful. You can, you know, just define a function and whatever function is, it's called fastgen inside this code file is the one they run. And you can define other functions. And then the most important thing you can do with this that actually is kind of unusual for the no-code platforms that introduce low-code is you can very easily load in dependencies and packages that you want to use. So for example, if you are working in say, you know, Python, it often seems to reason that what you really want to do is use see here, let's move this up. Just so I have— yeah, there we go. Where you can add what they call pip packages, right? I can just— I want to add NumPy, right? And you want to be doing some basic numeric things with it, it will install that package and make it part of what you're going to use in your, in your code going forward. And it will remember that package installation, which then you can just sort of, you know, do exactly what you expect to do in Python. Which is you can just say, you know, import NumPy. And you can also import things like LangChain, you can import TensorFlow, you can import whatever it is that you need. As long as it can, largely, if it can run in an AWS Lambda, it can probably run inside here. This is super convenient, because now instead of me having to set up all of the, you know, infrastructure around building a serverless component, I can just dump the code into here and have it run. It is convenient in the same way that using like a hosted Python notebook would be if I were doing more data science work. But what's really great about it is I can do just about anything that comes with code, and then I can write just enough code and then just compose that in by composing it through ifs and fors and loops and whatever else, and the few sort of Lego-ish type integrations they also have support for.. And it will work very, very quickly. Let me give you an example of how I'm doing that. I'm, I've got this other workflow over here and I'll explain the difference between workflows and APIs in just a second. I've got workflow over here where I'm updating the, the information about members in my, in my state change group, right? Say changes the, is the resource where people come together and work on the hardest 5% of their no-code, low-code projects. And the, and one thing I want to do is sort of get better integration of that between this and the database I want to be using. My case, the database I'm using is largely over in Xano. The, and you can do that pretty easily in FastGen. Now, what I did was I doodled around with code for actually doing my integration with Circle because I want to be making use of APIs that are available to me and some more complicated ideas about like looping through large sets of people. And I want to do it relatively rapidly. So I did this over in, over in Visual Studio Code, right? So I created a bit of code, and I was doodling with that. And I would just sort of, you know, run it locally. And I could get a quick script running that I could use pretty easily, very fast. But then the question was, well, I don't want to run it from my computer all the time. And I didn't really want to go through a lot of effort to, to mount it up on the web to be associated with like an AWS, you know, CloudWatch cron script or what have you. What's sort of an easy way to do that, you know, using some of these no-code tools. And this is where my friends at FastGen really came through for me because I was able to set up a workflow. And I'll describe again, I'll describe why it's workflow in just a second. But just by taking the code that I wrote in, in, you know, originally in TypeScript, in my, in Visual Studio Code, and bring it right over to, you know, bring it right over to here. And the key things I needed to do was I need to, you know, port it from, from TypeScript over to JavaScript, because they don't use TypeScript, they only use JavaScript. I had to put it into a function called fastGen, where previously I was just using an anonymous IIFE. And then, and then I just paste it in the code. It just works. It works with CommonJS by using require statements. It comes preloaded with Fetch, by the way, which makes it very easy to work with. It comes with support for using import statements as well. All of this, I can just cycle through and my code will fly. It has support for things like using environment variables. So of course, I don't use process.env the way I might in an ordinary, you know, Node package, but I can access it through what's called the context variable here, which delivers everything associated with the workflow or the API or whatever, as well as a link over to the environment variables that I set up over in FastGen. And that makes it super easy to access this stuff. And the— and then I can just sort of— I can define functions, of course, inside my function, and just run them all, you know, and the— and I can. And of course, because I was doing a little bit of migration, I had to do a little bit of testing to make sure it would work properly. And they make that super easy too, because I can, you know, always click test code down here. And I can, you know, find out what the logs are that come out of it. So if I were to run, you know, test code here, you know, it will give me information about how this thing has run once it's completed. And just like in Python, I can bring in Node packages. I can see I just brought in Node Fetch as well. And it was loaded anonymously. And I can load in other things. I can load in LangChain if I want to. And it would, and it will bring that into the party. And where this, I think, really gets cool is going to be making use of SDKs and APIs. So there are things like, you know, interacting with AWS or Google, you know, just using bare bones HTTP requests can be quite complicated. And the— and working with— because you're working with API keys, you're working with the way they do signatures and like there are 3 or 4 levels of doing like an AWS version 4 signature. And the— and But they get wrapped up pretty nicely in like the SDKs they make available through npm, right? You can go get the AWS or get Boto if you're going to do this in Python, and it will just take care of a lot of those concerns for you. Puts you in a position where you only have to write a few lines of code. You know, I've got this other project over here where I'm doing this with OpenAI. And if I were to go open this and I can, you know, like add messages to my threads in an OpenAI assistant, and I'm just doing this, of course, in Python. And it, you know, it's just using the OpenAI library, which allows me to do the whole thing in just a few lines of code, right? So I only have to bring just enough code in order for that to work. Bring this back over to the state change thing. The reason I'm creating this workflow here is to synchronize between what I've got in the Circle community and what I might want to have over in my XAML database., and the, and that makes it really easy for me to do that because I can push data across. I can manage my keys very easily. Um, and I can test it to make sure it works properly. Now there's another thing it does that's actually really, really important, which is it allows you to be slow. You see, most of these folks, when they're doing it, just creating code that runs just directly in an API, you're limited to maybe, you know, 3 or 5 seconds or whatever in order for your, um, a process to run. And there are limits also for how long a single code block can run. But the really neat thing is by making it into a workflow, it will run asynchronously, it will kick it. Now that means workflows aren't like functions, right? You can't run it and then use the return value. That's not the way their encapsulation works. Because they're completely asynchronous that you fire it off and you don't get to find out about the value until very, very later. But because I know that update from circles, and then it's going to go update the however many hundreds of people are involved in the community, either in an active or inactive state. I know it's not super fast. And so I don't want it to be holding on my API, which is totally fine. Because I can have an API, my API, which is update circle, and it triggers this by just triggering an event called update circle. And then because my workflow over here is listening for an event called updateCircle, it just fires and just runs. And I can compose that so that, you know, it's going to also run the code here and I sort of buried the lead, then I can get my little notification. So like every time this fires off, I get a little text and it will So every time this fires off, I get a little text. I'm not showing it because I don't want to show my phone number right now. And it will just send that over. So this is all really slick. And this is all a super, super simple way of integrating FastGen to get like high value from FastGen in the context of environment where you might be using some other tools. So let's talk about how we compose those together. So I was using So I was using, you know, Xano here, right? And I'm using Xano to store certain code and data that goes with, you know, parts of the state change stack and, you know, the services and the, you know, the the tools we provide, like the script tag, for example, or just being able to authenticate people and log them in. And I had built some of this, and this was all relatively easy to use. But of course, Xano is not as strong on the code front, and also not very strong on the SDK front, right, in terms of being able to make it easy to go talk to these third-party services. So what I'm doing is I'm composing that in with FastGen to have FastGen go do some of the work, make it, you know, make, you know, these communications, put together the information, and then have Xano in a position to be able to do what it does well, which is go store this database and make it accessible to these other APIs that might already exist. Take another example. I'm also a big fan of using Zapier as a no-code system. And Zapier, you know, this, this, for example, is a flow that runs every time somebody joins a state change. So if somebody comes in, there are a few things that happens, I get a little note notification, they get a little direct message, whatever. But it also wants to go synchronize the data that I've got over in, say, the Xano database. And so I'm using Zapier to go run the custom code that's sitting over in FastGen because it does this, does it so well in FastGen. Now Zapier really doesn't want this show to slow down. So the fact that I can in FastGen have this all run, run and have actually have my, my API call run super fast because it just sort of kicks it off asynchronously. Means that from Zapier's point of view, this thing took a mic— this thing took, you know, a matter of milliseconds to run and come back. And then however long it takes to go upload the data into Xano is happening over the course of the next several seconds. And then that's showing up over in my Xano. So this allows us to compose more of these systems together. So instead of saying, well, how do I, which do I Do I do things like all through workflows through, say, Zapier? Do I use something like XAML? Do I use something like FastGen? My answer often is use them all for what they're good for. The truth is most of these things are really inexpensive. You know, FastGen, particularly their base plan, is relatively cheap. And until you start hitting a whole lot of workflows, you're not really driving the bus from a cost point of view. By bringing that in, you get to cut a whole lot of time out of your process, particularly if you're moderately skilled with code or if you bring ChatGPT to the party because ChatGPT GPT often knows how to solve problems using code and doesn't know how to do it using the, using the no-code system. So being able to drop a solution directly into, you know, one of these code steps is super helpful. And then you can compose multiple code steps together to all run. And the neat thing about FastGen, and I've been testing this, is there does not appear to be a meaningful top-level ceiling on how long a, on how long a flow is allowed to be. Now, because those flows can be relatively long, that means you're not limited by, say, how long API call is going to take. You can have something that runs for hours. Near as I can tell, you can have something that runs for days. And you can compose multiple code steps and just loop and loop and loop and loop. And it will also continue to run. That allows me to open up what I can do with FastGen from an operational point of view that Zapier won't let me do, that Xano doesn't really want to let me do very easily. So that combination of code and being able to use it for the workflows that can run longer and be heavier is where I have found lots of differential advantage. Now, don't get me wrong, there are lots of additional features sitting inside FastGen, and I encourage you to check it out. They have a reasonable free tier that's good for experimentation. And I'd say that if you have some code background or you have enough comfort to even just be able to consume things that are coming from ChatGPT, that you should give it a But check it out. Um, it's, uh, I have found it to be super useful and accelerating as part of composing into a no-code stack that takes something that previously was in my hardest 5% and now makes it easy. And that is really the purpose of low-code.










