Environment:
- No
.env.localfile (or empty file) - Defaults:
AUTH_PROVIDER=none,STORAGE_PROVIDER=memory
Test Steps:
# Make sure no .env.local exists
rm .env.local 2>/dev/null || true
# Start dev server
npm run devExpected Behavior:
- App starts without errors
- No login required - you're automatically "signed in" as anonymous
- "Start building" button works immediately (no auth modal)
- Can create workflows in the workflow builder
- Workflows are stored in browser memory
- Refreshing the page will lose all workflows (in-memory storage)
- No UserButton in header (anonymous mode)
Verification Checklist:
- App loads at http://localhost:3000
- No authentication required
- Can access workflow builder
- Can create/edit workflows
- Workflows disappear on page refresh
Environment:
Create .env.local with:
NEXT_PUBLIC_AUTH_PROVIDER=firebase
NEXT_PUBLIC_STORAGE_PROVIDER=firebase
# Get these from Firebase Console (https://console.firebase.google.com/)
NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id
# Optional: For agent functionality
ANTHROPIC_API_KEY=sk-ant-xxxFirebase Setup Required:
- Create Firebase project at https://console.firebase.google.com/
- Enable Google Authentication: Authentication → Sign-in method → Google → Enable
- Create Firestore database: Firestore Database → Create database → Start in test mode
- Copy config values from Project Settings → General → Your apps → Web app config
Test Steps:
# Create .env.local with Firebase config
# Restart dev server
npm run devExpected Behavior:
- App starts without errors
- "Sign In" button appears in header
- Clicking "Sign In" opens Google Sign-In popup
- After signing in, Google avatar appears in header
- Workflows are saved to Firestore
- Workflows persist after page refresh
- Signing out and back in shows same workflows
Verification Checklist:
- App loads at http://localhost:3000
- Sign In button visible when not authenticated
- Google Sign-In popup works
- User avatar appears after sign in
- Can create/edit workflows
- Workflows persist after page refresh
- Can sign out via avatar button
- Workflows are in Firestore (check Firebase Console)
Environment:
Create .env.local with:
NEXT_PUBLIC_AUTH_PROVIDER=clerk
NEXT_PUBLIC_STORAGE_PROVIDER=convex
# Clerk credentials
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxx
CLERK_SECRET_KEY=sk_test_xxx
# Convex deployment URL
NEXT_PUBLIC_CONVEX_URL=https://xxx.convex.cloud
# Optional: For agent functionality
ANTHROPIC_API_KEY=sk-ant-xxxSetup Required:
- Clerk account at https://clerk.com/
- Convex deployment at https://www.convex.dev/
- Configure Clerk with Convex: https://docs.convex.dev/auth/clerk
Test Steps:
# Create .env.local with Clerk + Convex config
# Start both Convex and Next.js
npm run dev:allExpected Behavior:
- Both Convex and Next.js start without errors
- Clerk sign-in modal appears when clicking "Sign In"
- After signing in, Clerk UserButton appears in header
- Workflows are saved to Convex
- Workflows persist after page refresh
- Real-time sync works (open in two tabs, changes sync)
Verification Checklist:
- Both servers start successfully
- Clerk sign-in modal works
- Clerk UserButton appears after sign in
- Can create/edit workflows
- Workflows persist after page refresh
- Workflows are in Convex (check dashboard)
- Real-time sync works across tabs
If you don't have Firebase or Clerk set up yet, you can still verify the implementation works:
# Test 1: Zero config (default)
rm .env.local 2>/dev/null || true
npm run dev
# Visit http://localhost:3000 - should work immediately
# Test 2: Verify auth context is working
# Open browser console, should see no errors
# Should see workflow builder without loginConsole Checks:
- No errors about missing auth provider
- No errors about missing storage provider
- App renders successfully
- Can navigate to workflow builder
Solution: Check that app/layout.tsx properly wraps with <AuthProvider>
Solution:
- Verify all
NEXT_PUBLIC_FIREBASE_*vars are set in.env.local - Check Firebase project has Auth and Firestore enabled
- Verify API key is correct
Solution:
- Verify
NEXT_PUBLIC_AUTH_PROVIDER=clerkis set - Check Clerk keys are correct
- Ensure Convex URL is set (required for Clerk mode)
Solution:
- Zero config mode uses memory storage (intentional - data is ephemeral)
- For persistence, use Firebase or Convex mode
All files created/modified:
- ✅
lib/auth/- Auth abstraction (5 files) - ✅
lib/storage/- Storage abstraction (5 files) - ✅
lib/firebase/config.ts- Firebase initialization - ✅
components/providers/AuthProvider.tsx- React Context provider - ✅
app/layout.tsx- Conditional provider wrapping - ✅
app/page.tsx- Uses auth context - ✅
hooks/useWorkflow.ts- Uses storage abstraction - ✅
app/api/workflows/route.ts- Graceful degradation - ✅
.env.example- Complete documentation - ✅
README.md- Configuration guide
Zero TypeScript errors in new code ✅