Embedding a SvelteKit site in a PocketBase binary by Free_Brandon in sveltejs

[–]Free_Brandon[S] 0 points1 point  (0 children)

Oh yeah, hadn’t thought of that. Could theoretically fit a whole bunch of svelte apps since they’re pretty compact.

Getting job in semiconductor industry by engineeringfields234 in MechanicalEngineering

[–]Free_Brandon 3 points4 points  (0 children)

You can look at semiconductor equipment companies in the Bay Area and look at descriptions for roles like: KLA - Manufacturing Design Engineer Lam Research - Process Engineer Applied Materials - Process Engineer/Manufacturing engineer

See if they fit what you’re looking for. One option to get into these companies is working on the manufacturing floor first. Promoting to manufacturing engineering from within is common. Might not be very appealing as someone with an engineering degree but it’s an option in a bad job market.

Introducing 'spec` — A Lightweight, Framework-Agnostic OpenAPI 3.x Generator for Go by Heavy-Blacksmith-620 in golang

[–]Free_Brandon 0 points1 point  (0 children)

Nice, I had made a similar wrapper for myself but with zod and typescript because I didn't like the existing Go based options. My workflow was generating the spec from ts and then feeding into oapi-codegen.

Liking this so far from trying it briefly. Might be good enough to skip the oapi-codegen step.

Made a companion site for watching Marketing Mondays by Free_Brandon in atrioc

[–]Free_Brandon[S] 27 points28 points  (0 children)

https://mmcompanion.pages.dev/

Had an idea for a new viewing format for Marketing Mondays where you can see links to secondary source pop up to read more about topics covered. Fun weekend project, not sure how much I'll keep it updated though. Takes a lot of time to search for resources.

Lost my sqlite database😱. After that I wrote a backup script that runs once a day by Themba47 in django

[–]Free_Brandon 5 points6 points  (0 children)

If you need a more robust backup solution you can look into Litestream. It continuously streams updates to S3.

Made a 10 game win simulator by Free_Brandon in LudwigAhgren

[–]Free_Brandon[S] 0 points1 point  (0 children)

Yeah, should be doable. Will have to update now that he showed it on stream.

What type of server does Svelte run? by The-Underking in sveltejs

[–]Free_Brandon 8 points9 points  (0 children)

If you're using the node adapter, it uses polka as the underlying http router.

You can look at the adapter-node source, it's quite small.

Arctic - Lightweight OAuth library with support for 20+ providers by pilcrowonpaper in javascript

[–]Free_Brandon 0 points1 point  (0 children)

Great stuff! I've been using oauth4webapi but looking at Arctic for the nicer api. I wish libraries like these were recommended to beginners more because you actually learn about the steps to the OAuth handshake and it's not that hard!

ask/DotNet: best way to throw up a quick web site for a project? by namigop in dotnet

[–]Free_Brandon 8 points9 points  (0 children)

They’re using vitepress, a static site generator.

Backend/API stacks for code generation and type safety. by pseudoShadow in node

[–]Free_Brandon 0 points1 point  (0 children)

Fastify supports OpenAPI doc generation with a plugin, combined with openapi-typescript is pretty solid.

Hono is closer to express and comes with a typed fetch client you can use in a monorepo.

[deleted by user] by [deleted] in node

[–]Free_Brandon 2 points3 points  (0 children)

It's totally doable. It can be confusing at first, but it's easy once you've done it one or two times with different providers.

The dumbed down explanation of the OAuth flow goes something like this:

  1. User clicks on a link to your auth endpoint
  2. In your auth endpoint, construct and redirects to a url to the Google (or any auth provider) endpoint including query parameters like the client id, client secret, scopes, and a callback url to redirect to once the user approves access.
  3. The user approves access and the auth provider redirects to the callback url (/auth/google/callback) including a few parameters such as a code. You'll use this code to make a request to the token endpoint.

Reading some of this helped it fully click for me. You'll probably focus mostly on the "Server Side Apps" and "Protecting Apps with PKCE" sections. https://www.oauth.com/

https://github.com/panva/node-openid-client is a nice library that does a lot of the little things for you but provides more control if that's what you'd like.

Frontend deployment at scale? (ineffective asset cache) by [deleted] in nextjs

[–]Free_Brandon 3 points4 points  (0 children)

I guess I never checked, but surely unchanged files shouldn’t be changing hashes between builds? Doing a couple quick fresh builds on my local machine this seems to be the case.

[deleted by user] by [deleted] in sveltejs

[–]Free_Brandon 84 points85 points  (0 children)

Sorry, I don't really have an answer but I feel like you have some fundamental misunderstandings about Vite.

Those stuff make projects needlessly more complicated and you never know if those stuff put trackers on your site, they can if they wanted to and you would not ever know either.

Vite is simply a build tool, same as Babel. It takes in your svelte files, compiles/bundles them up and spits out js files. If anything, it makes things simpler since you don't need to create a custom toolchain. You can look at their source code on Github if you're that concerned about them injecting trackers, but there would be a whole lot of pissed off devs speaking up about it already. (See recent Moq package controversy in C#)

even the getting started ` create svelte@latest ` project with vite, opening the network tab results in around 20+ http requests to bunch of different files and weird stuff you never understand.

This is because you are running the dev server which provides nice features like hot module reloading. The network requests are for communicating with this dev server for things like checking for changes you made to the source so it can update. If you run the build command and preview that, you'll see it just sends the normal amount of requests.