219: Building Django Apps & SaaS Pegasus - Cory Zue

Brian:

Today on Python test, I have asked Cory Zhu to be on the show, and, I'm excite I'm super excited, actually. I'm, like, totally stoked because, Corey has done he's a Django, like, guru and has done a project called SaaS Pegasus. Hopefully I'm hoping that SASPegasus will help me get a SAS project off the ground. So, we're gonna talk some Django. Thank you, Corey, for being on the show.

Cory:

Yeah. Absolutely. And I'm also hoping it helps you get a product off the ground. I wouldn't necessarily describe myself as a guru, especially compared to some of your past guests, but I've been using Django for a very long time. So I

Brian:

So how long how long have you been using Django?

Cory:

Oh, jeez. I mean, pre one point o, I'd have to look it up on the calendar, but it's probably somewhere between 12 15 years at this point.

Brian:

Okay. Well, I just looked it up, and the the thing is only 18 years old. So that's I think that counts as a long time. So

Cory:

Yeah. Yeah. But I've never, like, committed like, I've never committed code to Django itself, I guess. Like, I'm I'm I'm a a big power user of Django. I love Django framework.

Cory:

I know how to use most of it. I'm not I'm not in the internals, I guess.

Brian:

But you're way, I guess, you're way more humble than I am because I I I am a a power user of Pytest, but I definitely consider myself an expert.

Cory:

Yeah. Well, you did write a book about it, did you? I think that probably qualifies you.

Brian:

Okay. But you did, like, you have, like, one of the very few, what do you call what Pegasus is?

Cory:

Yeah. There's a bunch of

Brian:

of gener?

Cory:

Yeah. There's a bunch of names for them. I I think the common ones are boilerplate or, like, starter kit. But, essentially, it's a, it's a product that you can use to start a Django code base with a ton of other stuff built in. So not just sort of your stock Django application, but a Django application that's kind of all set up and ready to to build your app on top of.

Brian:

Okay. Well, I know we wanted let I'm just let's just talk about that for a second. So it it's a project that you you have as a as a is this your full time thing, or do is this a side project for you?

Cory:

It's a full time it's basically my full time job right now. So I I run a portfolio of sort of indie projects, I would say. I started doing that on the side about 6 or 7 years ago, and Pegasus was my 3rd attempt and the one that has sort of grown enough to be able to work on it full time.

Brian:

So I

Cory:

have 2 other small Django project.

Brian:

Projects still going?

Cory:

They are. Yeah. So the first one I did was a it's it's always I I always feel a little sheepish when I talk about it, but it it's a, a wedding place card generator. So, like, basically, you upload a CSV file, and it will generate a PDF file for you that is formatted so that you can print it and cut it up and, like, make little place cards for the table settings at a wedding or at an event or something like that. It's very simple application, but it actually, yeah, it actually made reasonable amounts of money and was kinda my foray into this sort of indie products world.

Brian:

I think that's great. I think small that's kinda what I'm trying to target is a small focused thing. Yeah. Just I'm a software person. I should be able to write some software that might help some people out.

Brian:

Right?

Cory:

100%.

Brian:

And get paid for it, maybe. Yeah. So is your place card holder thing still running? Is it still making a little money?

Cory:

It is. Yeah. It's it's, it's called PlaceCard Me. It's, it's just because I've got the dot me domain. So it's like PlaceCard dot me.

Cory:

And, yeah, it does it makes, you know, maybe, like, $1,000 a month, which is certainly Nice. Not bad. It it runs completely on autopilot, which is quite nice. Every once in a while, I get an email from someone saying, like, oh, can I, you know, can I add meals to this thing? Why isn't this a movie working or something?

Cory:

But, like, more or less, I I never have to touch it, and it's just kinda running in the background. So it was a it was a sweet taste of, like, oh, you can just make money passively while you're sleeping. This is really cool. And then I kind of got the bug and decided to try to figure out how to do that full time.

Brian:

This so my thought process was I could make some extra money by writing a book. And that's a lot of work, actually. It is. Anyway. And Okay.

Cory:

And does it it's and it's mostly kind of front loaded, I guess. Right? Like, you you have to there's, like, a my understanding with books is there's a big sort of marketing promotion thing that happens sort of right at the book launch and then, like, a long tail. Is that is that right? Or

Brian:

Yeah. And with tech books, there's a long tail and a a steep cliff at the end. I think. I don't know. Yeah.

Cory:

The I'm sorry.

Brian:

