{"slug":"getting-started/QUICKSTART_PREVIEW_AND_TESTS","title":"IntegrateWise: Quick Start - Preview & E2E Tests","section":"getting-started","sectionLabel":"Getting Started","status":"unclassified","type":"document","path":"getting-started/QUICKSTART_PREVIEW_AND_TESTS.mdx","bytes":7798,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n> **Tier C — Historical.** This document is a point-in-time snapshot preserved for reference. For current architecture, see [CANONICAL_PLATFORM_ARCHITECTURE.md](../architecture/CANONICAL_PLATFORM_ARCHITECTURE.md).\n\n## Goal: Working Proof Surface\n\nThis guide gets the platform preview running and verifies all 12 framework pins are operational.\n\n**No ecosystem apps needed yet** - just proof that the core platform works.\n\n---\n\n## Prerequisites\n\n```bash\n# Node.js 18+ and pnpm\nnode --version  # Should be 18.x or higher\npnpm --version  # Should be 9.x or higher\n\n# If not installed:\nnpm install -g pnpm\n```\n\n---\n\n## Step 1: Start the Dev Environment\n\n```bash\ncd /vercel/share/v0-project\n\n# Install dependencies (one time only)\npnpm install\n\n# Start the dev server (runs Next.js + all services)\npnpm dev\n```\n\n**What this does:**\n\n- Starts Next.js web app on `http://localhost:3000`\n- Auto-starts supporting services (gateway, intelligence, knowledge, etc.)\n- Watches for file changes (hot reload)\n\n**Expected output:**\n\n```\n> next dev\n- ready started server on 0.0.0.0:3000, url: http://localhost:3000\n✓ Compiled successfully\n```\n\n**Verify it's working:**\nOpen browser: http://localhost:3000\n\nYou should see the web app with:\n\n- Top navigation bar\n- Sidebar with menu\n- Main content area\n- Command palette (Cmd+K or Ctrl+K)\n\n---\n\n## Step 2: Run the Playwright Tests\n\n**In a separate terminal:**\n\n```bash\ncd /vercel/share/v0-project\n\n# Run all tests (headless mode)\npnpm test:e2e\n\n# Or run with visible browser\npnpm test:e2e:headed\n\n# Or run in interactive UI mode\npnpm test:e2e:ui\n\n# Or run with step debugger\npnpm test:e2e:debug\n```\n\n**What this tests:**\n\nThe test suite verifies all 12 framework pins are working:\n\n```\nPin #1:  Identity         → ✓ Can authenticate\nPin #2:  Ingress          → ✓ Requests route correctly\nPin #3:  Continuity       → ✓ Events are recorded\nPin #4:  Memory           → ✓ Context is retrieved\nPin #5:  Capability       → ✓ ADK registry works\nPin #6:  Governance       → ✓ Policies are enforced\nPin #7:  Intelligence     → ✓ Agent reasoning works\nPin #8:  Knowledge        → ✓ Search and docs work\nPin #9:  Networking       → ✓ Events are published\nPin #10: Twin            → ✓ User twins sync\nPin #11: Connector       → ✓ Integrations work\nPin #12: Pipeline        → ✓ Workflows execute\n```\n\nPlus UI component tests:\n\n- Sidebar navigation\n- Top bar and user menu\n- Command palette search\n- Theme switching\n- Multi-tenant isolation\n\n**Expected output:**\n\n```\nRunning 12 tests using 1 worker\n\nPin Test 1 - Identity Framework          ✓\nPin Test 2 - Ingress Framework           ✓\nPin Test 3 - Continuity Framework        ✓\n...\nPin Test 12 - Pipeline Framework         ✓\n\nUI Component Tests                        ✓\nMulti-tenant Isolation                    ✓\nPerformance Tests (< 5s load)             ✓\nError Handling                            ✓\n\n12 passed (45.3s)\n\nView full report: npx playwright show-report\n```\n\n---\n\n## Step 3: View the Test Report\n\nAfter tests complete, view the HTML report:\n\n```bash\npnpm test:e2e:report\n```\n\nThis opens an interactive report showing:\n\n- ✓ Passed tests (green)\n- ✗ Failed tests (red)\n- Screenshots at each step\n- Video recordings (if enabled)\n- Performance metrics\n- Error details\n\n---\n\n## Manual Testing (Proof Surface)\n\nWhile the preview is running, manually test key flows:\n\n### Test Identity (Pin #1)\n\n1. Go to http://localhost:3000\n2. Look for login/auth section\n3. Try authenticating as \"customer-zero@example.com\"\n4. **Proof**: JWT token is issued, user context is resolved\n\n### Test Continuity (Pin #3)\n\n1. After authenticating, open browser DevTools (F12)\n2. Go to Console tab\n3. Look for events being logged as you interact with the app\n4. **Proof**: Events are being recorded to continuity layer\n\n### Test Memory (Pin #4)\n\n1. Navigate to different pages\n2. Open the command palette (Cmd+K / Ctrl+K)\n3. Search for \"context\" or previous actions\n4. **Proof**: System remembers your previous interactions\n\n### Test Intelligence (Pin #7)\n\n1. Look for AI-powered suggestions or recommendations\n2. The system should suggest next actions based on history\n3. **Proof**: Intelligence agent is reasoning about your context\n\n### Test Multi-Tenant Isolation (Security)\n\n1. Open DevTools → Application → Cookies\n2. Look for `x-tenant-id` in headers or localStorage\n3. Each user only sees data for their tenant\n4. **Proof**: No data leaks between tenants\n\n---\n\n## Debugging & Troubleshooting\n\n### Preview won't start\n\n```bash\n# Check if port 3000 is already in use\nlsof -i :3000\n\n# Kill the process if needed\nkill -9 <PID>\n\n# Try starting again\npnpm dev\n```\n\n### Tests won't run\n\n```bash\n# Ensure Playwright is installed\npnpm exec playwright install\n\n# Run with verbose output\npnpm test:e2e --verbose\n\n# Check Playwright version\npnpm exec playwright --version\n```\n\n### Tests timing out\n\n```bash\n# Increase timeout in playwright.config.ts\ntimeout: 60000  // 60 seconds instead of default 30\n\n# Then run tests again\npnpm test:e2e\n```\n\n### Service errors in preview\n\n1. Check terminal output for error messages\n2. Look in browser console (F12) for API errors\n3. Check if gateway service is running\n4. Restart dev server: `pnpm dev`\n\n---\n\n## Key Files & What They Do\n\n### Web App (The Proof Surface)\n\n- `apps/web/src/main.tsx` - Entry point\n- `apps/web/src/routes/` - All pages\n- `apps/web/src/components/` - UI components\n- `apps/web/e2e/` - End-to-end tests\n\n### Gateway (The Router)\n\n- `services/gateway/src/index.ts` - HTTP routing\n- `services/gateway/src/customer-zero.ts` - Customer Zero provisioning\n- `services/gateway/src/auth.ts` - Authentication\n\n### SDK (The API)\n\n- `packages/sdk/src/index.ts` - All exported methods\n- Apps call SDK → SDK calls Gateway → Gateway routes to services\n\n### Tests (The Proof)\n\n- `apps/web/e2e/customer-zero.spec.ts` - Pin verification tests\n- `apps/web/e2e/README.md` - Test documentation\n\n---\n\n## The Proof Chain\n\n```\nUser Opens http://localhost:3000\n    ↓\nWeb App loads (apps/web)\n    ↓\nWeb App calls SDK (packages/sdk)\n    ↓\nSDK calls Gateway (services/gateway)\n    ↓\nGateway routes to services:\n    ├─ Identity service (auth)\n    ├─ Continuity service (events)\n    ├─ Memory service (context)\n    ├─ Intelligence service (reasoning)\n    └─ ... (all 12 frameworks)\n    ↓\nServices respond with results\n    ↓\nSDK formats response\n    ↓\nWeb App displays result\n    ↓\nE2E Tests verify entire flow worked ✓\n```\n\nWhen all tests pass → **Working proof surface** is confirmed.\n\n---\n\n## Success Criteria\n\nYou've got a working proof surface when:\n\n✓ `pnpm dev` starts without errors\n✓ http://localhost:3000 loads in browser\n✓ Can authenticate as customer-zero\n✓ Events appear in console logs\n✓ `pnpm test:e2e` passes all 12 pin tests\n✓ UI components render and interact correctly\n✓ Multi-tenant isolation is enforced\n\nWhen all above are true:\n**Platform is operational and provably working.**\n\n---\n\n## What's NOT Included (Yet)\n\nThese come later, after proof surface is confirmed:\n\n- Ecosystem apps (iw-chat, iw-docs, iw-blog, etc.)\n- Advanced features (approval chains, workflows, etc.)\n- Configuration-driven routing (routing.yaml, policy.yaml)\n- Partner ecosystem template\n\nRight now: Just the **working proof** that all pins are wired.\n\n---\n\n## Next Steps\n\n1. Run `pnpm dev` in one terminal\n2. Open http://localhost:3000 in browser\n3. In another terminal, run `pnpm test:e2e`\n4. When all tests pass → Proof surface is working ✓\n5. Take screenshot of test report as proof\n6. Share test results to confirm platform is operational\n\nThen: Move to ecosystem apps (separate repos) that consume this proved platform.\n"}