skills/tb-05-connecting-apis/SKILL.md
Wire up frontend and backend — assign ports via .env, configure CORS, set up concurrent dev startup script, and verify end-to-end API connectivity.
npx skillsauth add TravisBumgarner/claude-brain tb-05-connecting-apisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
.env
3000–3999, backend 4000–4999)config.ts includes API_URL pointing to backendCORS_ORIGIN env var (e.g., http://localhost:5173)scripts/wait-for-db.mjs — polls Postgres with pg_isready via Docker until the database accepts connections (retries with 1s delay, exits 1 after timeout)package.json script using concurrently or similar"dev": "node scripts/wait-for-db.mjs && concurrently ..."packages/sharedTemporary auth so routes can be tested end-to-end before Supabase is set up. No passwords, no tokens, no JWTs — purely for development.
POST /api/auth/login — accepts { name: string } (case-sensitive), hashes the name (e.g., SHA-256) to produce a deterministic appUserId. Finds or creates a user row in the DB with that ID. Returns { userId, displayName, userLevel }.x-user-id header from request, looks up user in DB, attaches to req.user. Sends 401 if missing or not found.requireAuth will go later)src/sharedComponents/LoginPrompt_DEVELOPER_ONLY.tsx — a small popup/dialog (not a page) that shows on every app load when the user is not logged in
localStorage so it's auto-filled next timeuserId and pass it as x-user-id header on all subsequent API requests (via the authenticatedFetch wrapper or a global header)x-user-id header (popup reappears)AppContent in App.tsx — show popup when no user in store, show normal app when logged indevelopment
Use this agent when designing visual interfaces, creating design systems, building component libraries, or refining user-facing aesthetics requiring expert visual design, interaction patterns, and accessibility considerations. Specifically: <example> Context: Product team needs a complete design system for a new fintech application with dark mode, multiple device sizes, and strict accessibility requirements. user: "We need to create a comprehensive design system for our fintech app. Include component library, design tokens, typography scale, color palette, interactive patterns, and dark mode support. Must meet WCAG 2.1 AA." assistant: "I'll create a complete design system starting with understanding your brand guidelines and user base through the context-manager. I'll build a modular component library with documented specs, design tokens in multiple formats (CSS, JSON, Figma), responsive patterns across web and mobile, dark mode variants, and comprehensive accessibility annotations. I'll deliver Figma files, design documentation, and developer handoff specifications." <commentary> Use ui-designer when you need to establish or refine a complete design system, including component libraries, design tokens, and comprehensive visual standards. This agent excels at creating reusable design assets and documentation that scale across teams and platforms. </commentary> </example> <example> Context: A frontend team is building a new feature but needs UI design and interaction patterns before development. user: "Design the booking flow for our travel app. Need 3 screen variations, empty/loading/error states, mobile and desktop layouts, and clear interaction patterns for each step." assistant: "I'll design a complete booking flow with wireframes, visual mockups, and interaction specifications. First, let me check the context-manager for your existing design system and style guide. Then I'll create all screen states, document interaction patterns, provide motion design specifications, and ensure alignment with your design language and accessibility standards." <commentary> Invoke ui-designer when your frontend developers need detailed visual designs, interaction specifications, and asset files before implementation. The agent provides a clear handoff package that developers can build from. </commentary> </example> <example> Context: A redesign initiative is underway and you need UI improvements to an existing product. user: "Our dashboard needs a visual refresh. The functionality is fine but the UX feels dated. Improve the visual hierarchy, modernize colors and typography, add micro-interactions, and ensure it works on mobile." assistant: "I'll analyze your current dashboard using the context-manager, identify visual improvement opportunities, redesign layouts for better hierarchy and scannability, update colors and typography to modern standards, add meaningful micro-interactions, and ensure responsive design. I'll provide before/after comparisons, design rationale, and implementation specifications for your developers." <commentary> Use ui-designer for visual refinements, redesigns, and aesthetic improvements to existing interfaces. This agent modernizes dated UIs while respecting existing functionality and providing clear upgrade paths. </commentary> </example>
development
Expert TypeScript developer specializing in advanced type system usage, full-stack development, and build optimization. Masters type-safe patterns for both frontend and backend with emphasis on developer experience and runtime safety.
development
Scaffold a full CRUD route — prompts for resource name, HTTP methods, and access level, then generates backend routes, shared schemas, frontend API functions, react-query hooks, and query keys.
development
Audit the codebase against all setup skills (00-09). Reports what is done, partial, not started, or N/A for every checklist item with a summary table.