almost 3 years ago Syntax Podcast
We Need Your Help With The Secret Sauce
- 00:40 New show discussing Syntax website secret sauce
- 01:19 Got name Secret Sauce from whiteboard in Toronto
- 01:34 Want to know tech stacks of large companies
- 02:23 Google Docs rendering episode was great example
- 02:51 Email or use forms to suggest future secret sauce topics
- 05:11 Using SvelteKit frontend, Node.js backend
- 05:19 Serverless functions for API and data tasks
- 06:46 Using Mux's MediaChrome for audio player
- 07:29 Fuzzy search allows quick finding episodes
- 08:01 FlexSearch powers fuzzy search via worker
- 09:21 FlexSearch builds index from database call
- 12:29 Global styles, then scoped component styles
- 13:10 Some global utilities for common needs
- 13:31 Layout utilities help component placement
- 14:13 Using Svelte animation and page transitions
- 15:49 Page transitions via CSS and onNavigate
- 16:18 Using Prettier, PostCSS, PNPM
- 17:10 Enforcing snake_case with ESLint
- 19:00 Using MySQL database with Prisma
- 20:19 Prisma auto-generates types from schema
- 21:31 Using Deepgram, OpenAI, Anthropic for AI
- 23:32 TypeScript provides compile-time checking
- 24:37 Using Playwright for browser testing
- 25:27 Hosted on Vercel, may try Fly.io
- 26:22 Fly.io good for longer processes
- 27:35 PlanetScale for MySQL database
Fuzzy search allows quick finding episodes
Scott Tolinski
Unlike, like a paid service or anything like that, there's no paid component. It's free. We're essentially loading up all that data, loading it in via a worker, and then it's available
Scott Tolinski
and Svelte.
Scott Tolinski
It's really, really slick. It helps you find things very quickly, Anything else? Yeah. Basic Basically,
Scott Tolinski
you know, came from the SvelteKit M. You'd go to a show page, and it would give me an oopsie daisy page, Yeah.
Scott Tolinski
Website. In fact, we have, like, a fuzzy finder for every episode on the entire site.
Serverless functions for API and data tasks
Wes Bos
importing all of the data, the cron jobs that does all the transcription
Wes Bos
is we're starting to use these like little short URLs syntax. Fmmeetup
Wes Bos
And show note summarization.
Scott Tolinski
the front end to the back end. It's all SvelteKit.
Scott Tolinski
Connecting, And that error was difficult to find without century. So if you, have bugs, if you're shipping software, our database
Wes Bos
was one of them, and I threw that in Cloudflare Worker rule, but like you got to pay $5 a month once you have more than 3 rules on Cloudflare. And I was like, we could we could throw that in an Edge function
Wes Bos
And that is for things like the API, one of
Scott Tolinski
the front end framework. SvelteKit has the full stack framework, so it's handling,
Wes Bos
That's all in serverless functions.
Wes Bos
and edge function instead of having to pay and and use some UI to do redirects.
Scott Tolinski
Yeah. And it's an interesting bit of things. I mean, you're able to get those thrown up in 2 seconds, and it just works. Yeah. For for the framework, we're using the SvelteKit
Wes Bos
We are the the listener, will help us find all these little bugs. Although maybe it's not. I think I think Vee inlines stuff
Prisma auto-generates types from schema
Scott Tolinski
AI tools to identify who's talking when,
Scott Tolinski
The Svelte kit, the way that they handle types, but also how Prisma generates our types and stuff. It's all just very, a. Very nice to work in. Services.
Scott Tolinski
These are some things that I think you know a little bit more about considering you were doing a lot of this AI work. But we're using several things For our transcripts as well as, directly when you need it. In fact, most of the code of our implementation of FlexSearch,
Scott Tolinski
Claude, and Deepgram. Do you want to dive into those? Yeah.
Scott Tolinski
if the data is there or not. Yeah. You know what? And and it's one of those things that when I was working a lot in Graph q l. I felt like I was defining my types in 4 different places, and now it's like, alright.
Scott Tolinski
a I OpenAI, function in or a, sorry. Not a yeah. There's a a,
Scott Tolinski
You really just have 1 place, and it and It cascades the entire app using Yeah.
FlexSearch builds index from database call
Wes Bos
and then it's able to include the Wasm file,
Scott Tolinski
instantly Obviously, that hits that content dot JSON with a fetch n. And then
Scott Tolinski
Then we just have a worker
Scott Tolinski
and then
Wes Bos
throws it into FlexSearch, basically, and then we massage a little bit. Isn't that, like, loading every single show note on the client side then? so that we don't necessarily have to pay for that, as well as It's part of the the code. Right? Like Yeah. I would hate for someone to come along and be like, hey, where's this, like, your redirect happening? Oh, you have to log into the service and text layout, you know, the fonts, the colors,
Scott Tolinski
if you're out there and you wanna take a look
Scott Tolinski
f. Find mini
Scott Tolinski
of data? I'll tell you exactly how many megs of data it is. Content dot JSON. It is,
Scott Tolinski
in our implementation for this thing,
Scott Tolinski
and then,
Wes Bos
So it's this is similar to
Wes Bos
And that's being loaded client side? Yeah. But isn't that, like like, 8 megs of Soup to nuts TypeScript, Node. Js. On the
Wes Bos
we're going over our bandwidth because all of the guests, all of the transcripts.
Scott Tolinski
creating essentially an array of all the shows. And then I'm I'm passing that into
Scott Tolinski
It is happening here, but, Trailing comma none. Did you add that? Head on over to syntax.fm We're using MediaChrome,
Wes Bos
have access to that pretty quickly.
Scott Tolinski
f The tree,
Scott Tolinski
Mhmm. But maybe that's a concern. Yeah. That's okay. Whatever.
Wes Bos
We styling. Let's talk about that next, which is scope styles.
Wes Bos
but, like, this JSON file.
Scott Tolinski
it's not that many files, and so you could really go through it pretty quickly in terms of, like, what exactly with Svelte as the, What is the secret sauce behind your product? The stack. What types of tools are you using? What types of libraries. Where does it host? What what are the things that are practical
Wes Bos
that explicitly especially when I'm using like a library. So I'm trying to figure out how to like get that Wasm file included in the build
Scott Tolinski
creating it and using a a push to push it into the structure that we want it to have, And then that's sending it as a content dot JSON.
Scott Tolinski
and
Scott Tolinski
It creates the links and the breadcrumbs and everything and spits it out on the UI. So that way when I Start typing. It automatically a And we're doing so using something called flex search.
Wes Bos
finds everything from that giant list. Oh, okay. So it it just it just sticks everything in memory,
Scott Tolinski
FlexSearch, and and I'm creating an index there.
Scott Tolinski
Is that huge? On the client side, it's been it's doing so in a worker, though, so it's not doing it on the main like, you're not nothing's being interrupted there. Okay. But Yes. But it's doing it in a service worker. So Yeah. I like Snake case. It's easy for me to read. It helps. I know people. Yeah. S. So that's not the JavaScript way. I get it. It's just easier for me to read.
Scott Tolinski
m. You know, the the relevant stuff is there's a content dot JSON route, and that's essentially running just a normal Prisma client
Using Mux's MediaChrome for audio player
Scott Tolinski
is great. It's a web component that you can use for video players or audio players or anything you want, and it is extremely full featured.
Scott Tolinski
or in general, Mux video, the whole Mux packages there for about
Scott Tolinski
And I'm I'm somebody there who's used every video player on the block. And I gotta say MediaChrome
Scott Tolinski
MediaChrome for a Full archive of all of our shows.
Scott Tolinski
any type of playback
Scott Tolinski
is they're just they're just lovely, and you don't have to use mux to use these. These work with any sort of video stream whether you're streaming or using audio or or anything. They're they're fantastic.
Using Playwright for browser testing
Wes Bos
Takes in some of the importing stuff. Oh, no. The importing stuff that you did is pretty fast. Right? Like, how long does it take you to import all 600 shows? Like, a couple seconds? Yeah. A couple seconds. If you're on if you're on local, it takes define Autumn, it's a it's a bit of a different, like, way to to get used to it, and sometimes it's annoying when you hover over top of a type and it's just just vomit. I would I would prefer that it was just a show type, but
Wes Bos
on Vercel, also has a relationship to a transcript. All of that stuff, right? And then
Wes Bos
and been pretty happy with that. I'm Fighting And then I find out What speaker number that's associated with and that's how we know if it's Scott or I
Wes Bos
For Vercel, tech of the
Wes Bos
are we've been like kind of devin' on it is the platform. Fastify is
Scott Tolinski
milliseconds. It's so fast on local.
Wes Bos
transcript stuff
Transcript
Announcer
Boss and Scott
Announcer
Open wide dev fans. Get ready to stuff your face with JavaScript, CSS, node modules, barbecue tips, get workflows, breakdancing,
Scott Tolinski
episode of Syntax,
Announcer
Monday. Monday. Monday.
Announcer
soft skill, web development, the hastiest, the craziest, the tastiest web development ed treats coming in hot. Here is Wes Barracuda
Scott Tolinski
website But we're using for, you know, more more classical testing. We're using Playwright for end to end testing, and that's the only testing that we're doing. We're not using any mocking. We're not using any of that kind of stuff. Basically, just fire up the site with the developer DB. And And the things that we're not testing, I'm not testing the,
Email or use forms to suggest future secret sauce topics
Wes Bos
This is not exhaustive
Scott Tolinski
wasn't quite
Scott Tolinski
the syntax secret sauce. But before we do so, let's Talk about one key component to this syntax secret sauce, and that's how we took, track our errors and exceptions because syntax is presented by Sentry. And Sentry is a A tool that we use that actually we didn't have in this outline here, but Sentry is a key tool for us to be able to track
Scott Tolinski
which is our 500 level error.
Scott Tolinski
Just yesterday,
Scott Tolinski
schema changes, and that's what was causing all the trouble.
Scott Tolinski
errors and exceptions. Just which is from Mux for the audio player on the website, and the rendering of Google Docs, like, how wild that was.
Scott Tolinski
or You could hit us up on any of the socials, And FlexSearch creates essentially
Scott Tolinski
You wanna track those bugs? Sentry. Io. Alright. So let's start off.
Scott Tolinski
And I was getting really frustrated with this, and luckily, we have Sentry. So I popped open Sentry. And guess what? to any sort of server side, stop dealing with actions or how we send things to and from, syntax.f m, check it out. Check out the repo. There's a ton of tasty stuff in the repo.
Scott Tolinski
It should have reimported all of them. The import was successful.
Scott Tolinski
where the database
Wes Bos
an alternative runtime, maybe we don't have a show type. We just have A type of whatever is returned from a specific query that we've wanted, right? Like I might want a show with just the number and the name,
Scott Tolinski
So Prisma hadn't gotten the,
Scott Tolinski
to the markdown files.
Hosted on Vercel, may try Fly.io
Wes Bos
is the max you can extend a serverless function on Vercel to.
Wes Bos
So some of the stuff I'm doing, which is hitting APIs, takes Let's talk about database.
Wes Bos
But then you also have the benefit of you're not paying for it
Scott Tolinski
in a production environment, it's a it's a couple seconds. That's impressive.
Wes Bos
30, 40, 50 seconds.
Wes Bos
that sort of longer running processes, all of our logic, database saves, queries,
Wes Bos
over,
Wes Bos
Kind of neat because you can run like you could basically just spin up a 6 lines of JavaScript at it and like Added a little swoopy animation Then we also Another one called Anthropic Claude, and we could we could do that right in So I was just I had to make sure that Have some AI show notes, which are I'm very happy with. It will do really good summarization
Wes Bos
would fit within the timeouts of a serverless
Wes Bos
long running node process
Wes Bos
running a longer running process. And Fly is kind of
FlexSearch powers fuzzy search via worker
Scott Tolinski
but, I'm really, really impressed with FlexSearch. It's super fast. It works very well. And, again, you're not having to pay for an additional service there to get really nice and easy search going. Yeah. I'm I'm actually curious about that because I I haven't I don't think I've actually asked you questions about that.
Wes Bos
Those those are the 2 things, I guess.
Wes Bos
So that that's really quite it. Do you have to build like an index of all of the shows to go into the search? Like, I'm just curious, how does FlexSearch know about
Scott Tolinski
of data. Yeah. And that data is is coming directly just from a database call.
Scott Tolinski
and it could be anything that we tell it to. So it it's really like The the way it works is you you're kind of like building Working where I
Scott Tolinski
And anything that I want to put into that tree can be used as a parameter on the search.
Scott Tolinski
N. I think they call it site kit is what they they call it, but it it's what they use to build their own sites. It came directly from their code base, And there's a lot of nuggets in there. Obviously, we adapted it to our needs,
Scott Tolinski
and the index is built by FlexSearch.
Scott Tolinski
a tree
PlanetScale for MySQL database
Scott Tolinski
And, you know, maybe there's Some Easter eggs throughout the site as well. So real world applications? I saw that Part of the database sync wasn't running, and Prisma didn't run a DB push.
Scott Tolinski
take take some time to check it out. I think, secret sauce.
Scott Tolinski
I'm really proud of the code base, proud of the the work that we've done here, and it's it's pretty The,
Scott Tolinski
And don't forget to subscribe in your podcast player or drop a review if you like this show.
TypeScript provides compile-time checking
Scott Tolinski
The things you're expecting to be there are there, And the functionality that's important
Scott Tolinski
I you could consider TypeScript
Scott Tolinski
as being part of your testing infrastructure. I might Because it can help save you from potentially finding bugs.
Wes Bos
We
Scott Tolinski
Every time you you visit the page, the The specific header that you're supposed to expect to be there is there. So you're making sure that all of your pages are loading as expected.
Scott Tolinski
is there and works fine. And for the most part, I've been liking Playwright just fine. I really like how
Scott Tolinski
you can run a lot of tests in parallel, and it's just really fast. Hosting.
Scott Tolinski
When you run it without the UI, making sure we're all on the same version of What are you working with? Yeah. And I think one of the best episodes we did n. For our separate club interviews was when we were talking about, I'm not testing a lot of database actions, really. I'm I'm using Playwright to jump through the site, Click the player. Make sure then the episode starts playing when you click the player.
Some global utilities for common needs
Wes Bos
that's not a thing because they're all scoped to what you need. Some utility classes specifically around deploy apps to their TV. You know, there's so much secret sauce there, and I want a single show The new site. We did a we did a show on that, and we'll do another one when we actually launch it. But,
Wes Bos
Also, we've used a class of highlighted somewhere else. You know,
Got name Secret Sauce from whiteboard in Toronto
Wes Bos
we had I forgot who wrote it down. Somebody wrote secret sauce on the whiteboard and we're like, why don't have something called secret sauce. Like, that sounds great.
Wes Bos
When we met up in Toronto last week, That's it for today. Thank you so much for tuning in. We'll catch you later. Peace. Peace.
Using Prettier, PostCSS, PNPM
Wes Bos
is there's still quite a bit of camel case in there that needs to be,
Wes Bos
I had written a bunch of the some of the I think it's 300 seconds
Scott Tolinski
But I would like all the time. Yeah. Snake case.
Wes Bos
And then that, coupled with my default to just go camel case,
Wes Bos
Added by Scott Talinsky. That's surprising. I love trailing comma. No. I didn't add that. I I thought we did have Yeah. There must have been a default. Trailing comma. But we did we did go semi colons.
Wes Bos
like, we need a rule, and then we need to be able to list out where all the camel case because refactoring with TypeScript is easy. You can rename a function pretty pretty quickly,
Layout utilities help component placement
Scott Tolinski
And it it it's interesting because, like, Pretty much anytime you need to place anything on the site because we did some really,
Scott Tolinski
And then you can now basically place anything anywhere Anywhere you want at any given point, and you can do so with a class nice and easily, or you can do so with straight up, named grid columns in CSS. So a lot of lot of fun stuff there. The Svelte animation API
Wes Bos
light and dark mode So quick, just have a like a JSON file of redirects Long running node processes.
Scott Tolinski
layout system. So using, like, grid specifically for vertical and horizontal layouts.
Scott Tolinski
podcast. Yeah. There's a lot there.
Scott Tolinski
really slick stuff with, like, a grid based the data loading, pulling from a database, Mhmm.
Using MySQL database with Prisma
Wes Bos
Prisma will then translate that over to a MySQL database for us, as well as give us the typed API You can quickly scroll down to
Wes Bos
That allows us to query all of the data, which is really cool because, like,
Wes Bos
on the client side like it's unreal how the types just ripple all the way through the entire thing.
Wes Bos
So the way that the types Show notes, show titles.
Wes Bos
you have a query on the server and it's returned from the server And populates the types And there's just a couple spots in the application where we've had to So when you use it, it searches through
Wes Bos
to Prisma we are also using Cloudflare F. Oh, yeah. Yeah. So Then you start having to look at,
Wes Bos
It has and then it has a relationship to guests Our API route currently For 2 minutes and then spin it down and you only pay for those 2 minutes. So it's kind of nice because you you get the benefit of how Sometimes you just need a global right utilities. No, you need a good baseline before you get in.
Wes Bos
With a Prisma adapter, so Prisma allows us
Wes Bos
to They do a very good job at To interact with it via serverless functions, it does connection pooling for us, so we just have to
Wes Bos
And we defined all the relationships. We defined, all right, this is the show. A show has a show number. It has a title, has a description,
Wes Bos
Flow from the schema Fastly. I always forget to mix those 2 up.
Enforcing snake_case with ESLint
Wes Bos
And, you, To worry about.
Wes Bos
into the JavaScript, and it's like
Scott Tolinski
For
Scott Tolinski
Node. So that way we can always make sure that if you're firing up the site. You have the right version of node, and I'm key. Welcome to Syntax. In this 686th Yeah. Or is it a service or just a worker, not a service worker? Sorry. Those 2 always confuse me. Yeah. Oh, okay. Yeah. I'll I'll we'll have to go deep into this Because it's actually, hit our our supper club question form or our or what's it called? What's the, not the supper club question. Our pinxt. Fm forward slash potluck. Yeah. The potluck submission form. Either way, just get get in touch with us, or we will get in touch a. With you, our people will talk to your people, and we'll set something up. So let's dive into We're gonna be talking about the new syntax
Scott Tolinski
Okay. We'll figure it out. Yeah. We got a fit we got fit and finish to worry about. And then Oh, yeah. For sure. We're just gonna launch it,
Scott Tolinski
have have made Vite an actual front and center thing
Scott Tolinski
running scripts, all that stuff with PNPM.
Scott Tolinski
as our, I guess, you would say your your NPM replacement for fetching and storing your node modules 4 megs. Okay.
Wes Bos
base 64 encoded Yeah. That's awesome. Everything else is just Every single show note ever? Yes.
Wes Bos
the images is being give you like markers
Scott Tolinski
newer CSS functionality where we can with largely not having to worry about it. We progressively enhanced some things, some things we're just waiting on. We're using PNPM
Wes Bos
I think it's too big.
Scott Tolinski
And then because we're using SvelteKit,
Scott Tolinski
where you still have access to your Vite config. Right? They didn't obfuscate that. So If you wanna add Vite specific things or you wanna get into the Vite side of things, you could still do that with with no issues. I'm just, I'm on the website right now, And I realized and it like made it. It gave so much more context as to what was happening and it's so good. Very happy with that. Yeah. You you essentially just drop in a, like, a flip, just like a single directive on a DIV, and then it handled The flip animation, since everything was a keyed each block, it kind of knows where everything is and is able to do those flip style animations super easy,
Scott Tolinski
I really like it. It works fast. It works well.
Wes Bos
So we are using MySQL, We do not have any edge functions, but I specifically have A use case for them I don't see it. I don't see a big request, That when you click the next button, Server side, we did consider doing Yeah. Does it have or then you're like, well, the show might or might not have show notes, and you have to Do an if statement, and this way it knows tacking on a little
Scott Tolinski
Post CSS, we're using post CSS with a preset ENV to basically s Give us access to
Scott Tolinski
the whole thing is built on Vite. And one thing I really like about the SvelteKit version one changes that they made, they basically right now, it is just show notes or show titles, man, I was having a weird issue
Scott Tolinski
as our,
Wes Bos
when it knows that it's okay to inline it. So maybe it's not. We'll look into it.
Want to know tech stacks of large companies
Wes Bos
So that was a name that didn't have Fastly I want to know what does it run on? What's their stack? What's? Yeah, what database do they use? You know, how does it all go together? What's what is specifically does Netflix used to a WASM issue right now because
Wes Bos
any sort of Content behind it. The other day I was thinking I was like, you know, it's one thing I love to do is to talk to people there's 1 for adding grit to something. There's a couple around that are just like little handy utility classes if you want to change the font size.
Wes Bos
like Netflix Deno, BUN, Cloudflare Workers, with WASM libraries they need to Serverless functions for all of the back end work.
Wes Bos
that, put it together. You know? What's the secret sauce? who work at these companies to generate our schemasor we sorry, we define the schemas
Wes Bos
Generally, like larger products
Wes Bos
KAYAK or like any any one of these companies.
Using SvelteKit frontend, Node.js backend
Wes Bos
Fastly the Because as soon as you start getting into
Wes Bos
The server.
Using Deepgram, OpenAI, Anthropic for AI
Wes Bos
One of the subheadings is see what we were talking about. I think that's gonna be extremely helpful Fastify
Wes Bos
and that has been pretty consistent. But then I also have been playing with has when we hit that API endpoint, We need something to enforce Much to my dismay. We need an ESLint rule to enforce, And then there's lots are on layouts. Yeah, there's a whole, like, zones and layouts thing, which I think will save that For the
Wes Bos
For the different topics throughout the episode, so if you're like, oh, I want to I want to know what Wes was talking about, it'll give you a really good like subheadings.
Scott Tolinski
Testing. We use,
Wes Bos
We are feeding those into OpenAI,
Wes Bos
where you say, oh, what what did they just say? you don't explicitly, data types.
Wes Bos
It doesn't tell you their names, and we can't train it on n I, which would be nice. But we fix that by
Wes Bos
speaking.
Wes Bos
wild and a little bit more hit and miss getting JSON from them, but I think it's worth it for the quality that we get. Yeah. Yeah. A lot of interesting stuff there.
Wes Bos
the shows. We've we've talked about that in the past as well, but snake case. Because So for the transcripts, we're using Deepgram to transcribe
Wes Bos
diatarization, But you also might want to show with the number, the name,
Wes Bos
which is detecting who the speaker is.
Wes Bos
and they have been fantastic.
Wes Bos
I'm going to it's a little bit More That specific file is is pretty large.
Wes Bos
I'm a cool guy who loves cheese. And then we did consider going to fly as well because
Wes Bos
You know, what was that library they mentioned? I didn't catch it. Sometimes I'm on a podcast and I have to rewind 6 or 7 times, and I cannot understand what that One word that they're saying because I want to look it up. I think that the show notes will be very sorry. The AI notes will be really good for that.
Wes Bos
as well as
Wes Bos
Scott says specifically that weird sentence.
Google Docs rendering episode was great example
Scott Tolinski
Yeah. Well well You can email me directly
Scott Tolinski
And you work on something that could be interesting for this. Hit us up. Yeah. Or if you have a suggestion, like, Like, what do you what do you think about? Suggestion.
Scott Tolinski
I wanna hear more stuff like that, and I I'm excited to dive more into this concept of secret sauce. So if you're out there
Fly.io good for longer processes
Wes Bos
CSM. A lot of the transcript stuff. Word. Hosting planet scale, right? So it's MySQL, I built out the pagination for the show's page, and then
Wes Bos
from the time you start it to the time Yes.
Wes Bos
but we host on planet scale and that allows us So,
Wes Bos
us. And then,
Wes Bos
for some of the redirects, When we transcribe it, so it just says Scott says, like, I'm a I'm not gonna say it because I don't wanna screw up the actual Yeah. Our whole plan here, but font sizes hunk of audio that is known to the end of every episode Because all of the numbers shifted to the left by 1.
Wes Bos
don't know. We're We're not sold on Verstylog just yet, but it's been been working really well for us, especially now that they have Cron jobs as well. It's in beta. That's one thing we've needed for
Wes Bos
connect to PlanetScale and it handles all the Hard stuff for
Wes Bos
Like until you shut the thing down, you're only paying for
Scott Tolinski
With all the redirects, it'd be kinda neat. Word. Well, that is our secret sauce. This new site is gonna be launching, hopefully, by the time, you hear this episode.
Wes Bos
I transcript stuff outside of the show, and I did it all in camel case.
Wes Bos
although I talked Earlier, I would like to move those redirects into
Wes Bos
and whatnot. I would love for the short URLs to be in the code, not even in the database, like a file
Page transitions via CSS and onNavigate
Scott Tolinski
Inside of this, we use Prettier for our formatting, which, you know, did we didn't really change that much in the Prettier. You know, I haven't really touched it.
Scott Tolinski
Very, very specific stuff, prettier plug in Svelte.
Using Svelte animation and page transitions
Wes Bos
it just goes to the next page. It's already preloaded, so it's instant and it's a little bit it was a little bit disorienting
Scott Tolinski
an on navigate a. Kind of life cycle method that just runs when the site is navigated.
Wes Bos
like what,
Scott Tolinski
which, h. Has gotten really easy inside of SvelteKit. It's not quite the same as what Astro is doing. I think people get confused there when they hear that Astro added the The page transitions API because they're actually polyfilling it back to older browsers where the way that SvelteKit is doing it is basically just,
Scott Tolinski
n. Took no time, and then I just added an in and out transition as well. We also use the page transitions API,
Scott Tolinski
there there's just a a Simply a call,
Wes Bos
with the pagination. So
Scott Tolinski
And then you can simply tap into that and then, therefore, take advantage of the new view transitions API using just straight CSS through the rest of the site. So we did that. It's progressively enhanced fully. Works really well. Love it. Some other cool stuff, tooling
Wes Bos
and it's so fast Where we talked to somebody from we won't go in-depth on all the different tech, but I just want to know, like, what are the pieces JavaScript, full stack JavaScript. Well, it's all TypeScript, right?
Wes Bos
So Scott threw
Global styles, then scoped component styles
Wes Bos
and all of the styles are then scoped for that. There is a number of
Wes Bos
One thing about Svelte is you simply just Put the styles if we wanna Go any further. Actually, that's we get a message from Vercel every now and then that our
Wes Bos
Sizes of everything. Global variables.
Wes Bos
in style tags in the same file that you are creating your components,
New show discussing Syntax website secret sauce
Wes Bos
We should let's tell how we got the name for it.
Scott Tolinski
And we're gonna be kicking it off with the new syntax website. We're gonna be showing you our secret sauce.
Scott Tolinski
is we want to know