I I think I've been fairly I think the the pie test book has been fairly good, but it's still, the first couple of, revenue checks come in, and I'm like, oh, sweet. This is gonna be awesome if it this keeps up. It doesn't keep up very long. Yeah. And, at least it hasn't for me.

Brian:

It's been it's been steady, and it's been steady enough that I will keep it up. That's why, I rewrote it, and I rewrote it with the intent of making sure that it was, it wouldn't go out of date fairly fast, and then it would I could be able to keep it up. And it does reasonably well, but it's not like I can quit my day job or anything. So, okay. So that was number 1.

Brian:

What was number 2?

Cory:

Number 2 well, let's just say I made a bunch of apps that sort of were just to scratch my own itch, most of which never even had a way to monetize. One of those was like this this another kind of silly one where, I had some group chats with my friends, and I wanted to see analytics on top of it. Like, I was just curious kind of like who's sending the most messages and and all this stuff. So I built this, again, a very silly little Django app to show you some of this data and just send it out to my friends. They thought it was funny, and and we had a good laugh about it.

Cory:

And then I was like, well, maybe other people would be interested in this. So I posted it on, like, Reddit and a few other random places. And then just a small number of people, again, just sort of started using it. And, and I needed to ingest a bunch of data. So then I was like, okay, well, if you've got like, you know, if you're ingesting half a 1000000 messages, then I should probably charge something for that.

Cory:

So then I just added, like, a little, like, $10 a year thing to that. And then so that one also kind of runs by itself, and I never really think about it, but it it doesn't make much money. It makes, like, $100 a month or something like that. And then after having done, you know, a handful of these things and then, you know, copy pasting the code from, you know, user accounts and and setting up my, you know, my front end build pipeline and blah blah blah. I was like, oh, I keep doing this again.

Cory:

You know, maybe there's a product in here to help other people launch all these Django apps the same way that I'm trying to launch all these Django apps. And that was kind of the birth of SaaS Pegasus. And I I should say, like, it wasn't a novel idea. Like, these these things actually existed. These boilerplates existed for other frameworks.

Cory:

Like, there was one, a very popular one for Laravel, and there were a couple for Rails. And I looked for Django, and there was just, like, nothing that was any good. I was like, okay. There's definitely an opportunity here.

Brian:

Well, I and I've heard from, from, I guess, people I trust, the Django community, that it's, I think it's well respected, so even by some of the Django people. So that's good.

Cory:

Yeah. I was I was definitely the first, and obviously, in my opinion, it's still sort of the best and and maybe by by a good by a good distance. Again, keeping in mind that I'm very biased about it. But I have I mean

Brian:

You have a rocket there, so there's there's that. I'm kind of I'm kind of pro rocket. So

Cory:

Rockets are good, especially when they're attached to to products, I guess. But, I mean, one thing that's true is that I I have been working on Pegasus full time for almost 3 years. And so just by sheer amounts of sort of effort that has gone into it, I think it's likely sort of the most had the most I mean, work isn't always a a metric of quality, but it's at least gotta be correlated somewhat. So there's there's been a lot of investment into Pegasus, and and it's got a pretty good user community as well. We have a Slack of about it's it's approaching a 100, people who are in there kind of talking talking about building their apps, talking about building their start ups, and, and giving me lots of feedback that I can then incorporate into product as well.

Cory:

So it's it's a nice kind of cycle that way.

Brian:

So you get when when I signed up for signed up, I think I signed up last year. I haven't I think I've I've attempted to go through a couple times, but I, realized that I think I needed more Django experience, first. But, I've done done some tutorials, so now I'm ready to get started again. But, for people that don't know what it is, so if I I signed up for, signed up for SaaS Pegasus, and then I go through some, like, little questionnaire of what I want in the app and different features. And and then then it down it get it gets something ready for me, and I download it.

Brian:

And then that's my starter app, and then I can put that in in GitHub or whatever to to do version control at that point. Right?

Cory:

Yeah. Exactly. And as of last month, actually, you can skip that download step as well, and you can push your project directly to GitHub from Pegasus.

Brian:

Oh, really? Okay.

Cory:

Which is a cool, fun feature that I added recently. But that's that's exactly right. And and behind the scenes, like, I'm guessing a lot of your listeners who are familiar with Django are possibly also familiar with Django cookie cutter, which is a library that kind of allows you to do this type of thing. And it's Django cookie cutter is a Django thing built on top of another library called cookie cutter. And cookiecutter is basically the thing that powers both Django cookiecutter and Pegasus.

Cory:

