Here is the complete end-to-end testing flow to verify everything is working perfectly, from dashboard configuration to live SDK evaluation.
- Open your deployed Vercel Frontend URL in your browser.
- Since you have a fresh Neon database, you have two options:
- Sign Up: Click on Sign Up to create a fresh administrator account with your own email and password.
- Default Admin: Or log in using the pre-seeded credentials:
- Email:
admin@example.com - Password:
admin123
- Email:
- Once logged in, you will see the main console dashboard.
Your React app has a built-in playground simulator designed to test rules instantly.
- Click on the Simulator tab in the sidebar navigation.
- Since it's a fresh database, click the "Setup Simulator Demo Flags" button.
- This will create and configure 4 demo feature flags with targeting rules automatically:
show-beta-banner(Targeting rule:plan === premium->true)pricing-discount-tier(Targeting rules:plan === enterprise->vip,country === US->standard)new-checkout-flow(Targeting rule:plan === premium->v2-modern)dark-mode-preview(50% / 50% gradual percentage rollout)
In the Simulator Playground view, you can change your simulated user attributes on the fly and see how rules evaluate instantly:
- Under User Attributes, change the Plan from
freetopremium. - Notice the evaluation log on the right side of the simulator:
show-beta-bannerwill instantly update fromfalsetotrue. - Change Country to
USand watchpricing-discount-tierevaluate tostandard. - Modify the User ID text fields (e.g.
user-1,user-2,user-3) and watchdark-mode-previewtoggle betweentrueandfalsebased on the deterministic MurmurHash rollout calculation.
To verify that outside clients can consume your SDK package, let's create a local script on your computer that pulls configuration from your live Render server.
- Create a new temporary folder on your computer and initialize a project:
mkdir sdk-live-test cd sdk-live-test npm init -y - Install your newly published SDK package:
npm install feature-flag-client-sdk
- Create a test file
test-live.jsand paste the following code:const { FeatureFlagClient } = require('feature-flag-client-sdk'); async function run() { // 1. Paste an SDK Key from the Settings tab in your dashboard const SDK_KEY = 'sdk_dev_default_key_123'; // 2. Point it to your live Render backend const client = new FeatureFlagClient(SDK_KEY, { baseUrl: 'https://feature-flag-system-gszd.onrender.com', enableStream: true, // Connect to live Server-Sent Events (SSE) stream }); console.log('Connecting to Feature Flag Server...'); await client.initialize(); console.log('Connected!'); // 3. Listen to changes in real-time client.onUpdate(() => { console.log('\n[Event Received] Flags updated on dashboard! Re-evaluating...'); evaluateFlags(client); }); evaluateFlags(client); // Keep the process alive to listen for updates console.log('\nListening for changes on the dashboard... (Press Ctrl+C to exit)'); } function evaluateFlags(client) { const premiumUser = { userId: 'user-premium-101', plan: 'premium' }; const freeUser = { userId: 'user-standard-202', plan: 'free' }; const resPremium = client.evaluate('show-beta-banner', premiumUser, false); const resFree = client.evaluate('show-beta-banner', freeUser, false); console.log(`- Alice (Premium Plan): show-beta-banner = ${resPremium.value} (Reason: ${resPremium.reason})`); console.log(`- Bob (Free Plan): show-beta-banner = ${resFree.value} (Reason: ${resFree.reason})`); } run().catch(console.error);
- Run the script:
node test-live.js
- Test Real-Time Streaming: Keep the script running in your terminal. Go to your Vercel Dashboard UI, toggle the
show-beta-bannerflag status or edit its rules, and click Save. - Watch your terminal—it will instantly display the updated values in real time without restarting!