And maybe we can give it the root of, let's say, client root. And that'll be the client root. And then we want to authenticate people, right? We want to authenticate users so that their tasks are associated with that user. And so we'll go ahead, and since this is a developer-facing demo, let's just say we want GitHub social auth. That's the only auth we want.
Alright, cool. So here we've got a pretty simple plan for an app written out in this pseudocode. And the thing that I'd like to point out is, how cool would this be if this were actually working code? What if we could just really define things this way, like auth, for example, and get full stack GitHub auth, right? We would have client components generated for us, like the GitHub auth button, login button, to the server functions we need to authenticate users on the server, and even the database models.
Well, it turns out that we actually can do this, and we have. This is what we've done with Wasp. And here's what that todo app we just described actually does look like with Wasp. It's done using syntax that's pretty similar to the pseudocode we just wrote. And this is achievable because we've implemented a DSL in Wasp. Now, you might be thinking, oh no, OK, here's another framework we have to learn, a bunch of new technologies out the window again. Why can't you just leave what isn't broken alone? But the goal with Wasp isn't really to reinvent the wheel here, just to improve upon it, kind of like Dwight says.
We already have some really great web dev technologies at our disposal, like React, Node.js, and Prisma. And these are exactly the technologies that Wasp leverages in its framework. So Wasp DSL simply acts as the glue that brings all these together in a more efficient way. Along with your React, Node.js, and Prisma business logic, we define a high-level description of our app in very similar syntax to our pseudocode there, which is in the Wasp config file. And then this all goes into our compiler, which is an approach that's unique to Wasp, and it spits out the whole project frontend, backend, and deployment code for us. So you actually get a full featured and production ready app with full stack auth, client routes, a standalone Express.js server, Postgres database, Cron jobs, bunch of other stuff. In the future, we even plan to support different stacks and different architectures even. Before we explain more about Wasp, let's get back to DSLs and talk a bit more about them. So if we think back to our little planning example there and the pseudocode that we wrote, we were basically inventing our own little language there. But this is a very, very specific kind of language.
You can't use it to do all the things a general purpose language like C or a language like even JavaScript can. It's only meant to do a single thing. In fact, it's so specific that it's meant to be used in only one domain, like full stack web apps in this case. And that's what a DSL is. It's a domain specific language.
Comments