And it's basically it's a framework and language that allows you to add and delete and modify code essentially based on a config file. And so behind the scenes, when when you're changing all these things in Pegasus, the adding features, choosing what CSS framework you want, and all that stuff, It's it's then using cookie cutter to generate a completely bespoke code base for your project so that you get all the stuff that you wanted, but you don't get all the extra craft. You don't have to manage the config with settings or anything like that. It's like the the code base that you start with is, you know, has been sort of designed specifically for your project, which which I've for me, that was a big requirement building Pegasus because I had seen some other things that, you know, you you install the thing, but then the first thing you do is you, like, edit 50 variables in a settings file, and then, like, huge swaths of code in your code base never get called because they're, you know, in this project that, that was designed to accommodate all these different use cases. Whereas if you do it this cookie cutter way, you don't end up with all that extra code, and you kind of just end up with with exactly what you need.

Brian:

I love that I that that sounds great because I don't want well, one, I'm I'm gonna wanna read all the code. And if I'm reading all the code that's not that I don't need, that's kind of a bummer. So

Cory:

Yeah. Yeah. I mean, deleting code is, like, my favorite thing to do in a project. So so by the what the opposite would mean that having all this extra code is, like, the worst the worst thing that a project could could have. So

Brian:

Well, I mean, or the best if you if you if you enjoy deleting.

Cory:

Yeah. Yeah. If you want if you if you want your first, you know, 10 hours on your project to be deleting code, then I guess you could, you could do it that way.

Brian:

How how long do you think it would take, you know, an hour somebody that's, like, comfortable with Django. How how long to get, like, their first beta version up after running Jago or running Pegasus?

Cory:

Well, so it's a really tough question because what what Pegasus provides is all of the scaffolding. Like, it it'll provide your front end. It'll provide your build infrastructure. It'll provide your CI. It'll give you a big head start on deployment.

Cory:

But you still have to code and, you know, user accounts, billing, all these things. But you still have to code the business logic of your own application, and that's where pretty much all of the work comes in. So so if you if your application has dead simple business logic, then, like, let's say it takes you 5 hours to code that up and then on top like, so if you did that on top of Pegasus, then I'm guessing you could have it in prod in, you know, maybe 3 hours after that.

Brian:

This sounds awesome. Okay. So the one of the things that intrigued me is, is the subscript the the billing part because I didn't want to get that wrong.

Cory:

Right.

Brian:

And so I was like, okay. I need to find something that can help me with the billing part and user accounts because I don't wanna get that wrong either. And and, the rest of it maybe I didn't even care if it was really that pretty to begin with, because, because I can, you know, I can throw, I don't know, something at it, CSS at it or something and then I hire somebody to help out maybe. But, but getting the getting the subscription, the just the user flow wrong, I I wouldn't know how to fix that. And also, like, the tutorials, I gotta I've I've I've talked to some of the Django people, and I know that it's hard to do a tutorial from, like, from 0 to working website, but, come on.

Brian:

Like, the the the, like, the the getting started one gets you to a, like, a poll the polls app. It's good to sort of understand some of the internals of Django. But, also, it's not there's no there's no user authentication yet. There's no, there's they didn't talk doesn't really talk about deployment much or anything, and I'm like, I the I'm still way the it's still at the now draw the rest of the owl phase. Right.

Brian:

And so I'm glad. So let's I don't know how to transition, but let's some of the things I'm confused about. You before we recorded, you said, let's talk about some of the things that aren't just specific to Pegasus, but are just generally in Django apps, and I I totally agree. So the first right off the bat, I'm thinking about I'm gonna have to decide lots of stuff. So I don't know I don't know what I need to decide first.

Brian:

Do you have any ideas?

Cory:

Well, I mean, probably, like, some of the biggest decisions that people talk about these days, a lot of it is front end. But the so there's there's some decisions that there's pretty much consensus around in the general community. So, like, database, 9 out of 10 developers are gonna tell you these Postgres. Authentication I mean, Django has the auth system built in, and then most sort of SaaS products will layer Django all off on top of that, which is a library that gives you a lot of functionality on top of the Django app system. So, like, social logins, so you can log in with, like, Google and GitHub and Facebook and stuff and, you know, password reset and, email confirmation and a bunch of that sort of standard stuff on top of it.

Cory:

So those are some of the things that, I guess, every app needs, but but it's pretty much decided in the Django world or or at least there's a there's a very strong sort of, leader in the space. Front end is probably where there's the most

Brian:

How do you how do does so does your does Pegasus use all auth? Or

Cory:

