Commit Graph
7 Commits
Author SHA1 Message Date
Paul BakausandClaude Opus 4.6 98d16686dc Add edge cache headers to all API routes to reduce Vercel function invocations
All API routes serve static content that only changes at deploy time, but had
0% cache hit rate. Adding s-maxage=86400 lets Vercel's CDN cache responses at
the edge, which should take the ~28K daily API requests from 0% to ~99% cache.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:10:04 -07:00
Paul BakausandClaude Opus 4.6 b628e208e3 Harden API endpoints: input validation, error sanitization, security headers
- Add shared validation helper (server/lib/validation.js) with ID regex, provider/type allowlists
- Validate all route params against allowlists before filesystem operations to prevent path traversal
- Strip stack traces and error.message from production error responses (generic "Internal server error")
- Sanitize filenames in Content-Disposition headers
- Add X-Content-Type-Options: nosniff and X-Frame-Options: DENY to dev server static responses
- Add path traversal (.. ) checks to all static file handlers and catch-all fetch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:58:05 -08:00
Paul BakausandClaude Opus 4.5 0b9c1846a6 Add teach-impeccable and review commands, dynamic placeholders
New commands:
- /teach-impeccable: One-time setup that gathers UX-focused design
  context (explores codebase first, then asks targeted questions)
- /review: UX design review evaluating hierarchy, clarity, emotional
  resonance (complements technical /audit)

Build system improvements:
- Dynamic {{model}}, {{ask_instruction}}, {{config_file}} placeholders
  per provider (Claude/Gemini/GPT/the model)
- context: fork support for Claude Code sub-agents (audit, extract)
- Skill reference auto-added to design commands

Skill refinements:
- Merged Design Thinking and Context Awareness sections
- Removed redundant patterns and technical questions
- More direct feedback guidance (radical candor)

Website updates:
- 17 commands (was 16)
- Review demo showing UX issues (HIERARCHY, NO PRIMARY, DEAD END)
- teach-impeccable in System group of periodic table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 16:56:08 -08:00
Paul BakausandClaude Opus 4.5 73a3367e0a Fix: Use standard Vercel serverless function format (req, res)
Response.json() is for Edge Functions, not Node.js serverless functions.
Switched all API handlers to use res.status().json() format which is
the standard for Vercel Node.js functions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 15:00:08 -08:00
Paul BakausandClaude Opus 4.5 13f4714b5d Fix: Use sync fs operations instead of fs/promises
fs/promises appears to hang on Vercel serverless functions.
Switched to readdirSync/readFileSync which should work reliably.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 14:56:38 -08:00
Paul BakausandClaude Opus 4.5 f7b42be23b Debug: Inline API logic with error handling and logging
Inlined the file reading logic directly in API handlers to eliminate
import issues. Added try/catch with JSON error responses to diagnose
the timeout issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 14:54:13 -08:00
Paul BakausandClaude Opus 4.5 7aefe19b2a Fix Vercel deployment: Tailwind CSS, API endpoints, and Bun runtime
- Add missing /api/patterns.js endpoint (was causing 404)
- Fix Tailwind CSS: compile with @tailwindcss/cli instead of Bun virtual module
- Update API handlers to use standard Vercel function export format
- Configure vercel.json with proper Bun runtime (runtime: "bun@1")
- Add @tailwindcss/cli to devDependencies
- Add generated styles.css to .gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 14:21:43 -08:00