Utility functions are commonly used, reusable pieces of code that save hours of development time and reduce duplication across a project. Shaddy’s utilities are purpose-built for React and Next.js workflows — they cover areas that general-purpose libraries like Lodash don’t address, such as React context composition and runtime environment variable validation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rijvi-mahmud/shaddy/llms.txt
Use this file to discover all available pages before exploring further.
What’s Included
Each utility is available as a single TypeScript file you can add directly to your project via the Shadcn CLI. No extra runtime dependencies are required beyond what each utility explicitly uses.| Utility | Description |
|---|---|
composeProviders | Combine multiple React context providers into one component, eliminating deeply nested JSX trees. |
createEnv | Validate and type-check environment variables at startup using a Zod schema, with client/server separation. |
Installation Pattern
Every utility follows the same Shadcn-compatible install flow:utils/. You own the code — update or extend it however you like.
Each utility page includes both a CLI install command and a manual copy-paste option if you prefer to inspect the code before adding it.
Utilities
composeProviders
Compose multiple React context providers into a single wrapper component and eliminate provider nesting from your app root.
createEnv
Validate environment variables against a Zod schema at startup, with clear errors for missing or invalid values and automatic client-prefix filtering.