Yeah. Yeah. So pega Pegasus leans somewhat heavily on a small set of libraries that like, my my criteria for picking libraries to put into Pegasus are just, like, they have to have they have to basically be, like, one of the top 5 libraries in Django, and then and then I'll use them. So so yeah. So Pegasus uses all of behind the scenes.

Cory:

All of comes it's great. It comes with a ton of functionality, but you have to set up a bunch of stuff yourself. The templates don't look great. The emails don't look great. And so Pegasus sort of, on top of all that, will then sort of configure it, customize it, and provide sort of, like, much closer to what I would consider to be a finished, polished experience on top of it so that you don't have to fiddle with everything in all of them customizing it for your own application.

Cory:

Because all these all these open source libraries are designed to be customizable and meet all these different use cases. And and so, like, out of the box, it's, I mean, it's kind of like analogous to the cookie cutter thing I was talking about, but they they're sort of built to support all this stuff. But they don't have just like, oh, this is, like, the default configuration that's good and just just use it this way, which is which is one of the things that I think Pegasus tries to do is sort of configure these things for you, set them up nicely, and and give you something that works right out of the box so you don't have to just wrestle with it. And then if you wanna, you know, if you wanna customize it from there, you still can. But it's you're not quite long in the in the journey, I suppose.

Brian:

Because I a lot of this stuff is especially with the first project, I don't know what the choices are, and I guess I don't care right away. I just want a good one. Somebody pick a good one for me. Yeah. So Well how about so how about Docker?

Cory:

Yeah. I mean, Docker is an interesting one. So I I grew up I grew up. I did development, you know, in Django. Like I said, I've been doing this for a long time.

Cory:

And so I like, Docker just wasn't a thing when I learned Django, when I got comfortable doing coding. And so, so I think, like, I don't personally use it all that much because I know how to do all the complicated things that that Docker sort of makes easier for you. That said, I I think I recommend Docker for most people because of, I guess, a few reasons, but the the most important ones are sort of like portability and consistency. And the thing that Docker does really well, and I I don't know if you know this, and I'm just sort of telling you something that you already know, but is it like, you have essentially, like, a single file, and that file can build something in an in an incredibly consistent way that you can run on Windows, you can run on, you know, Mac and Linux, you can give it to a platform as a service company like a Heroku or something, and they can run it for you. And so it it it provides us remarkably consistent way to run stuff, and that can be really useful in development because, like, you know, everybody's got a different version of Python, everybody's got a different operating system, everybody's got, you know, everybody's environment is a little bit different, and Docker just sort of solves all that and says, okay, if you're using this file, you're gonna get, like, this version of Python and this version of blah blah blah, and it's gonna run, you know, you can you can be very certain that if it runs in this environment, it's almost always gonna run-in any other environment.

Cory:

And so, again, like, if if you've never done web development before, and you just want to like, you don't wanna be fiddling with libraries and virtual environments. And and I I mean, I know you could you could hold your own virtual environments, but, but you basically just run, you know, like, Docker Compose up or or whatever the thing is, and it'll spin up a database, it'll spin up, you know, a cache, it'll spin up your web application, and then you're off to the races, and you don't have to sort of install anything besides Docker. That's what I think the value is is in terms of the development experience getting up and running. And then, and then in production, it's that portability can be useful too, because you can be sure you're having sort of a very consistent

Brian:

So then during deployment, am I deploying a docker image then, if I if I choose the docker versus

Cory:

Well, so in in Pegasus specifically, deployment and development are separate. So you can choose whether or not you wanna enable Docker for development, and then you can also choose whether you wanna do deployment on Docker or on your own. And it's Yvonne, I mean, most of the hosting companies or the platform as a service pass companies will use Docker under the hood, And then the main question is just sort of like how many layers of abstraction exists between, like, what you give them and and the underlying, like, Docker container that's running.

Brian:

Okay. So, okay. So specifically for Pegasus, there's a use Docker checkbox. Does that use it? That oh, it says right there.

Brian:

I if I were to read better, it's whether or not I use it for local development. Okay.

Cory:

Yeah. Yeah. I should probably not put that in the help text and put it in the in the label instead so it's a little clearer. It's yeah.

Brian:

So that It's clear. It's just I didn't read

Cory:

Yeah. It's users are really great. That's that's, I should know that by now.

Brian:

I guess, maybe you're right. Maybe if it said use Docker for development, maybe. But, anyway, it's fine. So that's the

Cory:

