11 Commits

Author SHA1 Message Date
Mert Koseoglu 1dbdb88717 perf: reduce Vercel costs — 12 optimizations across MCP endpoint, prompts.json, and infra
Addresses $6,478/month Vercel bill with 12 targeted fixes based on forensic
bill analysis and 7-expert review. See #1085 for full analysis.

MCP endpoint (src/pages/api/mcp.ts):
- Fix GetPromptRequestSchema P0 full table scan (findMany→findFirst)
- Remove all JSON pretty-printing (13 occurrences, ~30% payload reduction)
- Add Cache-Control headers to GET discovery endpoint
- Set tools.listChanged=false to prevent client polling
- Add 1MB body size limit to parseBody (DoS protection)
- Make elicitation opt-in via fill_variables param (saves 10s CPU/request)
- Fix timer leak in elicitation setTimeout
- Cap search content at 1,000 chars (contentPreview)
- Remove structuredFormat from search results
- Dynamic import for improve_prompt (reduces cold start)
- Optimize search_skills to return fileNames only

prompts.json:
- Add pagination (?page=&limit=) with backward compatibility
- Add ETag support for 304 Not-Modified responses
- Truncate content to 500-char preview by default

Infrastructure:
- Remove Sentry tunnelRoute (was proxying all browser events through edge)
- Add slug + composite database indexes for MCP query patterns

Closes #1085

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:04:34 +03:00
Fatih Kadir Akın 5f493e3abf chore(next.config.ts): add redirection for book PDF downloads to GitHub raw 2026-02-11 02:11:01 +03:00
Fatih Kadir Akın 412f167f1c chore(components): update MDX components and next config settings 2026-01-11 00:20:41 +03:00
Fatih Kadir Akın ac79abd3a1 feat(src): Add initial content for "The Art of ChatGPT Prompting" book 2026-01-10 04:06:54 +03:00
Fatih Kadir Akın 72c007d8ee chore(sentry): Add Sentry configuration to Next.js project 2026-01-08 11:41:39 +03:00
Fatih Kadir Akın b8d4854c46 feat(docker): Add Docker deployment guide and configuration instructions 2026-01-05 22:57:13 +03:00
Fatih Kadir Akın f3b1a63bed chore(next.config): add redirect for /embed-preview to /embed 2026-01-04 02:09:11 +03:00
Fatih Kadir Akın e371c07ec5 chore(messages): update IDE labels to "Prompt Builder" across multiple languages 2025-12-26 23:15:13 +03:00
Fatih Kadir Akın 0e3d99083e chore(next.config): update output configuration in next.config file 2025-12-20 17:54:58 +03:00
Fatih Kadir Akın 601690491d feat(messages): update homepage hero content and features across multiple languages 2025-12-11 17:02:46 +03:00
Fatih Kadir Akın 85a5f3bed7 Initialize v2 work 2025-12-10 15:41:23 +03:00