* docs: regenerate API documentation from src/app/api (329 routes) The generator only recognised `export async function GET`, so every route exported as a guarded const (`export const GET = withAdmin(...)`) or a destructured re-export was missing: the doc listed 116 endpoints, many of them since renamed or removed, against 329 route files today. Teach it the other two export shapes and the withAuth/withAdmin guards, and regenerate both copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive dated audits, compliance trackers and migration proposals Moves point-in-time records into docs/archive/ (with a README saying they describe the day they were written): the 2026-01 dev-guide compliance plan, codebase audit, DRY/SSOT and Phase 1 fix logs, the 2026-02 overnight cross-project plan, the 2026-07-02 audit report, the 2026-07-06 Shopware migration plan and system migration strategy, and CODE_AUDIT.md. CODE_AUDIT.md was listed in .claude/CLAUDE.md, .gemini/GEMINI.md and docs/README.md as the current list of issues to fix while its own banner called it a historical snapshot; those entries now point at docs/AUDIT_BACKLOG_2026-08.md, the list of findings still open. docs/README also stops linking api/, legacy/ and reference/, which do not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive closed trackers and docs for removed code Into docs/archive/: ARCHITECTURE_DEBT (status CLOSED 2026-06-30), DATABASE_AUDIT (Neon, pre-cutover), UPGRADE_PLAN (2026-06-03 snapshot; Tailwind 4 and React 19 are done), MIGRATION_PLAN_QQQ5 and PROFILES_SSOT_PLAN (both executed: migrations 105 and 121/122), production-ready-checklist (Frauenfeld plan that never shipped), and three docs whose code is gone: PROJECT_PAGES_GUIDE (src/components/projects and the per-project pages, now one [slug] route), RevampCopilot (no src/features/chatbot) and projects/upcycling (the /projects/upcycling pages and businessPlan messages are no longer in the tree). Inbound references follow the move, including three code comments. SHARED_CONTEXT and COMMANDS stop describing the upcycling mini-site as live; COMMANDS drops db:migrate-users, which is not a script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: correct live docs against the tree - BLOG_SYSTEM: rewritten from the code. There is no TinaCMS and no content/submissions; posts merge content/posts/*.md with blog_posts, and submissions are blog_submissions rows reviewed by staff. - installation guide: rewritten. There is no cms-api, no docker-compose.dev.yml and no default admin password; setup is services:up, db:migrate, setup-admins, dev. - RELIABILITY: migration 005b (not 005), no ENABLE_CMS gate, prod facts. - RESPONSIVE_DESIGN_SYSTEM: ResponsiveSection/Hero/Heading were removed; document Section, PageHero and Heading instead. - DEAD_CODE: the /api/repairers and /api/it-hilfe/helpers proxies and the routes.helpers alias are deleted, not 410; fix a stale line range. - DEV_GUIDE, AGENTS, claude/cursor/gemini guides, .cursorrules: DEVELOPMENT_GUIDELINES.md never existed here; protected files are in .claude/CLAUDE.md. src/config/site.ts -> org.ts/urls.ts; Next.js 16. - src/middleware.ts -> src/proxy.ts; components/ui/Button.tsx -> src/components/ui/button.tsx; reference page paths. - docs-paths baseline 68 -> 6, as the check asks when the count falls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: fix dead links in package and example READMEs ai-native-cms-core linked a Next.js plugin, a CLI and docs/quick-start.md that do not exist in this repo; ai-native-cms-react has no README; the saldo README pointed at the repo root instead of the implementation in src/lib/team/saldo.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD --------- Co-authored-by: Claude <noreply@anthropic.com>
10 KiB
created_date, last_modified_date, last_modified_summary
| created_date | last_modified_date | last_modified_summary |
|---|---|---|
| 2026-01-30 | 2026-01-06 | Updated to clarify this is a human reference guide; AI rules are in .cursorrules and .cursor/rules/ |
Cursor IDE Reference Guide for Humans
For developers and team members using Cursor IDE
Note for AI Agents: This is a human reference guide. Cursor AI automatically reads project rules from:
.cursorrules(main rules file).cursor/rules/*.mdc(modular rule files)Purpose: This document helps human developers understand how to use Cursor IDE effectively when working on the RevampIT codebase.
Quick Start
Before starting any task:
- ✅ Read
docs/development/DEV_GUIDE.md- Core development principles - ✅ Read
docs/BEST_PRACTICES.md- Critical AI slop prevention - ✅ Read
.claude/CLAUDE.md("Protected Files") - File deletion protection rules - ✅ Use semantic search before creating ANY new file
Cursor-Specific Capabilities
Available Tools
Cursor provides access to:
- ✅ File operations - Read, write, edit, delete (with caution!)
- ✅ Terminal commands - Run npm, git, docker commands
- ✅ Codebase search - Semantic and grep search
- ✅ Browser automation - Test web features via MCP
- ✅ MCP servers - Supabase, Context7, browser tools
- ✅ Linter access - Read and fix linting errors
Key Advantages
- Context Awareness - Cursor has access to open files and recent context
- Multi-file Editing - Can edit multiple files in one operation
- Terminal Integration - Can run commands and see output
- Real-time Feedback - Can check linter errors immediately
Cursor-Specific Best Practices
1. Always Search Before Creating
Use semantic search first:
Before creating: src/components/products/ProductCard.tsx
Search for: "product card component"
Check for existing files:
# Use glob_file_search or grep
glob_file_search: **/ProductCard.tsx
grep: ProductCard
2. Use Multi-file Operations Wisely
✅ GOOD: Edit related files together
// When adding a new feature:
// 1. Create component
// 2. Create hook
// 3. Update types
// 4. Add to page
// All in one operation when related
❌ BAD: Making unrelated changes together
// Don't mix:
// - Fixing a bug in auth
// - Adding a new product feature
// - Updating documentation
// All in one operation
3. Leverage Terminal Commands
Use terminal for verification:
# After creating files, verify they work
pnpm run lint
pnpm run build
pnpm run test
# Check git status
git status
# Verify services are running
docker compose ps
4. Check Linter Errors Immediately
After making changes:
// Always check linter errors
read_lints: ['src/components/new-component.tsx']
Fix errors before proceeding:
- Don't leave linting errors
- Fix TypeScript errors immediately
- Ensure code compiles
5. Use Browser Tools for Testing
When working on UI features:
// Use browser MCP tools to test
// 1. Navigate to page
// 2. Take snapshot
// 3. Interact with elements
// 4. Verify behavior
Critical Rules for Cursor Agents
File Deletion Protection
⚠️ NEVER delete files without explicit user approval
Before deleting ANY file:
- ✅ Ask user explicitly
- ✅ Show what will be deleted
- ✅ Explain impact
- ✅ Wait for confirmation
Protected files (NEVER delete):
- Migration files (
supabase/migrations/*) - Core config files
- Documentation files
.envfiles
AI Slop Prevention
Before creating ANY new file:
- ✅ Search codebase thoroughly (semantic + grep)
- ✅ Check for similar functionality
- ✅ Verify naming conventions
- ✅ Ensure no duplicates exist
Red flags to avoid:
- 🚩 Creating
Button.tsxwhensrc/components/ui/button.tsxexists - 🚩 Creating
utils.tswhenlib/utils.tsexists - 🚩 Duplicating existing patterns
Code Quality
Always:
- ✅ Use TypeScript strict mode
- ✅ Follow existing patterns
- ✅ Use
src/lib/logger.tsinstead ofconsole.log - ✅ Handle errors properly
- ✅ Write self-documenting code
Never:
- ❌ Use
anytypes - ❌ Leave
console.logstatements - ❌ Create duplicate functionality
- ❌ Mix different patterns
Cursor Workflow Patterns
Pattern 1: Adding a New Feature
// Step 1: Search for existing patterns
codebase_search: "How are similar features implemented?"
// Step 2: Check for existing components
glob_file_search: **/SimilarComponent.tsx
// Step 3: Create new files following existing patterns
// - Component file
// - Types file (if needed)
// - Hook file (if needed)
// Step 4: Integrate into existing code
// - Add to page/route
// - Update navigation if needed
// Step 5: Verify
// - Check linter errors
// - Run tests
// - Test in browser
Pattern 2: Fixing a Bug
// Step 1: Understand the bug
// - Read error messages
// - Check logs
// - Reproduce issue
// Step 2: Find root cause
// - Search for related code
// - Check error handling
// - Review recent changes
// Step 3: Fix the issue
// - Make minimal changes
// - Follow existing patterns
// - Add error handling if needed
// Step 4: Verify fix
// - Test the fix
// - Check for regressions
// - Update tests if needed
Pattern 3: Refactoring
// Step 1: Analyze current code
// - Identify duplication
// - Find patterns to extract
// Step 2: Propose refactor
// - Explain what will change
// - Show benefits
// - Get approval
// Step 3: Execute refactor
// - Extract shared code
// - Update all usages
// - Maintain functionality
// Step 4: Verify
// - Run tests
// - Check linter
// - Verify no regressions
Common Tasks
Creating a New Component
// 1. Check if similar component exists
codebase_search: "product card component"
// 2. Create component following pattern
// src/components/products/ProductCard.tsx
'use client';
import Image from 'next/image';
import Link from 'next/link';
interface ProductCardProps {
product: Product;
}
export function ProductCard({ product }: ProductCardProps) {
return (
<Link href={`/products/${product.id}`}>
<div className="rounded-lg border p-4">
<Image src={product.image} alt={product.name} />
<h3>{product.name}</h3>
</div>
</Link>
);
}
// 3. Check linter
read_lints: ['src/components/products/ProductCard.tsx']
// 4. Export from index if needed
Creating an API Route
// 1. Check existing API patterns
codebase_search: "API route handler pattern"
// 2. Create route following pattern
// src/app/api/products/route.ts
import { NextRequest, NextResponse } from 'next/server';
import { logger } from '@/lib/logger';
export async function GET(request: NextRequest) {
try {
const products = await fetchProducts();
return NextResponse.json({ success: true, data: products });
} catch (error) {
logger.error('Failed to fetch products', { error });
return NextResponse.json(
{ success: false, error: 'Failed to fetch products' },
{ status: 500 }
);
}
}
// 3. Verify it works
run_terminal_cmd: curl http://localhost:3000/api/products
Updating Documentation
// 1. Find relevant documentation
glob_file_search: **/*DEV_GUIDE*.md
// 2. Update with new information
// - Update last_modified_date
// - Add last_modified_summary
// - Update content
// 3. Ensure frontmatter is correct
---
created_date: YYYY-MM-DD
last_modified_date: YYYY-MM-DD
last_modified_summary: Description of changes
---
Error Handling in Cursor
When You Encounter Errors
1. Read error messages carefully
// Check terminal output
// Check linter errors
// Check browser console
2. Search for similar errors
codebase_search: "How is this error handled elsewhere?"
3. Fix systematically
// - Fix TypeScript errors first
// - Fix linting errors
// - Fix runtime errors
// - Test after each fix
Common Error Patterns
TypeScript Errors:
// ❌ BAD: Using any
function process(data: any) { ... }
// ✅ GOOD: Proper typing
function process<T>(data: T): ProcessedData<T> { ... }
Linting Errors:
// ❌ BAD: console.log
console.log('Debug:', data);
// ✅ GOOD: Use logger
import { logger } from '@/lib/logger';
logger.debug('Debug info', { data });
Testing in Cursor
Use Browser Tools
// 1. Start dev server
run_terminal_cmd: pnpm run dev
// 2. Navigate to page
browser_navigate: http://localhost:3000/products
// 3. Take snapshot
browser_snapshot
// 4. Interact with page
browser_click: element="Add to cart button"
// 5. Verify behavior
browser_snapshot
Use Terminal Commands
# Run tests
pnpm run test
# Run linter
pnpm run lint
# Check build
pnpm run build
# Check services
docker compose ps
Quick Reference
Essential Commands
# Development
pnpm run dev # Start dev server
pnpm run d # Start all services
pnpm run lint # Check code quality
pnpm run test # Run tests
pnpm run build # Build for production
# Git
git status # Check changes
git diff # See differences
git log --oneline # Recent commits
Key Files to Reference
docs/development/DEV_GUIDE.md- Main development guidedocs/BEST_PRACTICES.md- Best practices and AI slop prevention.claude/CLAUDE.md("Protected Files") - File deletion protectiondocs/guides/ARCHITECTURE.md- System architecture
Cursor-Specific Tips
- Use semantic search before creating anything
- Check linter errors after every change
- Test in browser for UI changes
- Run terminal commands to verify
- Never delete files without approval
Remember
- ✅ Search before creating - Always check for existing code
- ✅ Follow patterns - Consistency is key
- ✅ Test your changes - Use browser and terminal tools
- ✅ Check linter - Fix errors immediately
- ✅ Protect files - Never delete without approval
- ✅ Prevent AI slop - No duplicates, no conflicts
When in doubt, ask the user or search the codebase!
Last Updated: 2026-01-30
For: Cursor Cloud Code (Composer) agents