The the way that I like to develop and The way that I like to develop and the way that I might recommend you do it too, if this is kind of if you're well versed in Python, but it's your first foray into web, is you can also use Docker just to run your services, so, like, your database and your cache, essentially. And then you can still run your Django code in a native virtual environment. That's actually how I do all my development. I think it's kind of the best of both worlds because you don't have to fiddle with databases and and stuff like that, but then you can still use all the native tooling with with your Python environment.

Brian:

Okay. So if I wanna do that, do I click do I hit the use Docker for development button? In Pegasus specifically,

Cory:

I think no.

Brian:

Okay.

Cory:

And then there's a I have a, like, a Docker Compose file that is on my GitHub that I can share with you, and that will run Postgres and Redis. And then you can Yes. Your your Django app to to run against those.

Brian:

Do you deploy Docker images then, for everybody, or does that depend on which deployment target I choose?

Cory:

It yeah. It does depend on which deployment target you choose, but they're mostly docker based. And Okay. And they kind of go into 2 or 3 high level categories. 1 is like a platform as a service, so like a Heroku or a render or a fly dot io.

Cory:

And those those will typically just take either, like, a Docker a Docker config file or some other abstraction that generates a Docker config file, like a proc file or something. But they basically are running Docker containers for your application, and then they'll provide a managed database and a managed Redis and so on. And then the other option is to sort of roll your own. And then in that world, you're more installing on a server that you control.

Brian:

And, you know, in

Cory:

that world, you can be you can still be running Docker containers for everything. You can also use, you know, mix and match with managed databases. And, and if you want, you can also just run Python in a virtual environment, NGINX, Gunicorn. That's sort of the classic stack that everybody was doing maybe 5, 7 years ago, and it still works great. So that's you know?

Cory:

Okay. Most of my projects are still set up that way because they're they're relatively old. But I Okay. It's not a bad way to run, Django apps.

Brian:

Well, so do you have a do you have a favorite for people that that that things that you support right now?

Cory:

Well, so I kind of recommend I try to tailor my recommendations to the individual. And so, like, for you, if you if, you know, if if you're just getting into web, you're you don't feel like you wanna be doing a lot of, like, sysadmin type of stuff, then I would just pick something like render, Heroku, or fly dot io, and they they're all relatively similar. They'll be priced differently depending on the depending on the details of how much resources you end up needing for your application. But they're all relatively sort of, like, point and click, configure a few things, have a CLI and a dashboard console where you can kind of manage stuff. And they'll mostly, hopefully, take away the DevOps burden from you, and and they just kind of, like, deal with that on their own.

Brian:

Okay. What if I throw the wrinkle in that it really needs to have, like, the best uptime that I can. Does it matter then?

Cory:

I wouldn't expect it. I I would I I remember you had you had emailed me saying that that you had heard there were some uptime issues with Fly. And I'm trying so one of my apps is hosted on Fly, and I don't recall having any issues with them over the past 9 months or so since since that app has been live. They should all be reliable, and it

Brian:

would be

Cory:

a big it would be a big like, I mean, these are, like, you know, $100,000,000,000,000 company. I mean, I don't know how big some of these companies are, but they're they're, like, you know, they're serious companies, and and I think other serious companies rely on them for infrastructure. So like, it would, it would be that really not a good sign if, if any of them were going down with any regularity.

Brian:

Okay. Well, let's say I choose one of them and decide later to do something else. Is that is it chain is it a do I have to decide completely now, or is it something I change my mind on?

Cory:

Yeah. You can change your mind. So the one thing I mean, with Django, there's a small category of data that is persistent. The most obvious is your database. And the other category would be, like, media files, which is essentially, like, if if users upload files to your application, those get stored somewhere usually like

Brian:

Okay.

Cory:

S 3 or something like that. But so the process of switching would basically it it would depend a little bit on where your database was, but it would worst case scenario would involve backing up your database, migrating it somewhere else, and then sort of turning your application back on somewhere else. And and you could do it with minimal downtime, but if you're willing to tolerate, you know, an hour or 2 of downtime, then you could do that pretty easily with, without too much work.

Brian:

Okay. Well, I want so I wanna get through, like, at least a couple more questions topics this time. One of them is, okay. Let's just jump in. I I have some, like, related I I'm I'm a very tangential sort of thinker.

Cory:

That sounds great.

Brian:

But all of these different platforms, if I've got one if I'm trying to do it myself, I've gotta learn one of them. You've got, like, 6 or 7 on the list. Is was this a difficult part of this, or was this easy for you to figure out all the logistics of the different platforms?

Cory:

You're talking about the deployment platforms?

Brian:

