For AI agents: a curated index of this site is available at /llms.txt, with the full
version at /llms-full.txt. A clean markdown version of any page is available by
appending index.md to its URL path.
Audio player for S09E07 - One Codebase, Two Clouds: Building EpicMail in .NET with Sergey Sagan. Nothing is downloaded until you press play.
S09E07
0:0047m
One Codebase, Two Clouds: Building EpicMail in .NET with Sergey Sagan
with Sergey Sagan
Sergey Sagan explains how he built EpicMail, an email client written in .NET from end to end, with .NET MAUI apps, a Blazor web app, Azure and AWS.
Episode Summary
Sergey Sagan joins Jamie to talk about EpicMail, the email client he built when Google announced that Gmail would stop collecting mail from external POP3 and SMTP accounts. EpicMail is .NET from end to end: .NET MAUI apps for Android and iOS, a Blazor web app, and a single .NET API hosted on Azure, with email sent through AWS.
Topics covered in this episode include:
Why Sergey chose .NET MAUI over React Native or a progressive web app, and why native apps still feel better to him
How working in C# across the whole stack cuts down on context switching, especially when a fix is needed at 2am
Running on two clouds: Azure for hosting and storage, AWS for email, and the pragmatism behind that choice
How AWS helps stop one spammy user from harming mail delivery for everyone else
Why EpicMail accounts are created on the web rather than in the mobile apps, and the 30% app store cut that avoids
Review times on Google Play and the App Store, and how API versioning keeps older versions of the app working
Google’s annual CASA security assessment for apps that use OAuth to reach Gmail, and why iCloud users still need app passwords
Sharing models across projects with clean architecture, and why that means EpicMail has no DTO layer
Episode Transcription
Hey everyone, and welcome back to The Modern .NET Show; the premier .NET podcast, focusing entirely on the knowledge, tools, and frameworks that all .NET developers should have in their toolbox. I’m your host Jamie Taylor, bringing you conversations with the brightest minds in the .NET ecosystem.
For this episode, I sat with Sergey Sagan, an incredibly skilled developer who has taken on the task of creating and managing email entirely in .NET.
I generally start with clean architecture as my default. I do have a core infrastructure level that has all of the low-level keys, and my models or contracts project that has all of my models listed, so that the Blazor app can access the same models as the server. So that’s a shared project that’s shared between all the units.
We talked about the unique challenges involved with not only building an entire full stack, multi-cloud .NET application, but also the fact that it… you know, manages email. We get into it at the start of the episode, but I’d always been told that managing email is a non-trivial task.
Along the way we talked about the challenges in releasing mobile apps across different platforms (EpicMail has a cross platform mobile app using .NET MAUI, too) and how to keep the mobile app in line with a changing web API.
You don’t need to version when you’re adding a new endpoint, but you do need to version as soon as you delete or change an existing endpoint. So I try to minimise the deleting and the changing; the adding is not as big of a deal.
Before we jump in, a quick reminder: if The Modern .NET Show has become part of your learning journey, please consider supporting us through
Patreon or
Buy Me A Coffee. Every contribution helps us continue bringing you these in-depth conversations with industry experts. You’ll find all the links in the show notes.
So let’s sit back, open up a terminal, type in dotnet new podcast and we’ll dive into the core of Modern .NET.
Jamie
So Sergey, welcome to the show. I’m very excited about this. This is partially a topic I know very little about, and partially a topic I know quite a bit about. So it’s going to be interesting to hear about.
A little spoiler, folks: we’re going to be talking a little bit about EpicMail, all the different things that it does, and all the different apps that are part of it. Because I have never managed email, and that is something that I’m always told is the worst thing in the world to do, right underneath rolling your own crypto. So I’d be interested to hear the whole story, the bits that you can share, and maybe some gotchas and stuff like that.
But before we get to that, let’s talk about you a little bit. Could you tell the listeners a little bit about you?
Sergey
Yeah, thanks, Jamie. I’m grateful for the opportunity to be here. I’m a software engineer by profession; I’ve been doing this for over twenty years. I started in PHP and quickly moved over into ASP.NET stuff, which is where I’ve been pretty much the rest of my career.
I’ve dabbled in most things related to software engineering, including crypto and AI and all those different things that are popular. The only one that I probably haven’t gotten much into is the quantum stuff; that’s a little beyond me right now, but I’m actually learning about that too. Anyways, I try to know almost everything I can about the world of development.
Jamie
Yeah, the quantum stuff, that’s way beyond me. I get that you can have things that are in qubits, and I get that you can do stuff that is… it gets all wobbly for me. I don’t understand the whole quantum mechanics stuff, but—
Sergey
It gets complicated real quick.
Jamie
It really does, it really does. There is a wonderful video on the YouTube channel Computerphile—P-H-I-L-E; I’ll link it in the show notes—that’s all about how a quantum computer could work. They use an old-school record player to show you the whole thing. I’ve watched it five times and I still don’t get it, but it’s really good.
Sergey
Sounds about right.
Jamie
Yeah, they attack the subject from both sides, the physics side and the computer science side, and they talk about how, basically, we probably can’t get big quantum computers just yet. I’ll send you a link as well, Sergey, after we’ve recorded. But for the folks listening in, there’ll be a link in the show notes.
So we’re going to talk about EpicMail and what we need to do for hosting mail. I’m going to brain-dump everything that I know about email, and it’s going to take about four seconds, right? I rely on someone else to host it for me. It’s something to do with MX and sometimes TXT records on my DNS. Recently—we’re recording on November 18th—Outlook stopped receiving emails that don’t have DMARC records. That’s about it. That’s really everything I know about email.
Sergey
Well, that was me if I go back maybe a year ago. That was basically my level of understanding until Google announced that they were going to be ending their multiple email options. So basically, if you were using Gmail, it was Gmail and that’s it. They weren’t going to allow you to use your external POP3 and SMTP accounts.
That was a big bummer for me, because I was actually using that quite a bit. It was part of my daily… I basically needed it. So instead of going out there and searching for another option, I decided to build it. This is my experience: I have experience with putting another app out into the mobile world. I have an Android and mobile app that I did before this, and I thought, “you know, I think I could do this.”
So I set out on the project, and it took me a minute to figure out all the pieces. Definitely some of the harder pieces involved were in Azure… AWS was really probably the most complicated to figure out. But other than that, there’s a lot of other pain involved, including, for example, dealing with OAuth. Google requires you to pass their technical review to make sure that you’re working in a secure environment, that all your code is secure, and all that stuff. So there was quite a bit of learning, and it was a rather expensive experience, to be honest.
Jamie
Yeah. Like I said, I know what some of the protocols are: secure [simple] mail transfer protocol, I think, and post office protocol. But yeah, I love the idea of there being a necessity behind learning something, right? It’s like, “oh, you’ve cancelled that? Hold my beer. I’ll show you. I’m going to learn how to do this,” right?
Sergey
Yeah. Like I said, it was actually such a huge learning experience. I’ve been working, like I said, in software engineering, doing public work-related work, so I’m fairly familiar with complicated concepts and whatever, but this definitely took me down a new, interesting road.
Like I said, I built some more Android and Apple apps before, and those were using Microsoft MAUI. I used the same thing again for EpicMail as well. It’s one codebase for my Android and Apple apps via MAUI, and then I’m actually using Blazor, and the API side. So a Blazor project for the web app itself.
So it’s two different codebases, because I started in the web app and then decided to move into mobile. I’m pretty happy with the current setup. I don’t mind two codebases, especially since the .NET API is driving both of them. So there’s very little duplication, I would say, but there’s obviously some.
Jamie
Okay, so we’ve got two slices of the app, I guess, that we can talk about. There’s obviously the server-side stuff, I guess the service that does email things, which… I’m going to greatly reduce email down, but it’s just moving files around and sending TCP packets. But then, isn’t that every app?
Then there’s the… genuinely, right? This is going to sound like a strike against .NET MAUI; it’s not meant to be. But I haven’t actually had a chance to speak to many people who’ve built—I’m going to use the horrible phrase, here we go—“useful” .NET MAUI apps, .NET MAUI projects. I know that there are tons of .NET MAUI apps and projects out there, and almost all of them will be useful for something. But an email client is one of the big things that you could do with MAUI, because it’s cross-platform, right?
So I’ve got an iPhone sitting in front of me and an Android device sitting in front of me. If I’m using a .NET MAUI app to manage my email, like you said, it’s one codebase, right?
Sergey
Exactly.
Jamie
I guess the build times are astronomical.
Sergey
Well, yeah, I guess I would say that the fact that I can have one codebase to manage both apps is really a time saver, because they both look exactly the same. I guess one has more of the Android styles and the other one has the Apple styles, but other than the styles themselves, the code and the functionality are identical.
So it would be frustrating to have to deal with two codebases, which is what you had to do before, right? Before MAUI and apps like MAUI, you definitely had to know Java and you had to know Objective-C, and you had to write apps for both of those individually. So yeah, it’s definitely been a sweet spot to not have to deal with that in this project.
Jamie
There’s a niggling question at the back of my head. I know that you said Java and Objective-C and the other platform-specific languages and frameworks, but I feel like I’d be remiss in not asking: why not something like React Native, or just a progressive web app? It’ll likely be, “because you’re doing .NET,” right?
Sergey
Well, yes, part of it is .NET related, because I know C# and that’s the one that I would say I’m most knowledgeable in. But also, the native look and feel of an app still, I don’t know, buys something. To me, when I’m playing with a native app, I can feel that it’s a native app versus a React one; you can see a difference, you can see how it reacts differently. So to me, native still feels better. It’s more… I don’t know, it’s more built for the device.
React is fine too; I use some apps that are like that. But you can tell: you can see that there’s a reload screen, and it just has quirks that are not quite as nice as a native app has. So anyway, I guess that was my thinking: I wanted to have the native feel that comes with that.
Jamie
That makes sense, right? Because what was it? There was someone—and I’m sure I’ll be able to find the quote after we’ve finished recording, but I’m trying to rack my brain whilst I’m pausing for time—someone that I interviewed on the show years ago said something like: if you go with something like a progressive web app or some other framework, you sometimes end up going against the design philosophy of the device that you’re using, right? There are certain choices that are made by the operating system vendors about, “right, to build an iOS app, it has to look a little bit like this.”
Sergey
Yeah, yeah.
Jamie
In 2026, in this year, we’ve had things like the transparency and the more rounded corners, right? You can do that in CSS; you can do it. But if you want something that looks like that on an iOS device, you’re probably better off just using Swift or whatever the actual tools are to do that, because Apple have done that for you.
Sergey
Right. People trust that, right? They’re used to it; they trust it. They don’t have to learn a new way of handling stuff. It’s just, “this is the way an Apple app works. This is the way an Android app works.” You don’t have to learn a new way of doing it, and I think people are just more comfortable with that.
Jamie
Oh yeah, absolutely. I can imagine that there’s probably a way to make… this is showing my lack of knowledge on cross-platform development, right? Cross-platform app development. ‘Cause I’m just going to say React Native again, and I bet there are people listening in ready to jump into whatever comment system they’re looking at, going, “but React Native hasn’t been a thing since 2008,” or something stupid like that, because I just don’t do mobile apps.
Sergey
I think it’s still pretty popular. It’s still a thing, and it’s great. There’s nothing wrong with React Native. I’ve used it before; it runs great. I actually like it a lot. But for some reason, MAUI just did it better for me. I just enjoyed the experience more, the end result was better, and so that’s why I stuck with it.
Jamie
No, that makes perfect sense, right? Because you don’t have to then switch into a different mode when you’re building something. From my perspective, a lot of people say the cross-platform toolkits are great because you only need to learn one language, and that’s only part of the argument.
The other part of the argument is: at two o’clock in the morning, when you have an outage and you need to make an emergency fix—which doesn’t exist in mobile apps, because it still has to go through someone at Google and at iOS—but let’s pretend that you could just emergency-release a fix for an iOS app. At 2am, when you need to make an emergency fix to an app, what are the chances that your developer who has worked on the back-end service side of something is going to jump into, first of all, the correct codebase for your app, and then be able to immediately switch contexts to understand Swift or Objective-C or whatever, right? Like we said, the way that you do things on Apple, right?
The chances of them being able to do that are not a hundred percent, and they’re not zero; they’re somewhere in the middle. If you get it wrong, it’s not disastrous, but it’s another dev loop, right? Another twenty minutes of going, “oh no, I should have done it this way, and messages are formatted in this way.”
So, for me, having very little experience with the cross-platform mobile systems, that’s the benefit, right? Not having to constantly context switch.
Sergey
That is a huge benefit. Context switching takes a minute for you to figure out, “okay, yes, I’m in a different environment. The IDE works differently over here; I have to use a different way of whatever.” So yes, context switching is a real thing, and it’s definitely one of the things I don’t have to worry about when using MAUI. It’s all C#, you know? It’s what I’m used to, so I don’t have to think, “okay, how do I do this in Java or Objective-C?”
Jamie
Yeah, absolutely.
Jamie
So we’ve talked a little bit about the app side of things. If you don’t mind, let’s talk about the whole stack. I know you’ve said the whole thing is .NET, back to front or top to bottom or whatever phrase you want to use, right? But what does that mean in practice?
I can imagine—I don’t know if you’re a solo dev on the project—but if it’s a small team, one app stack makes it way easier because of that lack of context switching. But I guess it also increases demand, if you want to hire someone to work on it; they need to know these technologies, right? Does it make it easier? Does it not make it easier?
Sergey
Yeah, so I do have a small team that works with me on this, and I would say that our stack is pretty straightforward. We do have a cloud service that hosts our API. We use Azure Blob Storage for your attachments and stuff like that. The one thing that’s not purely Microsoft is our email. Our email goes through AWS, Amazon Web Services; they just had a more established setup there.
So I went through them, and that was actually very complicated: learning how to do that stuff correctly, especially since [AWS] is really quick to block anything that’s suspected of spam. So you have to do things like automated whitelists. For example, when a new user creates a new account, you have to set up a special whitelist that automatically adds the user to that account. But then you also have to make sure that if that user is a bad actor and they’re spamming a lot, it doesn’t impact the rest of your users; it only impacts that one user. So there’s a lot of complexity involved in setting AWS up correctly to handle all of these different scenarios.
But otherwise, yeah, it’s a pretty straightforward stack: just the API, and then the Blazor app talks to the API, and both mobile apps are talking to that same API. So it’s a pretty standard setup, nothing too complicated or unusual. Just a cloud server that handles it all.
Jamie
Right. Okay. The thing for me, I guess, with managing an email system, an email service is: how do I know that this person is actually being spammy? That can’t be easy to figure out, right?
Sergey
Well, yeah. I think once you figure out the Amazon tools, they actually have a lot of help around that, as long as you are using them correctly. They have all that stuff built in, but you have to call the right service at the right time in the right order, otherwise it doesn’t get created correctly. So it was just a lot of learning.
That’s definitely the biggest part of it: people who are bad actors, making sure they don’t mess it up for everybody else. But yeah, I think once you set it up correctly, AWS will automatically block those bad actors for you, and you really don’t have to worry about it much at all.
Jamie
Right, okay. I think we buried the lede on that: multi-cloud as well. That’s a thing.
Sergey
Yep. Using two different cloud services, primarily because AWS is so much more established as an email provider. Azure doesn’t have anything quite like it, so I decided to just stick with what’s established. But yeah, most of my hosting stuff is done in Azure.
Jamie
So that’s a question, then. If you are multi-cloud, are you using something like Terraform or Bicep? Are you using infrastructure as code, or is it just, “hey, you know, it’s a well-established enough app; I don’t have to destroy the environment and start it back up again every time that I release a new feature”?
Are you happy with navigating all the different UIs? Because I’ve heard that AWS is not so easy to navigate, but then I hear from AWS people that Azure is not so easy to navigate. So I don’t know who to believe anymore.
Sergey
Yeah, I’m originally from the Azure stack myself, so it took a minute to get adjusted to AWS’s far more, I would say, raw experience. Azure tries to make it a little more intuitive and user-friendly; at least, that’s how I feel. But yeah, AWS is definitely a lot more raw. You have to know what you’re doing; there’s not much help along the way.
But other than that, it wasn’t that big of a deal. Once you get used to it, once you use it enough, it just becomes part of your toolset. I guess that’s how I feel.
The only thing I still question myself about is why I didn’t put it entirely on Azure or entirely on AWS. That, I think, goes back to my comfort level. I’m comfortable with Azure for basically everything else, so the only reason why I did anything outside of Azure was the email stuff.
Jamie
See, I see that as a very pragmatic approach as well, right? Rather than going, “I’m just going to break through this barrier of figuring out how to do the email allow-listing stuff on Azure”—which seems to be easier for me to do on AWS—rather than just putting the effort in and pushing through the pain, I guess, of figuring this out: “I’ll just go over here, where I know how to do it, because then I can get this feature out,” right?
Sergey
Exactly.
Jamie
That’s a more pragmatic way of thinking about it, and I think more engineers should think like that. I have this whole thing about “stop calling yourself an engineer, because you’re not engineering things,” and being pragmatic is an engineering thing. Just to back that up: on my Dad’s side of my family, there are several generations of engineers, right? So it makes sense to me that if you’re not engineering, stop calling yourself an engineer, right? I’m not saying this to you; I’m saying this to everybody listening. But that’s just one person’s opinion.
But I do like that it sounds like you were pragmatic about it. Just, “let’s get this out the door, because I know how to do it here.”
Sergey
Yeah, I mean most of my choices are made that way. It’s, “I know this thing; I don’t have to learn anything brand new. I think it’s still one of the better options anyway, so I might as well go with this.” This is, of course, until I hear of a new shiny widget out there that everybody should be using now, and I’ll go try it and… maybe not yet. Maybe it’s not ready for prime time.
But yeah, I was very comfortable with MAUI. I’d done several apps with MAUI before, which is why I went with it again instead of using React Native or something like that; there are multiple options at this point for that. So I already knew that; that’s why I went with it. I was comfortable with Azure, which is why I went with that. Of course, AWS was the learning experience for me.
I would say the same thing with Blazor as well. Blazor and, you know, APIs—everybody knows APIs at this point—the RESTful services, that’s all basically par for the course, I guess, at this point.
Jamie
Oh yeah, yeah. That’s the thing, right? If you know .NET, you can do .NET in the browser, on the server, on a phone. Regardless of what people think about that, it means that it’s easier to get started because you know it. It also means that you’ve got less of that context switching happening, but it also means that your barrier to entry, when you go, “I’ve got a crazy idea, I’m going to make this new feature”…
There’s a reason why a lot of the startups and hipster-y projects and fast-moving projects of the early 2000s were JavaScript and Ruby, and that was because there’s a whole bunch of magic happening behind the scenes that you don’t have to worry about. It’s not strictly typed, and you can just add a new feature as soon as you need to. I think maybe .NET is starting to have its moment where—because it’s mostly strongly typed—just being able to run it anywhere…
Sergey
Yeah.
Jamie
…and having things like top-level statements and things like that just make the barrier to entry so much easier.
Sergey
Yeah, I think the barrier to entry is definitely a big part of that. I think if you know the .NET stack really well, that helps you be more productive, because instead of learning the stack, you’re building the project. So I think that’s a key part of that.
Jamie
Then, I mean, you said it, I said it: multi-cloud as well, right? Everyone always hears .NET and thinks “Azure,” but it’s a programming language. It has a runtime that is installed on AWS and on GCP, and you can install it on your cloud provider of choice. You can even get a droplet from whoever, right? Just a server somewhere, and install it and run it there. You don’t need to be Azure specific. That’s not to say that you shouldn’t be Azure specific, but if you want to, you can put it anywhere. I have this argument with people all the time.
Sergey
You can host the whole thing in Cloudflare if you really wanted to.
Jamie
Yeah, absolutely. Absolutely. I actually have a talk from when Blazor first came out, where I hosted a Blazor 0.3.0 app on Netlify.
Sergey
Nice.
Jamie
Which is static hosting, right? So the whole app was running on Netlify, and it was doable. But I don’t think they liked it, ‘cause it’s not for that. But the point was that you could literally run it on static site hosting if you wanted to.
Sergey
Yeah. That’s actually a huge benefit, because then you’re using the user’s browser instead of your server to crunch through the stuff.
Jamie
Absolutely, absolutely, yeah. Your CPU time is no longer being costed. And everyone’s got—or maybe not everyone; that’s a hyperbolic statement. A large number of people have got power banks, or have got access to a thing where they can plug their phone in, or they have phones that last for days. So why not just push the number crunching onto the device? It’s totally a thing.
Sergey
Exactly. Yeah, as long as it doesn’t need an internet connection, you could do it all on local devices.
Jamie
Absolutely, absolutely. Which then, I guess, gives you another entry into yet another technology for an app that you could use on a device, right?
Sergey
Yeah. Actually, even with an internet-enabled device, even if your app does need internet, with Blazor you could do local storage until you get internet access. So while they’re offline, you’re storing everything locally, and then once you get that internet back, you can update the server with the changes.
So yeah, all of this stuff is possible with Blazor, which… I love it. Blazor is an amazing tool for me. I am very happy that it’s a thing. It’s in C# and all that stuff, you know.
Jamie
So does that mean, then, that you’ve got, I guess, a web app that you can… So we’ve got the .NET MAUI app that sits on Android and iOS, but maybe I can sign into your project, which is EpicMail, on the web. Is that a Blazor app, or is that just standard HTML and CSS?
Sergey
Yeah, so the web app itself is MVC—C# MVC—that’s the front-end website, and then the app that’s running behind that on the web is the Blazor app. That is actually the compiled Blazor app that’s running there on the web. We generally have that running mostly in the user’s browser.
That’s actually one of the decisions that we made: you have to use the web to sign up for an account, because both Google and Apple require some pretty crazy terms that you submit to when you allow registration and in-app purchases on their platforms. You have to give them 30% of all of your profits, or something like that, if the user signs up on mobile, on Apple or Android.
So the way I have that working is that you still have to sign up on the web. We have the free option anyway, for everybody, but if you wanted one of the more premium options, you would still do that on the web, and then you could log in via the login on your mobile device. That way we got around the requirement by Google and Apple for that 30% cut into our profits.
Jamie
That was going to be part of a question that I had around the difference between “a standard web app”—I’m using bunny quotes there—a standard web app and a .NET MAUI-powered app, right? I know that build times are a thing. Well, maybe not; if you’re doing something with Node.js, maybe your build times aren’t that much longer than a .NET MAUI build time.
But then you’ve got to go through getting it to Google and Apple, and having them verify and validate and whatever it is that they do when you hand your app over. I guess those times are getting longer now, because people are vibe coding apps and throwing them up on the stores. So that’s a problem.
Sergey
Actually, the opposite, to be honest. Yes, you do need MAUI to generate your Android and iPhone apps, and yes, the build times, especially on Android, can be quite substantive. I think it’s usually just device-specific stuff that’s really taking forever to build. In fact, the Apple one seems to be considerably faster.
But what’s actually interesting is that, once you submit your app for review… I think Google is using AI now, because those reviews used to take three or four days to go through, and now a review is done within a few hours. So within a few hours of posting a new app version, it’s done and out for the public.
But the Apple one is still the same: it’s still two or three days before those get released. I don’t know whether that’s a longer time frame or not; I think that’s about what I expected. Yeah, that’s the way it’s been for the last year or so, about an hour. Google used to take two or three days; now it’s a few hours. Apple was two or three days, and it’s still the same amount for your app to be released there.
Jamie
I guess that’s something for devs to know about ahead of time, right? You can’t control the release date of your app.
Sergey
Yep. That’s why I’ll usually do multiple fixes and things before I release one for the mobile apps, because it is disruptive, especially for people: once they have an update, there’s a “hey, there’s a new update, click on this thing to update.” Whereas the website is immediate, as soon as you get the new page. So…
Jamie
Okay, so here’s a question, then. If you have no direct control over when the new version of the app comes out, you also have no direct control over when a user upgrades or updates their app. Does that mean that there’s a hard requirement on keeping the APIs backwards compatible?
So you’ve released version one; your API looks like this. You fix a bunch of stuff, add a bunch of new features, and API version two comes out. Your API version two needs to be backwards compatible—or, I guess, forwards compatible; I’m getting really confused now, right? Because you can’t guarantee that all of your users will migrate when the API lands.
Sergey
Yeah.
Jamie
You can’t guarantee that the app will land when your API lands. How in the heck do you plan for that?
Sergey
Yeah, I think versioning is really the key there. Like you hit on: version one, version two. You don’t need to version when you’re adding a new endpoint, but you do need to version as soon as you delete or change an existing endpoint. So I try to minimise the deleting and the changing; the adding is not as big of a deal.
I also have a little checker inside my apps that checks every time a user goes into the app. It says, “hey, is there a new version of this app out there?” If there is, it tells the user, “please update your app.” So it tries to keep the user on the most up-to-date version via that route. But yeah, you have to have multiple versions, for sure. Otherwise, yes, people who have not updated all of a sudden break.
Jamie
Yeah. Then you’re the bad guy, because their app has stopped working, right?
Sergey
Yeah, and those reviews are so precious. You need to be careful about making sure that every review is positive and that your customers are super satisfied. So yeah, it’s definitely something you have to be very careful about.
Jamie
Because your happy users are usually the quiet ones, right? It’s the one or two who are upset that are the loudest.
Sergey
Yeah, so annoying. Why can’t it be the other way?
Jamie
So I did find—I’m going to do some furious googling in a moment—but I did find something that I’ve added into one of my apps that, when I do a build, tells me the difference between the APIs. I added it to OwaspHeaders.Core, which is this project that I have for adding OWASP-recommended headers. What it does is it builds the app, then runs this API comparison, and then tells me what I changed. So then I can give out a file or whatever to the people who are using the new version.
I’m going to put it in the show notes, but there is a way that you can do it in .NET where you can say, “here is my API now,” and then you can make a change, and then you can say, “here is my API now that I’ve made the change,” and it produces—I think it’s a JSON file—that tells you what’s changed, which is really useful.
Sergey
Yeah, yeah, that would be cool.
Jamie
Yeah, it’s really important to have something in the app that says, “hey, there’s a new version, please go update, because things will stop working.” Because if you’ve got a versioned API, you want to be able to retire those old versions of the API, right?
Sergey
Right.
Jamie
I hinted at it and then I took over; I didn’t really give you much of a chance to answer. If I’m a standard web dev type of person, and then somebody goes, “now you need to build an app,” what are some of the things that I need to be thinking about? I know we touched on things like release cadence, and that you can’t control when your app releases, and the build times are a little different, and all that stuff. Well, what else is there? I know that there’s the sign-up costs are now a thing.
Sergey
Well, yeah, if you’re talking specifically about EpicMail, then one of the things that surprised me, that I wasn’t ready for, and is part of my expense column now, is an annual technical review by Google. In order for me to have OAuth that links to the user’s email, Google goes through an annual review that costs me five hundred bucks each year.
Jamie
Wow.
Sergey
Yeah. They basically go through my code, and they go through my development environment, which was a little weird, to have somebody looking around my machine a little bit there. But they basically make sure that their OAuth code is sitting in a safe and secure environment. So that was an unexpected thing that I also had to find the money for, and it’s a very lengthy process. It took about three months for that to happen.
The benefit of that is that now my users, instead of having to go and find their Google app password—there’s a whole process required for them to get their app password—instead of having to do that, they can just use their regular Google login, and as soon as they do, they can have Gmail within EpicMail. That’s the same thing that I have with Microsoft as well. Microsoft was a lot easier; it still took some time, but it was a lot easier to get their OAuth approved.
Then, Apple still doesn’t… they don’t allow OAuth to email except for their own internal apps, unfortunately. So all my iCloud users still have to use an app password to connect their account.
But yeah, that was just a shocking thing to have to go through: five hundred dollars every year that it now costs me for them to go through and verify my code, make sure that there’s nothing bad with it, or any hacky stuff. Of course, I also have, in process, about two thousand unit tests that make sure that all my stuff is good and doesn’t revert and doesn’t break. So I have a pretty secure setup here, I feel like.
Jamie
Mmm, that’s bonkers to me, that you’re going to pay someone five hundred dollars to poke around on your computer, and for them to say, “yeah, everything’s fine, don’t worry about it.” It’s like, what?
Sergey
Yeah, it was quite an experience. I was not ready for that. Thankfully, we live in the world of AI, and I’m like, “okay, what do I need to get ready for?” So thankfully I had everything ready for them when they arrived to poke around. But it was just pretty weird to me how they do all that, and that it’s a required part of the process.
Jamie
I mean, it makes sense, right? Because they’re effectively giving you the ability to let the users access their most…
Sergey
…private stuff.
Jamie
Yeah. Maybe I want to say private, but if you are an Android user, your Google account is the front door to everything.
Sergey
Right.
Jamie
Not just the privacy stuff, but your entire everything, right? It’s happened to family members before: if you lose your Google account, you lose your Google password, you need to set up a brand new account. You’ve lost all of your photos, you’ve lost your apps, you’ve lost your purchases. So yeah, I totally get why they are so excited, I guess, about making sure that the environment that you’re building the app in is so secure.
But then it raises a question: if all they want to do is poke around on my computer, what’s to stop me from just buying a separate machine? Okay, right, stay with me here. I’m going to think maliciously, and I’m sure they’ve got a plan against this. But what’s to stop me from just buying an empty machine, putting an operating system on it, and using that? You know, clone my code down, make sure it builds, use that. That’s a really clean system. Then they’re happy with that, and then I move over.
Sergey
Well, they don’t actually go into your PC. They go into your repositories.
Jamie
Right.
Sergey
They don’t actually remote into your machine or anything like that, so it wasn’t to that level. It was more like: they checked the code, they checked the repository, they checked all of the connections, making sure I’m not revealing any secrets. They wanted to look at my app configs and things like that, to make sure that everything I was doing was secure according to their standards. They didn’t actually remote into my machine.
Jamie
Right, okay.
Sergey
Yeah.
Jamie
I’m glad I asked, because I had this weird feeling that you jumped on a Teams call or a Google Meet or something, and they just remoted into your computer and started digging around. I mean, it makes sense. Like I said, they want to make sure you’re doing things securely. So…
Sergey
Yeah.
Jamie
Okay. So that’s one thing you want… yeah, because in standard web development, all you need is a domain and hosting, because nobody has to actually check that what you’re doing is not malicious, right? That’s interesting, yeah.
Sergey
Yeah. Unexpected, expensive, and fairly intrusive, but again, understandable why it exists.
Jamie
So I guess if it’s a private repo—let’s say you’ve got it hosted on GitHub—do you have to give them access to the GitHub repo, or do you just somehow send them the repo from your machine? I’m getting into the weeds here.
Sergey
Yeah, I added one of their users that was verifying it to my repo as a read-only user, and they basically reviewed my entire codebase.
Jamie
Right, okay. That’s interesting.
Jamie
Okay. So when we talked about it: we have the .NET MAUI app, and we have a Blazor client-side app, I guess, that runs in the web browser. Other common bits that you can use across those as well?
Without giving away too much of the secret sauce, I’m thinking: is it one monorepo for the back-end service and the APIs and the front end and the apps, and then you’re just reusing components? Or is it split up into, “this is the .NET MAUI repo, you can have a look at that. This is my server repo, you can have a look at that. This is my front-end Blazor client-side web app, you can have a look at that there”? Again, without giving away the secret sauce, how have you architected it? Because I feel like that’s a question.
Sergey
Yeah, so I generally start with clean architecture as my default. I do have a core infrastructure level that has all of the low-level keys, and my models or contracts project that has all of my models listed, so that the Blazor app can access the same models as the server. So that’s a shared project that’s shared between all the units.
It’s similar with the repositories. The repositories, though, are primarily only used in the service, but I’ve defined those in the data project. So my data project has my contexts and my mapping and my repositories. There’s a core, which has some startup bits and stuff like that, and there’s the models project, which is also shared, which has all of the C# POCOs and all that stuff.
Jamie
Right, okay. So then you’re able to share loads of code, and reduce that cognitive overload of, “the model is defined here in the API, and I have to recreate it over here for the .NET MAUI app.” Which is what you would have if you had multiple different technologies, right?
Sergey
Right, yeah. I would have to build a middle DTO layer or something like that. But because I’m sharing those models, I don’t have to.
Jamie
Right. In the world where you’re having to create those DTOs, everything would be sent over the wire as JSON, and you don’t have to do that if it’s .NET, I suppose.
Sergey
Yeah, I mean, it’s just one less cog. It’s not that big of a deal, because Microsoft handles it for you either way, just as cleanly. But to me, DTOs are useful primarily if you’re going to be having a public API where the structure might be different. Maybe what you’re sharing with the public is not the same as what you’ve stored in a database; then DTOs make a lot more sense.
But if your API is internal, and the models are all internal and they all look the same on both sides, then a DTO becomes, to me, an unnecessary extra layer. I still use them a lot in a lot of my projects, but not in this case.
Jamie
It’s another thing you’ve got to put tests in for. Not just for the model, but for reading from it and writing to it, and when the model changes…
Sergey
Serialising, all that stuff, yeah.
Jamie
It’s extra headache. Again, like we talked about earlier, you’re taking the pragmatic approach: don’t need it, get rid of it.
Sergey
Yeah. That’s right.
Jamie
Cool. So if folks are listening in and are like, “I want to try this out, I want to learn a little bit more about it,” or maybe, “I want to get in touch with Sergey and talk about what’s going on with him,” how do folks do that? I can appreciate that, since this is a closed-source project, they can’t just access the repo, but there’ll be documentation, right?
Sergey
Yeah. Probably the easiest way for them to contact me directly is going to be on my main developer site, which is prudentdev.com. There’s a contact form that goes directly to me, and I answer all of those. The other way is to spin up an EpicMail account; there is a support option there, and I usually read most of those as well.
So if you have any direct questions, just create an EpicMail [account at] epicmail.org. I own a trademark, but I don’t own the .com yet—still working on that piece—so it’s epicmail.org. They can just sign up for an account; it’s free to do so, and there’s a support option. That might be the fastest and easiest way to get hold of me directly. Or, like I said, my main developer site is prudentdev.com.
Jamie
All right, cool. If folks want to learn more about the paid options for EpicMail, there’s a page on pricing and stuff like that, right?
Sergey
Yeah, it’s at epicmail.org, at the bottom. There’s a no-cost plan that gets you three free accounts that you can just use. I do require a credit card for all accounts, to prevent abuse—you just put in a credit card and it verifies—but then the free option stays free. Then basically it just goes up: a dollar a month gives you ten accounts and more storage, and it goes up from there.
Jamie
Cool. Okay. So I’m taking from this conversation that email is perhaps not as hard as I once thought it was, as long as you’re willing to put the effort into learning all of the moving parts. Is that how you’d put it?
Sergey
Yeah, it’s definitely interesting to say that it’s no longer as complex to me today, but when I first started, it was definitely a lot over my head; a lot I had to learn. But yeah, anybody can do it. If you’re a software engineer, I’m sure you’ve built complex things before, and it’s the same process: just learn as you go, different pieces fall into place, and eventually you get to the other side, which is where I’m at today.
Jamie
Cool. Well, Sergey, it’s been fantastic talking with you today. I’m hoping that we can have a more in-depth conversation another time about all the different things that are going on with EpicMail, and maybe the future developments, if you’re interested. Because I would love to keep a thread open on the .NET MAUI app train and see how that evolves, because a lot of the talks that I’ve been to about .NET MAUI have been, “okay, File > New Project, .NET MAUI. Okay, thanks for coming to my talk.”
Sergey
Well, Jamie, I look forward to the next meeting as well. This has been fun. Let me know if you have any questions; just reach out to me. I’d be more than happy to help with your project.
Wrapping Up
Thank you for listening to this episode of The Modern .NET Show with me, Jamie Taylor. I’d like to thank everyone involved with this producing this episode for graciously sharing their time, expertise, and knowledge.
Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of this episode. The show notes, as always, can be found at
the podcast's website, and there will be a link directly to them in your podcatcher.
And don’t forget to spread the word, leave a rating or review on your podcatcher of choice (head over to
dotnetcore.show/review for ways to do that), reach out via our
contact page, or join our discord server at
dotnetcore.show/discord (all of which are linked in the show notes).
But above all, I hope you have a fantastic rest of your day, and I hope that I’ll see you again, next time for more .NET goodness.
I will see you again real soon. See you later folks.