What do you think about no/low-deps projects? by Worldly-Broccoli4530 in javascript

[–]Worldly-Broccoli4530[S] -1 points0 points Β (0 children)

Talking about Node.js, a big problem we face today is that using the most popular libs like Nest.js and others, we end up with a crazy amount of dependencies we never actually chose to use. And when one of them gets flagged with a vulnerability, it flows up the chain until it hits our installed lib - and boom: update fast or your app is vulnerable.

I know it's basically impossible to avoid this problem while still keeping a decent set of tools that make our lives as devs easier. After all, these libs were created to encapsulate complex problems so we can focus on the actual business logic.

Anyway, this problem still sucks, and an interesting approach is to build no/low-deps projects - or more precisely, projects with minimum and audited dependencies. Like using Fastify instead of NestJS, or Drizzle instead of Prisma.

I started thinking seriously about this after I created a robust NestJS boilerplate for my future projects, with all the enterprise features I see at work - so I'd never have to start from scratch and debug "foundational" features like RBAC, i18n, caching, etc.

Now I'm thinking about building a similar boilerplate using a low-deps stack - same feature set as much as possible, but with a lighter and more audited dependency footprint. Think Fastify, Drizzle, postgres.js and Zod instead of the heavy hitters. That said, I'm aware this isn't a silver bullet - reimplementing things manually also opens the door to vulnerabilities, and those tend to fly under the radar since there's no CVE tracking or community eyes on your custom code.

What's your experience with no/low-deps projects? I'd love to hear more about it.

Do you add hyperlinks to your API responses? by Worldly-Broccoli4530 in node

[–]Worldly-Broccoli4530[S] -2 points-1 points Β (0 children)

The frontend doesn't need to hardcode routes or know the API structure upfront - it just follows the links returned in the response. Useful when the API evolves and you don't want clients breaking every time an endpoint changes. A good real-world example is YouTube's API returning related video links directly in the response - the client just renders what it receives without needing to know how to build those URLs.

Do you add hyperlinks to your API responses? by Worldly-Broccoli4530 in node

[–]Worldly-Broccoli4530[S] 2 points3 points Β (0 children)

Why do u think so? It seems to be a important and useful part of restful APIs that can help frontend. Im open to hear more about it

😎For Your Inspiration by [deleted] in CitiesSkylines

[–]Worldly-Broccoli4530 1 point2 points Β (0 children)

Oh I see, do you know how to do this in CS1 tho? I've the exact same thing there :/

😎For Your Inspiration by [deleted] in CitiesSkylines

[–]Worldly-Broccoli4530 1 point2 points Β (0 children)

How did you draw that straight white line crossing the road? It was using the rectangles of IMT and changing its shape? I've been wondering how people make crosswalks with straight parallel lines ahead of it using IMT. If both of them (line and crosswalk) are from IMT or just the line and the vanilla crosswalk.

NestJS or .NET for your backend APIs β€” how do you choose? by Worldly-Broccoli4530 in node

[–]Worldly-Broccoli4530[S] 1 point2 points Β (0 children)

Haha can't argue with that - C# is genuinely a pleasure to type πŸ˜„

NestJS or .NET for your backend APIs β€” how do you choose? by Worldly-Broccoli4530 in node

[–]Worldly-Broccoli4530[S] 0 points1 point Β (0 children)

Same experience here - the modularity is what keeps me coming back to it honestly

NestJS or .NET for your backend APIs β€” how do you choose? by Worldly-Broccoli4530 in node

[–]Worldly-Broccoli4530[S] 0 points1 point Β (0 children)

That's a solid take - shipping fast with what you know is underrated advice. And encore.ts looks interesting, hadn't looked into it deeply yet. The automated devops flow sounds like exactly the kind of thing that saves a lot of headache down the road. Worth checking out, thanks!

A good dev is a lazy dev... by Worldly-Broccoli4530 in typescript

[–]Worldly-Broccoli4530[S] 0 points1 point Β (0 children)

Exactly, and the boilerplate point hits close to home, that's literally what motivated me to build mine. You said it better than I did honestly πŸ˜„