Yeah. Like, for you personally, did was this a pain to to have this many options?

Cory:

Yes and no. So like I said, so most of these things you can set up with a config file. And so when I was adding support, I was like, you know, I was like, okay. I'm gonna work on deployment this month, and I'm gonna, like, I'm gonna go figure out what the top five platforms are, and I'm gonna support them all. And each one took, like, you know, like, a day to sort of troubleshoot and and figure out how to get it working.

Cory:

And so adding them was relatively easy. What I did not fully think about at the time was that, like, I was gonna have customers on all of those platforms forever, and all of those platforms were gonna change, and, you know, things things were, you know, API updates The

Brian:

documentation and support button.

Cory:

Documentation and support and all that. So now it it it is tough. Like, like, someone will run into some issue on some platform, and then if I don't have if I don't happen to have an environment already running there, then I have to go remind myself. I have to follow my own documentation essentially to spin up a new dummy project on this platform, see if I can reproduce the an issue, figure out how to fix it, and ship the fix. So it's it has been, it has been a longer tail of support work than I anticipated out of the gate, which is that statement is true for a a number of things in Pegasus.

Cory:

I you think I would learn my lesson by now, but I kind of keep adding things in hopes that they won't have these long support tails, and then some of them end up some of them end up having them. So

Brian:

Okay. Okay. Well, the the the other couple talks of topics I wanted to talk about was framework and front end stuff. So, one of the the choices for is the CSS framework. Now Yeah.

Brian:

There's some people there who are gonna have their strong opinion, but I don't. So you've got Bootstrap Bootstrap with material at balm Bulma. Uma? Bulma. I don't know.

Brian:

Bulma. Yeah. And and Tailwind. Yeah. I that I assume there's probably more choices out there in the world, but you pick those.

Brian:

But, but, like, somebody for any Django project has to figure that out also. Right? So Yeah. Can how do you choose?

Cory:

Yeah. I mean, the short the short answer is probably like well, like many technologies, first first pass would be if you know one of them use that one. That's a that's a rule that I really like. If you don't know any of them, I would 0 in on Bootstrap and Tailwind as

Brian:

Okay.

Cory:

Your options. Bootstrap is kind of like the Django of CSS, I would say. It's been around forever. It's got, you know, it's it's got incredible an incredible community. There's a huge amount of support and resources and everything else out there.

Cory:

Tons of people know it. It's easy to find developers. And it's like, maybe a little bit dated, and, you know, can be a little bit slow at times. It's could you could call it sort of like boring tech or something like that. And then tailwind is, you know, in this analogy, it's probably more like react or something like it's, it's the hot new thing that is super popular these days, and everyone wants to use it and everyone wants to learn it.

Cory:

And there's also a huge ecosystem developing around it. And so it's a little bit like, yeah, it's it's it's almost like whether you kinda wanna stick with something boring and stable or whether you kind of wanna be on the on the cutting edge of of this tooling. In terms of technical differences so I don't know how if you're familiar with either of them. Tailwind's whole thing is it is what is what do they call it? I forget what they call it, but basically, tailwind is, like, every CSS attribute should be a class, and you shouldn't have any classes.

Cory:

Like, tail end is, like, you should never have a class for, like, a card or, you know, a button, And instead, you should have, like, 20 classes that say, like, prime text color red, you know, margin 2 REMS, padding this much, shadow this much. So, like like, literally, like, a button in tail end will often have, like, these, like, you know, I'm not even exaggerating, maybe, like, 20 class names, which sounds crazy and and is often very jarring for people who who start development. It is somewhat mitigated by a library called Daisy UI, which Pegasus uses, which Daisy UI is kind of like a bridge between tailwind and bootstrap. And so Daisy UI will actually provide a button class and, like, a primary button and a error button and whatever. And behind the scenes, it it just maps that to, like, you know, the 20 tailwind classes that you would want.

Cory:

But one nice thing about the tailwind world is that, like, it's very portable. Like, if like, the only unit of style is this the HTML and the classes. And if a product is using tailwind, then it'll look exactly the same. Whereas, like, when you use Bootstrap, like, when people wanna customize Bootstrap, they'll start messing with variables and and, you know, adding their own classes and stuff. And then I don't know if I'm explaining this well, but the the benefit that comes with that is that if someone makes a component for Tailwind, you can just copy the paste, the HTML into your project, like, into your Django templates, and it'll look exactly like that component.

Cory:

