Adpharm Shad

Quick Start: RR7 Stack

1. Setup Devcontainer

Copy .devcontainer folder from github.com/theadpharm/[recent-project]

2. Create React Router App

bunx create-react-router@latest my-app

3. Move Files to Root

mv my-app/* . && mv my-app/.* . 2>/dev/null; rmdir my-app

⚠️ You should install deps at this point, otherwise shadcn will hang on "Installing dependencies"

4. Init Shadcn/UI

bunx --bun shadcn@latest init

5. Install RR7 Stack

⚠️ New project only: Add -o to overwrite React Router defaults
Never use -o on existing projects - it will overwrite your files!

# Core (base features: routing, actions, env management)
bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-core.json

# Full (core + auth + db + forms + i18n + analytics + signals)
bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-full.json

# AWS (full + S3 + EventBridge)
bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-aws.json

6. Customize Theme (Optional)

• Visit tweakcn.com to customize your shadcn theme
• Copy the generated CSS variables to your app.css

7. Post-Install

• Replace app name in root.tsx
• Update environment variables
• Run task dev to start
• Reference CLAUDE-rr7-stack.md for architecture docs

Individual Components

[block]

RR7 Stack

RR7 Stack - AWS

bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-aws.json

Full stack with AWS integrations (S3, EventBridge) for platform and enterprise applications

Registry Dependencies:

https://ui.adpharm.digital/r/rr7-stack-full.json

https://ui.adpharm.digital/r/rr7-aws.json

Files:

    [block]

    RR7 Stack

    RR7 Stack - Core

    bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-core.json

    Core React Router v7 stack with Generouted, Actions system, environment management, type-safe routing, and Claude AI guidelines

    Dependencies:

    react-router

    @react-router/fs-routes

    ts-pattern

    use-debounce

    zod

    @vercel/react-router

    zx

    drizzle-orm

    drizzle-zod

    sonner

    lucide-react

    Registry Dependencies:

    utils

    https://ui.adpharm.digital/r/logger.json

    https://ui.adpharm.digital/r/readable-error.json

    https://ui.adpharm.digital/r/type-utils.json

    https://ui.adpharm.digital/r/components.json

    https://ui.adpharm.digital/r/search-params-utils.json

    https://ui.adpharm.digital/r/eslint.json

    https://ui.adpharm.digital/r/prettier.json

    https://ui.adpharm.digital/r/rr7-claude.json

    Files:

    • registry/misc/blocks/rr7-stack/Taskfile.yml

    • registry/misc/blocks/rr7-stack/tsconfig.json

    • registry/misc/blocks/rr7-stack/react-router.config.ts

    • registry/misc/blocks/rr7-stack/hooks/use-action.ts

    • registry/misc/blocks/rr7-stack/hooks/use-search-params.ts

    • registry/misc/blocks/rr7-stack/routes.ts

    • registry/misc/blocks/rr7-stack/app.css

    • registry/misc/blocks/rr7-stack/vite.config.ts

    • registry/misc/blocks/rr7-stack/lib/env/env.defaults.client.ts

    • registry/misc/blocks/rr7-stack/lib/env/env.defaults.server.ts

    • registry/misc/blocks/rr7-stack/lib/env/_core/env-map.generate.ts

    • registry/misc/blocks/rr7-stack/lib/env/all-server-env.ts

    • registry/misc/blocks/rr7-stack/lib/env/all-client-env.ts

    • registry/misc/blocks/rr7-stack/lib/env/get-app-url.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-runner.server.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-utils.server.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-utils.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-cache-manager.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-map.ts

    • registry/misc/blocks/rr7-stack/lib/actions/_core/action-map.generate.ts

    • registry/misc/blocks/rr7-stack/lib/actions/example-action/action-definition.ts

    • registry/misc/blocks/rr7-stack/lib/actions/example-action/action-handler.server.ts

    • registry/misc/blocks/rr7-stack/lib/router/generouted-components.tsx

    • registry/misc/blocks/rr7-stack/lib/router/generouted-generate-routes.ts

    • registry/misc/blocks/rr7-stack/lib/router/server-responses.server.ts

    • registry/misc/blocks/rr7-stack/lib/router/router-utils.ts

    • registry/misc/blocks/rr7-stack/lib/router/routes.ts

    • registry/misc/blocks/rr7-stack/lib/preferences/preference-types.ts

    • registry/misc/blocks/rr7-stack/lib/preferences/preference-cookie.server.ts

    • registry/misc/blocks/rr7-stack/lib/theme/theme.server.ts

    • registry/misc/blocks/rr7-stack/root.tsx

    • registry/misc/blocks/rr7-stack/public/apple-touch-icon.png

    • registry/misc/blocks/rr7-stack/public/favicon-96x96.png

    • registry/misc/blocks/rr7-stack/public/favicon.ico

    • registry/misc/blocks/rr7-stack/public/favicon.svg

    • registry/misc/blocks/rr7-stack/public/site.webmanifest

    • registry/misc/blocks/rr7-stack/public/web-app-manifest-192x192.png

    • registry/misc/blocks/rr7-stack/public/web-app-manifest-512x512.png

    • registry/misc/blocks/rr7-stack/CLAUDE-rr7-stack.md

    • registry/misc/blocks/rr7-stack/.claude/commands/form-system-guide.md

    • registry/misc/blocks/rr7-stack/.claude/commands/implement-or-audit-copydeck.md

    • registry/misc/blocks/rr7-stack/.claude/commands/rr7-metadata-gen.md

    • registry/misc/blocks/rr7-stack/.claude/commands/tweakcn-style-translation.md

    • registry/misc/blocks/rr7-stack/.gitignore

    • registry/misc/blocks/rr7-stack/.env.example

    [block]

    RR7 Stack

    RR7 Stack - Full

    bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-stack-full.json

    Complete full-stack application setup with authentication, database, forms, i18n, analytics, and signals (no AWS)

    Registry Dependencies:

    https://ui.adpharm.digital/r/rr7-i18n.json

    https://ui.adpharm.digital/r/rr7-analytics.json

    https://ui.adpharm.digital/r/rr7-forms.json

    https://ui.adpharm.digital/r/rr7-db.json

    https://ui.adpharm.digital/r/rr7-auth.json

    https://ui.adpharm.digital/r/rr7-signals.json

    https://ui.adpharm.digital/r/rr7-stack-core.json

    Files:

      [block]

      Terraform

      bunx --bun shadcn@latest add https://ui.adpharm.digital/r/terraform.json

      A collection of terraform utils

      Dependencies:

      Files:

      • registry/misc/blocks/terraform/terragrunt.hcl

      • registry/misc/blocks/terraform/main.tf

      • registry/misc/blocks/terraform/modules/main/main.tf

      • registry/misc/blocks/terraform/modules/eventbridge/main.tf

      • registry/misc/blocks/terraform/lib/vercel/main.tf

      • registry/misc/blocks/terraform/lib/lambda-function/main.tf

      • registry/misc/blocks/terraform/TF-SETUP-GUIDE.md

      [component]

      Client Only

      bunx --bun shadcn@latest add https://ui.adpharm.digital/r/client-only.json

      Utility component that only renders children on the client-side

      Registry Dependencies:

      Files:

      • registry/misc/components/misc/client-only.tsx

      [component]

      Components

      bunx --bun shadcn@latest add https://ui.adpharm.digital/r/components.json

      All UI components (button, alert, checkbox, command, dialog, input, label, radio-group, select, sheet, switch, textarea) and utility components (client-only, spacer, text)

      Registry Dependencies:

      https://ui.adpharm.digital/r/button.json

      https://ui.adpharm.digital/r/alert.json

      https://ui.adpharm.digital/r/checkbox.json

      https://ui.adpharm.digital/r/command.json

      https://ui.adpharm.digital/r/dialog.json

      https://ui.adpharm.digital/r/input.json

      https://ui.adpharm.digital/r/label.json

      https://ui.adpharm.digital/r/radio-group.json

      https://ui.adpharm.digital/r/select.json

      https://ui.adpharm.digital/r/sheet.json

      https://ui.adpharm.digital/r/switch.json

      https://ui.adpharm.digital/r/textarea.json

      https://ui.adpharm.digital/r/client-only.json

      https://ui.adpharm.digital/r/spacer.json

      https://ui.adpharm.digital/r/text.json

      https://ui.adpharm.digital/r/form.json

      https://ui.adpharm.digital/r/popover.json

      Files:

        [component]

        Ranking Input

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/ranking-input.json

        Drag-and-drop ranking input with mobile button controls, dual-column layout, and i18n support

        Dependencies:

        @dnd-kit/core

        @dnd-kit/sortable

        @dnd-kit/utilities

        lucide-react

        Registry Dependencies:

        https://ui.adpharm.digital/r/rr7-i18n.json

        Files:

        • registry/misc/components/misc/ranking-input.tsx

        [component]

        Spacer

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/spacer.json

        Utility component for creating flexible spacing

        Registry Dependencies:

        Files:

        • registry/misc/components/misc/spacer.tsx

        [component]

        Text

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/text.json

        Utility text component with CVA pattern for typography variants

        Dependencies:

        class-variance-authority

        Registry Dependencies:

        utils

        Files:

        • registry/misc/components/misc/text.tsx

        [lib]

        ESLint

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/eslint.json

        A collection of eslint rules

        Files:

        • registry/misc/.eslintrc.cjs

        [lib]

        Logger

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/logger.json

        A logger that colours the output

        Dependencies:

        chalk

        Files:

        • registry/misc/lib/logger.ts

        [lib]

        Prettier

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/prettier.json

        A collection of prettier rules

        Files:

        • registry/misc/.prettierrc.json

        [lib]

        Readable Error

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/readable-error.json

        A custom error class that can be used to create readable errors so you can return a safe error message to the user.

        Files:

        • registry/misc/lib/readable-error.ts

        [lib]

        RR7 Analytics - Segment Integration

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-analytics.json

        Analytics integration for React Router v7 with Segment Analytics and YouTube tracking

        Dependencies:

        @segment/analytics-next

        @segment/analytics-node

        react-player

        Files:

        • registry/misc/blocks/rr7-stack/lib/analytics/analytics.defaults.client.ts

        • registry/misc/blocks/rr7-stack/lib/analytics/analytics.defaults.server.ts

        • registry/misc/blocks/rr7-stack/lib/analytics/events.defaults.client.ts

        • registry/misc/blocks/rr7-stack/lib/analytics/youtube.client.ts

        • registry/misc/blocks/rr7-stack/.claude/commands/analytics-tracking-silo-guy.md

        [lib]

        RR7 Authentication - Session-based Auth

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-auth.json

        Authentication system with session management, password hashing, and OAuth support

        Dependencies:

        @node-rs/argon2

        @oslojs/crypto

        @oslojs/encoding

        Registry Dependencies:

        https://ui.adpharm.digital/r/rr7-db.json

        https://ui.adpharm.digital/r/rr7-forms.json

        https://ui.adpharm.digital/r/user-type.json

        Files:

        • registry/misc/blocks/rr7-stack/lib/env/auth-env.server.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-login-with-form/action-handler.server.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-login-with-form/action-definition.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-register-with-form/action-handler.server.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-register-with-form/action-definition.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-login-with-google/action-handler.server.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-login-with-google/action-definition.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-logout/action-handler.server.ts

        • registry/misc/blocks/rr7-stack/lib/actions/auth-logout/action-definition.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/password.server.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/session.server.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/user.server.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/google-utils.server.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/google-callback-loader.server.ts

        • registry/misc/blocks/rr7-stack/lib/auth-utils/rateLimit.server.ts

        • registry/misc/blocks/rr7-stack/lib/db/schemas/auth-schema.ts

        • registry/misc/blocks/rr7-stack/lib/types/user.ts

        • registry/misc/blocks/rr7-stack/routes/oauth2.google.callback.tsx

        • registry/misc/blocks/rr7-stack/routes/_public.login.tsx

        • registry/misc/blocks/rr7-stack/components/svgs/GoogleSvg.tsx

        [lib]

        RR7 AWS - S3 and EventBridge Integration

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-aws.json

        AWS integrations including S3 storage and EventBridge event processing

        Dependencies:

        @aws-sdk/client-eventbridge

        @aws-sdk/client-s3

        @aws-sdk/credential-providers

        Registry Dependencies:

        https://ui.adpharm.digital/r/rr7-db.json

        https://ui.adpharm.digital/r/rr7-forms.json

        Files:

        • registry/misc/blocks/rr7-stack/lib/env/aws-eventbridge-env.server.ts

        • registry/misc/blocks/rr7-stack/lib/env/aws-s3-env.server.ts

        • registry/misc/blocks/rr7-stack/lib/aws/eventbridge/detail-schemas-utils.ts

        • registry/misc/blocks/rr7-stack/lib/aws/eventbridge/eventbridge-client.server.ts

        • registry/misc/blocks/rr7-stack/lib/aws/s3/s3-client.server.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/_core/eventbridge-job-map.generate.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/_core/eventbridge-job-map.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/_core/eventbridge-job-runner.server.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/_core/eventbridge-job-utils.server.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/_core/eventbridge-job-utils.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/example-job/job-definition.ts

        • registry/misc/blocks/rr7-stack/lib/eventbridge-api-jobs/example-job/job-handler.server.ts

        • registry/misc/blocks/rr7-stack/routes/eventbridge-api.v1.handler.tsx

        • registry/misc/blocks/rr7-stack/lib/db/schemas/eventbridge-schema.ts

        [lib]

        RR7 Claude - AI Assistant Guidelines

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-claude.json

        AI code assistant guidelines and best practices for working with Claude Code

        Files:

        • registry/misc/blocks/rr7-stack/CLAUDE.md

        • registry/misc/blocks/rr7-stack/.claude/commands/add-and-commit.md

        • registry/misc/blocks/rr7-stack/.claude/commands/change-request.md

        • registry/misc/blocks/rr7-stack/.claude/commands/tf-init.md

        • registry/misc/blocks/rr7-stack/.claude/commands/convert-css-to-light-dark.md

        [lib]

        RR7 Database - Drizzle ORM with Neon

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-db.json

        Database layer with Drizzle ORM and Neon serverless PostgreSQL

        Dependencies:

        @neondatabase/serverless

        drizzle-orm

        drizzle-zod

        Files:

        • registry/misc/blocks/rr7-stack/drizzle.config.ts

        • registry/misc/blocks/rr7-stack/lib/env/db-env.server.ts

        • registry/misc/blocks/rr7-stack/lib/db/index.server.ts

        • registry/misc/blocks/rr7-stack/lib/db/schema-utils.ts

        • registry/misc/blocks/rr7-stack/lib/db/schema.ts

        • registry/misc/blocks/rr7-stack/lib/db/schema.generate.ts

        [lib]

        RR7 Forms - Form Generator

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-forms.json

        Dynamic form generation system with React Hook Form integration and validation

        Dependencies:

        react-hook-form

        @hookform/resolvers

        Registry Dependencies:

        https://ui.adpharm.digital/r/ranking-input.json

        Files:

        • registry/misc/blocks/rr7-stack/hooks/use-form-generator.tsx

        • registry/misc/blocks/rr7-stack/lib/form/form-config-to-form-components.tsx

        • registry/misc/blocks/rr7-stack/lib/form/form-config-to-zod-schema.tsx

        • registry/misc/blocks/rr7-stack/lib/form/form-config-types.ts

        • registry/misc/blocks/rr7-stack/lib/form/form-config-utils.ts

        • registry/misc/blocks/rr7-stack/lib/form/form-data-utils.ts

        • registry/misc/blocks/rr7-stack/lib/form/form-data-enums.defaults.ts

        • registry/misc/blocks/rr7-stack/lib/form/form-utils.tsx

        • registry/misc/blocks/rr7-stack/lib/form/configs/example-form-config.ts

        [lib]

        RR7 i18n - Internationalization

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-i18n.json

        Internationalization utilities for React Router v7 with language routing and hooks

        Files:

        • registry/misc/blocks/rr7-stack/hooks/use-i18n.ts

        • registry/misc/blocks/rr7-stack/hooks/use-i18n.test.ts

        • registry/misc/blocks/rr7-stack/lib/i18n/i18n-utils.server.ts

        • registry/misc/blocks/rr7-stack/routes/($lang).tsx

        [lib]

        RR7 Signals - State Management

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/rr7-signals.json

        Global state management using nanostores for React Router v7

        Dependencies:

        nanostores

        @nanostores/react

        Files:

        • registry/misc/blocks/rr7-stack/lib/signals/signals.defaults.ts

        [lib]

        Search Params Utils

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/search-params-utils.json

        A collection of search params utils

        Dependencies:

        zod

        Files:

        • registry/misc/lib/search-params-utils.ts

        • registry/misc/lib/search-params.defaults.ts

        [lib]

        Type Utils

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/type-utils.json

        A collection of type utils

        Dependencies:

        zod

        Files:

        • registry/misc/lib/types/type-utils.ts

        [lib]

        User Type Definition

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/user-type.json

        TypeScript type definition for user objects

        Files:

        • registry/misc/lib/types/user-type.ts

        [ui]

        Alert

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/alert.json

        Alert component with default, destructive, and warning variants

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/alert.tsx

        [ui]

        Button

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/button.json

        Button component with CVA pattern supporting multiple colors (primary, secondary, knockout), styles (filled, outline, link), and sizes

        Dependencies:

        @radix-ui/react-slot

        class-variance-authority

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/button.tsx

        [ui]

        Checkbox

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/checkbox.json

        Checkbox component with size-5 and cursor-pointer styling

        Dependencies:

        @radix-ui/react-checkbox

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/checkbox.tsx

        [ui]

        Command

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/command.json

        Command palette with enhanced CommandDialog wrapper combining Dialog + Command components

        Dependencies:

        cmdk

        Registry Dependencies:

        https://ui.adpharm.digital/r/dialog.json

        Files:

        • registry/misc/components/ui/command.tsx

        [ui]

        Dialog

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/dialog.json

        Dialog component with scrollable content, disableClose, and fullScreen props

        Dependencies:

        @radix-ui/react-dialog

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/dialog.tsx

        [ui]

        Form

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/form.json

        Form component with FormProvider, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField

        Dependencies:

        react-hook-form

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/form.tsx

        [ui]

        Input

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/input.json

        Input component based on latest shadcn implementation

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/input.tsx

        [ui]

        Label

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/label.json

        Label component with leading-normal line height and FormLabel export

        Dependencies:

        @radix-ui/react-label

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/label.tsx

        [ui]

        Popover

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/popover.json

        Popover component with PopoverContent, PopoverTrigger, PopoverAnchor

        Dependencies:

        @radix-ui/react-popover

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/popover.tsx

        [ui]

        Radio Group

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/radio-group.json

        Radio group component with size-5 radio items

        Dependencies:

        @radix-ui/react-radio-group

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/radio-group.tsx

        [ui]

        Select

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/select.json

        Select component based on latest shadcn implementation

        Dependencies:

        @radix-ui/react-select

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/select.tsx

        [ui]

        Sheet

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/sheet.json

        Sheet component with scrollable content, disableClose prop, and larger close icon

        Dependencies:

        @radix-ui/react-dialog

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/sheet.tsx

        [ui]

        Switch

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/switch.json

        Switch component based on latest shadcn implementation

        Dependencies:

        @radix-ui/react-switch

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/switch.tsx

        [ui]

        Textarea

        bunx --bun shadcn@latest add https://ui.adpharm.digital/r/textarea.json

        Textarea component with min-h-24 minimum height

        Registry Dependencies:

        Files:

        • registry/misc/components/ui/textarea.tsx