NNAS
zod
NNAS | zod | |
---|---|---|
9 | 300 | |
6 | 31,277 | |
- | - | |
8.9 | 9.3 | |
about 2 months ago | 3 days ago | |
TypeScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
NNAS
-
Change password flow in Strapi and NextAuth
All the code in this chapter is available on github (branch: changeusername).
-
Full guide for authentication with Next 14 + NextAuth 4 + Strapi v4 using Google and credentials provider
I uploaded all of my code to github per chapter via branches so you can follow along there too.
-
Next + NextAuth + Strapi: setting up our project
We need to do some installing and configuring before we can start. The endpoint of the setup code can be seen on github (branch setup).
-
NextAuth with GoogleProvider: sessions
This is the second part on the basic configuration of NextAuth with GoogleProvider. The finished code for this chapter is available on github (branch: basicgoogleprovider).
-
Error handling in our form component for the NextAuth CredentialsProvider
Done! Take a look at the finished component on github.
-
Signing up with the NextAuth CredentialsProvider
is a server component. It just contains some html and tailwind, you can see it on github. Inside we will import and render our component where all the action happens. Strapi requires 3 input fields for signing up a frontend user: username, email and password. So, we will have a form with these 3 fields and a button. This will be our starting point.
-
Sending email confirmations in Strapi
Updated link
-
Updating the userdata in Strapi and NextAuth
You can see the final version of the editUsernameAction, component and the jwt callback on github.
-
Change password flow in Strapi and NextAuth CredentialsProvider
The code in this chapter is available on github (branch changepassword).
zod
-
Type-Safe Env Vars in Remix - A modern approach with ArkType
Aside from updating Remix (from 1.7 to 2.9) and switching from Zod to ArkType, I’ve introduced a makeTypedEnvironment helper to streamline handling environment variables in both server and client environments. Additionally, I’ve optimized the codebase by removing the typedPick method and refining imports to ensure server code doesn’t leak into the client bundle.
-
NEXT JS STARTER PACK
React hook form Zod @hookform/resolvers
-
Simple AI Smart Home Manager
For the language models, Genkit provides the concept of Flows. A flow basically combines a prompt with a set of "tools" or actions that the llm can take. Like other frameworks in this space ZOD is used to provide schema information for both the input and output of flows and actions.
-
Using Arktype in Place of Zod - How to Adapt Parsers
Ever since I started using Zod, a TypeScript-first schema declaration and validation library, I've been a big fan and started using it in all my projects. Zod allows you to ensure the safety of your data at runtime, extending TypeScript’s type-checking capabilities beyond compile-time. Whenever I need to validate data from an outside source, such as an API, FormData, or URL, Zod has been my go-to tool.
-
10 must known JS/TS open-source packages
Zod TypeScript-first schema validation with static type inference
-
This week trending news in tech
Zod
-
Creating GPT Actions with ValTown
To define the action's inputs and outputs we will need the zod library. Zod is an npm package and ValTown lets us import it directly into our Vals:
-
TypeScript, Understanding the code you write
There's libraries can do runtime checks for javascript, one of the most popular libraries do this is zod you can give it a try.
-
Making Eleventy Data Traceable with TSX and Zod
Zod is a validation library which will easily produce TypeScript typings for defined schemas.
-
Using Valibot for Recursive Schema Validation
What if you use a schema library, like Zod or Valibot? The schema has been built on value-level, and you cannot assign the variant to its property inside the declaration.
What are some alternatives?
class-validator - Decorator-based property validation for classes.
joi - The most powerful data validation library for JS [Moved to: https://github.com/sideway/joi]
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
Yup - Dead simple Object schema validation
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
io-ts - Runtime type system for IO decoding/encoding
Superstruct - A simple and composable way to validate data in JavaScript (and TypeScript).
class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.
runtypes - Runtime validation for static types
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
zod-to-json-schema - Converts Zod schemas to Json schemas