You don't have to ever mess with CSS and stuff. So that means that tail end has a nice ecosystem of template libraries that are coming out now where you can just go on to some website. You can, like, search for, you know, essentially all these things that you would want, you know, navbar, card, whatever it is, and then grab these big HTML files and just kind of paste them into your Django project and they start working. So it's a really nice way to build things that look nice quickly. I haven't had a project get sort of long in the tooth enough to know whether that style of development eventually becomes a maintenance problem or not.

Cory:

Okay. Kind of works out fine. But

Brian:

Are you, like so, are you a CSS person yourself? Do you, like do you know the fiddling with it, or are you leaning on these frameworks to do most of the work for you?

Cory:

What I'm, oh, I'm leaning heavily on the frameworks for sure. What I would say is I'm I'm probably better at front end than the average back end developer, but I'm much worse at front end than the average, like, front end developer. So I can kind of make things look okay and and learn the tools and stuff, but I I it's surface level knowledge.

Brian:

Okay. So what you do, again, if I were to read the documentation, the little thing says if you have trouble choosing, see the documentation, and then you have a documentation page to talk about it. So, actually, your stuff points. It is not instructions, if I just read them, are better.

Cory:

But, I'm curious how consistent that documentation page is with whatever I just said. But

Brian:

Well, so one of the things that one of the reasons why I'm, I I had not known about this Daisy UI thing, but I had talked with somebody, I don't know, a year ago or something that that had a a side project, and they used the paid Tailwind UI thing to to just design some stuff visually, I guess. I think there's a, I don't know, there's a paid paid service where you can get help with designing something. I don't

Cory:

know if

Brian:

it's worth it or not. But

Cory:

It 6 months ago so I I I used that. I I I bought that. I I use it on, like, Pegasus' home page and pricing page are are lifted from that tailwind UI. And 6 months ago, it was a 100% worth it. Now there's enough open source stuff out there that you could probably get away with not using it, but it's honestly, it's it's not that expensive, and it's made by the creators of Tailwind, and they put, like, a lot of effort into making it pixel perfect on every screen size and and all sorts of stuff.

Cory:

So it's

Brian:

Okay. Yeah.

Cory:

And that that I would still recommend that as

Brian:

And that's compatible with, Pegasus?

Cory:

Yeah. The HTML version is they have some stuff in there that's sort of like React only. That is a little bit more permission to integrate in the Pegasus.

Brian:

Okay.

Cory:

But, the initial release included was all HTML templates, and those are all you can just drop those into Django templates, and they'll they'll work out of the box.

Brian:

Okay. Last topic is, and this isn't really the last topic, but for now, HTMLX versus React.

Cory:

Yeah. And and again, I like, it depends. Yeah. I would default.

Brian:

Let's do, like, let's go with the I don't care. What should I pick?

Cory:

Well, what's your app? Tell tell me more about the app you're building because.

Brian:

Okay. So I I want some I I wanted I wanna get money from it so people have to pay me and log in and stuff like that. But, basically, it's gonna be sort of a list thing. It's a front end for another service. The back end service is doing all the heavy lifting or doing the the daily work.

Brian:

It's a sign up list, essentially. So people are gonna sign ups outside of the app, possibly in the app. I might have, like, users be able to, like, look at an event, kinda like a meetup sort of a thing, but not as intense, sign up for something. And then before the event, the event holder needs to be able to, like, look at the list of names that of people signed up. That's pretty much it.

Cory:

Yeah. So something like that, I would I would definitely use HDMX.

Brian:

Okay.

Cory:

And and the reason I say that is just that, like, where React really shines is if you're building something really complicated that needs a lot of, like, client side state and, you know, like, if if you were building Figma or something or Gmail, like, you would you would wanna use something like React so that you can provide the sort of rich user experience. Yeah. Well, your building sounds a lot more like a CRUD app

Brian:

Yeah.

Cory:

With some, you know, with some tweaks and bells and whistles and, like, a a fancy back end or or a fancy integration on the back end. But for that yeah. It's I mean, you might not even need HTMLX, honestly. You might just be able to do the whole thing in pure Django templates, and that would be totally fine as well.

Brian:

Well, none isn't an option. I can't pay none on your

Cory:

Yeah. Well, so there are just there's a handful of things inside Pegasus where I wanted the UX to function more like a single page app. So, like, for example, like, when you're when you're sort of, like, working with a team and, like, on the invitations page, you wanna invite, like, you know, 5 different people to your team. I didn't want that to be, like, a full page reload every time you did that. So there's just there's tiny little bits of Pegasus where I needed single page app like stuff.

Cory:

