Skip to content

Conversation

andrii-bodnar
Copy link

Hello, and thank you for the great SDK!

I experimented with each example and noticed some inconsistencies with environment variables. So I am submitting this PR to standardize the setup of environment variables across all example projects to improve the developer experience.

Changes

  • Added missing .env.example files to ai-tools-example, classic-v0, and v0-clone
  • Updated .gitignore files to properly exclude env files while preserving examples
  • Standardized README setup instructions to use cp .env.example .env.local
  • Unified API key format and added helpful comments with setup links

Benefits

  • Consistent Setup: all examples now follow the same pattern
  • Better DX: new developers can quickly configure any example

Copy link
Contributor

vercel bot commented Sep 18, 2025

@andrii-bodnar is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@andrii-bodnar andrii-bodnar force-pushed the chore/consistent-env-management branch from b6798a7 to 171b1f3 Compare September 18, 2025 11:19
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments:

examples/v0-clone/components/env-setup.tsx (line 46):

The env-setup component still references .env file but the project now uses .env.local for environment variables, creating inconsistent user instructions.

View Details
📝 Patch Details
diff --git a/examples/v0-clone/components/env-setup.tsx b/examples/v0-clone/components/env-setup.tsx
index 4bfc93e..4ef9810 100644
--- a/examples/v0-clone/components/env-setup.tsx
+++ b/examples/v0-clone/components/env-setup.tsx
@@ -43,7 +43,7 @@ export function EnvSetup({ missingVars }: EnvSetupProps) {
             <p className="text-gray-600 dark:text-gray-400">
               Add these environment variables to your{' '}
               <code className="bg-gray-200 dark:bg-gray-800 px-1 rounded">
-                .env
+                .env.local
               </code>{' '}
               file:
             </p>

Analysis

Inconsistent environment file reference in env-setup component

What fails: The EnvSetup component in examples/v0-clone/components/env-setup.tsx displays instructions to add variables to .env file, but project documentation and configuration use .env.local

How to reproduce:

  1. Follow README instructions: cp .env.example .env.local
  2. Navigate to app requiring environment variables
  3. See UI message: "Add these environment variables to your .env file:"

Result: User confusion - README says .env.local, UI says .env, drizzle.config.ts loads from .env.local

Expected: All user-facing instructions should consistently reference .env.local as specified in README and drizzle configuration

Evidence:

  • README.md line 45: "Create a .env.local file in the root directory"
  • drizzle.config.ts line 5: config({ path: '.env.local' })
  • Component line 46: References .env instead of .env.local

@andrii-bodnar andrii-bodnar force-pushed the chore/consistent-env-management branch from 171b1f3 to 31b1f14 Compare September 18, 2025 11:32
@andrii-bodnar andrii-bodnar force-pushed the chore/consistent-env-management branch from 31b1f14 to cfa9e4c Compare September 18, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant