Security & Stability: - Add Next.js 16 proxy.ts for BetterAuth cookie-based auth protection - Add rate limiting for API routes (src/lib/rate-limit.ts) - Add Zod validation for chat API request bodies - Add session auth check to chat and diagnostics endpoints - Add security headers in next.config.ts (CSP, X-Frame-Options, etc.) - Add file upload validation and sanitization in storage.ts Core UX Components: - Add error boundaries (error.tsx, not-found.tsx, chat/error.tsx) - Add loading states (skeleton.tsx, spinner.tsx, loading.tsx files) - Add toast notifications with Sonner - Add form components (input.tsx, textarea.tsx, label.tsx) - Add database indexes for performance (schema.ts) - Enhance chat UX: timestamps, copy-to-clipboard, thinking indicator, error display, localStorage message persistence Polish & Accessibility: - Add Open Graph and Twitter card metadata - Add JSON-LD structured data for SEO - Add sitemap.ts, robots.ts, manifest.ts - Add skip-to-content link and ARIA labels in site-header - Enable profile page quick action buttons with dialogs - Update Next.js 15 references to Next.js 16 Developer Experience: - Add GitHub Actions CI workflow (lint, typecheck, build) - Add Prettier configuration (.prettierrc, .prettierignore) - Add .nvmrc pinning Node 20 - Add ESLint rules: import/order, react-hooks/exhaustive-deps - Add stricter TypeScript settings (exactOptionalPropertyTypes, noImplicitOverride) - Add interactive setup script (scripts/setup.ts) - Add session utility functions (src/lib/session.ts) All changes mirrored to create-agentic-app/template/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
76 lines
1.7 KiB
JavaScript
76 lines
1.7 KiB
JavaScript
import nextConfig from "eslint-config-next/core-web-vitals";
|
|
|
|
const config = [
|
|
{
|
|
ignores: [
|
|
".next/**",
|
|
"node_modules/**",
|
|
".cache/**",
|
|
"dist/**",
|
|
"build/**",
|
|
"create-agentic-app/**",
|
|
"drizzle/**",
|
|
"scripts/**",
|
|
],
|
|
},
|
|
...nextConfig,
|
|
{
|
|
rules: {
|
|
// React rules
|
|
"react/jsx-no-target-blank": "error",
|
|
"react/no-unescaped-entities": "off",
|
|
|
|
// React Hooks rules
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
|
|
// Import rules
|
|
"import/no-anonymous-default-export": "warn",
|
|
"import/order": [
|
|
"warn",
|
|
{
|
|
groups: [
|
|
"builtin",
|
|
"external",
|
|
"internal",
|
|
["parent", "sibling"],
|
|
"index",
|
|
"type",
|
|
],
|
|
pathGroups: [
|
|
{
|
|
pattern: "react",
|
|
group: "builtin",
|
|
position: "before",
|
|
},
|
|
{
|
|
pattern: "next/**",
|
|
group: "builtin",
|
|
position: "before",
|
|
},
|
|
{
|
|
pattern: "@/**",
|
|
group: "internal",
|
|
position: "before",
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ["react", "next"],
|
|
"newlines-between": "never",
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
|
|
// Best practices
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"prefer-const": "error",
|
|
"no-var": "error",
|
|
eqeqeq: ["error", "always", { null: "ignore" }],
|
|
},
|
|
},
|
|
];
|
|
|
|
export default config;
|