And on those little bits, it uses either React or HD MX, but you don't have to use either of those technologies for any of you. Right? And they'll they'll be there in the background if if you're using the pieces of Pegasus that that use those. But, otherwise, you'll hopefully just be able to kind of ignore them and and never think about them.

Brian:

So I, I think that it would be fun to, to to sort of wrap this conversation up a little bit, and and then have me go off and, like, do some work and learn some stuff and generate some more questions, and then come back and maybe, like, touch bases with you, maybe couple times through the process of me getting this thing off the ground. Does that sound like fun?

Cory:

Yeah. That sounds awesome.

Brian:

Off for that? Awesome. Cool. So for people who wanna, reach out to you, well, Saaaspegasus is, we'll leave a link, but it's, saaspegasus.com. Yep.

Brian:

So pretty straightforward. Yep. And with a good rocket, and and, you know, I I have if people don't know, how would they listen to this podcast and not know? But there's rockets on my books. So,

Cory:

Okay.

Brian:

Anyway I

Cory:

didn't know that. So now now I'm embarrassed.

Brian:

No. It's okay. They they the the first they I got the first comps came out or comp I don't know if that's the right word. The, the rough up of the the cover of the book, was shown to me, and and I got to choose the artwork, but, like, most of the choices were snakes. And I'm like, I I'm I'm kinda tired of the python, the snake association with Python.

Brian:

I know it's there, but can we do retro rockets? And so I got a handful of retro rockets to pick.

Cory:

So the, the Django unofficial mascot was it was either a pony or a unicorn or it was like a unicorn that they called it pony or something like that. But so the before I had the name SAS Pegasus, the original code name for Pegasus was rocket pony, which is why there were, like, rockets everywhere. And then I was like, well, rocket pony is I think I was, like, trying to draw or find a picture of, like, a pony on a rocket, and it was just, like, impossible. And I forget how I ended up with I think I was like, oh, flying horse. Like, okay, Pegasus.

Cory:

Yeah. And then, but that's why the rockets are still hanging around.

Brian:

Oh, great. And there aren't any drawings of Pegasi. Pegasi Yeah.

Cory:

This is I tried to find them online, and then I tried to get AIS to make them. I, you know, I should try again because the AIs have gotten a lot better now. Nice AI pegasus these days. But before they were they were like, every time I tried to get an AI to generate a picture of a Pegasus, it ended up looking like it had come from, like, ancient Rome. And even if I tried to prompt it, you know, it had this very sort of, like, mythical ancient Greek illustration quality to it.

Cory:

So No. Really vibe with the brand that I was trying to create.

Brian:

Oh, well, I mean, your site's beautiful. So and I like the little logos and the little icons and everything. The, the user impersonation little thing is, like, the the secretive dude with the it's pretty cute. Yeah. So there's some good good icons there.

Brian:

So Oh, yeah.

Cory:

Mostly font. Awesome.

Brian:

Okay. Yeah. And so, with with, the little promo, like, the whole thing was kind of a promo, but we do a little bit more. You've got documentation. You got user guides.

Brian:

You've got videos up. Anything else you wanna plug about your project before we wrap it up?

Cory:

No. I feel like yeah. I feel like this whole thing was a giant plug. So thank you for giving me the opportunity to come on here and

Brian:

And, you know, it's helping me, but I don't feel bad about it at all because I think so the the the space where this fits is some I I think that it's pure brilliant. I know I'm sure it fits in lots of spaces, but there's a lot of people, I think, like me that are like, hey. I'm a software person. I've got people I know in the community that I'd like to help with a project. And, I'd like to make a little money on the side with it also, but I could help out.

Brian:

But I'm I'm not a web developer full time. So, So, I need some help in something like, this to get me over get me through from, like, I know how I already know how to code. I just don't know how to do a polished web app. I I'm glad something like this is here. So thanks for putting this together.

Cory:

Yeah. Well, I hope it I hope it works out,

Brian:

and I'm interested to to

Cory:

see where you take it.

Brian:

Yeah. Alright. Well, thanks a lot, and we'll talk to you next time.

Cory:

Alright. Thanks so much.

Creators and Guests

Brian Okken
Host
Brian Okken
Software Engineer, also on Python Bytes and Python People podcasts
Cory Zue
Guest
Cory Zue
Went from CTO to indie hacker, and now building a solopreneur empire one business at a time. Currently growing https://t.co/o8SD3o1OVX and https://t.co/2uIpQjvlqa
219: Building Django Apps & SaaS Pegasus - Cory Zue
Broadcast by