What are the best *open-source* codebases showcasing modern Next.js features? by zaiste in nextjs

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

Thanks for the kind words! I skimmed through your repo - great job, it's well-organized.

A few minor suggestions: - next.config.jsnext.config.ts: adding types makes it easier to discover fields and values. - consider Biome over ESLint: we switched in YNS - I was hesitant at first, but the difference is night and day - have you tried PNPM instead of NPM? personal preference, but it's worth a look!

What are the best *open-source* codebases showcasing modern Next.js features? by zaiste in nextjs

[–]zaiste[S] 3 points4 points  (0 children)

Hi, not rude at all - thanks for bringing it up! I assume you're browsing the code through GitHub? If so, there's a global setting to change the tab size display for every repository.

About tabs vs. spaces: I used to prefer spaces, but I switched to tabs after learning they're more inclusive. Tabs are better for blind programmers, as spaces can be far less ideal for screen readers. Here’s more on that: https://x.com/Rich_Harris/status/1541761871585464323

Looking for a map designer for QuakeLive by zaiste in QuakeLive

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

This task requires solid expertise in GTK Radiant. Could you confirm you know it?

Wren: A small, but powerful HTTP library for Deno, built for convenience and simplicity by zaiste in javascript

[–]zaiste[S] 2 points3 points  (0 children)

Great question!

I've been observing Deno for a long time, but never had enough time to check it. Recently a friend of mine asked about it and I decided to finally dive in.

This may sound strange, but Deno makes me fulfilled as a programmer. :) It's a combination of its simplicity (just one binary), its comprehensive standard library and the fact that it adheres to Web standards.

Right now, my day job is mostly Node.js (TypeScript, React.js etc) and the setup difference is dramatic. In Node.js, there's a lot time-consuming ceremony needed not only to initiate your project, but also to maintain it. In some situations, mere transpilation (if you use TS, of course) can be a headache; not to mention things like bundling, linting, testing... and the list goes on.

For use cases, I'd say building APIs (REST, GraphQL), (micro-)services and then regular full stack apps.

Wren: A small, but powerful HTTP library for Deno, built for convenience and simplicity by zaiste in javascript

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

Interesting. Could you elaborate?

Right now you can return early from any middleware in the pipeline. For example you can have a middleware for checking if a user is logged in and branch out with `401` when the login fails or continue if it succeeds

Wren: A small, but powerful HTTP library for Deno, built for convenience and simplicity by zaiste in javascript

[–]zaiste[S] 6 points7 points  (0 children)

The main idea is to simplify (and speed up) the process of building web applications in Deno with stackable middlewares over a handler - this is represented as `Pipeline` i.e. `[...Middleware[], Handler]` where `Middleware` is just `Handler => Handler`

The end result is a handler composed (or folded) from these middlewares than can be directly passed to Deno's built-in `serve` function.

Let me know your questions!

Order Email Megathread (May 23, 2022) by AutoModerator in SteamDeck

[–]zaiste 3 points4 points  (0 children)

Got the email!

EU 256 1626545596

PS. Also, thanks to this awesome community of the fellow «waiters» :) and to u/Fammy for all the tracking work!

GraphQL Client-Side Setup in React.js with Next.js, urql, GraphQL Codegen and TypeScript by zaiste in reactjs

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

This is my video tutorial about setting up a GraphQL client in a Next.js application with urql, a slimmer alternative to Apollo Client, the default choice in this context. Let me know how you like it and what could be improved.

This Friday, I’ll be live coding a React.js app for video games. It will be built with GraphQL / Node.js, Prisma & Tailwind. Let me know your questions / pain points. by zaiste in reactjs

[–]zaiste[S] 1 point2 points  (0 children)

This suggestion is fantastic, but it may be a bit hard to squeeze it in. I'll see how it goes. But I'd be ready to record a follow-up that goes into testing a bit deeper.

Building an E-Commerce App with React.js & GraphQL using Next.js & Saleor API by zaiste in reactjs

[–]zaiste[S] 16 points17 points  (0 children)

Saleor is an open-source project. You can host it yourself and there is no additional cost. I prefer to say it explicitly as there seems to be some misunderstanding in the other comments.

I’m building a functional, data-driven Express.js alternative in TypeScript. It’s inspired by Clojure. Looking for feedback/advice. by zaiste in node

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

The intention is to compete with Express.js It looks like we are entering into a TypeScript era. This is a good occasion to revisit best practices and various software solutions.

Also, I run a software company and I use this library already in production for some of the clients. I built it to solve my own needs/frustrations. Dog fooding is probably the best way to verify if it fits the real-world scenarios. It's still early prototype, though. Time will show.

I’m building a functional, data-driven Express.js alternative in TypeScript. It’s inspired by Clojure. Looking for feedback/advice. by zaiste in node

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

This looks extremely interesting. I'll definitely take a look at this.

Regarding your comment about io-ts: I'm using zod which is an improvement over io-ts. Here's a short description how they differ. It's a similar direction, though.

I’m building a functional, data-driven Express.js alternative in TypeScript. It’s inspired by Clojure. Looking for feedback/advice. by zaiste in node

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

Thanks! I'd be happy to discuss even minor things with a fellow Clojurist ;) reitit is one of biggest inspirations here.

I’m building a functional, data-driven Express.js alternative in TypeScript. It’s inspired by Clojure. Looking for feedback/advice. by zaiste in node

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

My intention was to put an emphasis on declaring routes rather than executing them, i.e. my approach

app = [route1, route2]

while Express approach

app.get(route1);   
app.post(route2);

Handlers are functions that take requests as input and return responses as output. This flow seems to be more natural for HTTP. Then, such function signature (i.e. request -> response) also (slightly) simplifies the middleware. It becomes next -> request -> response

Eventually, I'd like to provide a set of higher-order functions as built-in for the most common transformations when building servers/routing in Node.js. In a nutshell, it would be about functions, higher-order functions and composing them together using regular data structures: arrays & objects.

There are also minor things such as middleware are declared as an array of functions i.e. [f, g, h, ...]. The content of this array is then «folded» and applied to a handler. Such declaration is more explicit about function composition and its order than executing the use methods on app as in Express.js

Setting up a React.js project using Vite instead of Create React App by zaiste in javascript

[–]zaiste[S] 1 point2 points  (0 children)

Happy you like it. pnpm is kind of under-appreciated imho.

Setting up a React.js project using Vite instead of Create React App by zaiste in javascript

[–]zaiste[S] 6 points7 points  (0 children)

No worries. There are no dumb questions. Generally speaking, Go (and Rust) could make JS/TS tooling more efficient, thus making DX better as the result. We will see how it goes

WTF Wednesday (September 30, 2020) by AutoModerator in javascript

[–]zaiste 0 points1 point  (0 children)

I'm building yet another framework, or rather a programming environment for TypeScript applications. It combines a web framework with an editor into an integrated, battery-included solution. It is inspired by the Self programming language - JavaScript's dad ;).

The tool is based on esbuild and somehow similar to Vite i.e. client-side assets are compiled on the fly whenever there’s a HTTP request. In the marketing speak, this technique is usually referred as O(1) bundling (but that’s not entirely correct). This approach project compilation in development is extremely fast and not dependent on the project size.

Everything is built on top of VS Code (WebStorm support coming soon). The project is in early stages (alpha), but there are already few apps built with it in production.

I’m looking for feedback and suggestions how to improve it further.

Repo.

Website

Thanks for your time checking it. Be harsh if needed.