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>
This commit is contained in:
Paul Bakaus
2025-12-16 14:21:43 -08:00
co-authored by Claude Opus 4.5
parent 43dd5ad40b
commit 7aefe19b2a
11 changed files with 216 additions and 41 deletions
+4 -6
View File
@@ -1,9 +1,7 @@
import { getCommands } from "../server/lib/api-handlers.js";
export default {
async fetch(request) {
const commands = await getCommands();
return Response.json(commands);
},
};
export default async function handler(request) {
const commands = await getCommands();
return Response.json(commands);
}
+11 -13
View File
@@ -1,16 +1,14 @@
import { handleFileDownload } from "../../../server/lib/api-handlers.js";
export default {
async fetch(request) {
const url = new URL(request.url);
const pathParts = url.pathname.split('/').filter(Boolean);
// Extract params from path: /api/download/[type]/[provider]/[id]
const type = pathParts[2]; // after 'api', 'download'
const provider = pathParts[3];
const id = pathParts[4];
return handleFileDownload(type, provider, id);
},
};
export default async function handler(request) {
const url = new URL(request.url);
const pathParts = url.pathname.split('/').filter(Boolean);
// Extract params from path: /api/download/[type]/[provider]/[id]
const type = pathParts[2]; // after 'api', 'download'
const provider = pathParts[3];
const id = pathParts[4];
return handleFileDownload(type, provider, id);
}
+9 -11
View File
@@ -1,14 +1,12 @@
import { handleBundleDownload } from "../../../server/lib/api-handlers.js";
export default {
async fetch(request) {
const url = new URL(request.url);
const pathParts = url.pathname.split('/').filter(Boolean);
// Extract provider from path: /api/download/bundle/[provider]
const provider = pathParts[3]; // after 'api', 'download', 'bundle'
return handleBundleDownload(provider);
},
};
export default async function handler(request) {
const url = new URL(request.url);
const pathParts = url.pathname.split('/').filter(Boolean);
// Extract provider from path: /api/download/bundle/[provider]
const provider = pathParts[3]; // after 'api', 'download', 'bundle'
return handleBundleDownload(provider);
}
+6
View File
@@ -0,0 +1,6 @@
import { getPatterns } from "../server/lib/api-handlers.js";
export default async function handler(request) {
const patterns = await getPatterns();
return Response.json(patterns);
}
+4 -6
View File
@@ -1,9 +1,7 @@
import { getSkills } from "../server/lib/api-handlers.js";
export default {
async fetch(request) {
const skills = await getSkills();
return Response.json(skills);
},
};
export default async function handler(request) {
const skills = await getSkills();
return Response.json(skills);
}