Files
evig/.cursorrules
CatoandClaude Opus 5.5 acc2353a2f docs: regenerate API docs, archive dated records, fix live docs (#574)
* 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>
2026-10-19 14:10:38 +02:00

117 lines
3.8 KiB
Plaintext

# RevampIT Project Rules for Cursor AI
## 🎯 Project Overview
RevampIT is a Swiss non-profit enabling free exchange of technology, promoting open-source hardware and software.
**See SSOT files for details:**
- **Mission**: `docs/MISSION_STATEMENT.md`
- **Project Context**: `docs/SHARED_CONTEXT.md` (tech stack, location, database, file structure)
- **Commands**: `docs/COMMANDS.md` (all npm scripts)
---
## ⚡ Quick Commands
```bash
npm run d # Start everything (databases + dev server)
npm run dev # Frontend only (port 3000)
npm run services:up # Start Docker services
npm run services:down # Stop Docker services
npm run setup-admins # Create admin users
npm run lint # Check code quality
npm run build # Test production build
npm run typecheck # TypeScript check (IMPORTANT: run before commits)
```
**Full command reference**: See `docs/COMMANDS.md`
---
## 🛡️ Critical Rules (MUST FOLLOW)
### File Deletion Protection
**⚠️ NEVER delete without explicit user approval:**
- Migration files: `cms-api/src/migrations/*`, `scripts/db/migrations/*`
- `.env*` files
- Core configuration files
- Documentation files
### Code Quality Standards
**ALWAYS:**
- ✅ Use `import { logger } from '@/lib/logger'` (NEVER `console.log`)
- ✅ Use constants from `src/config/` (TABLE_NAMES, URLs, error messages)
- ✅ Use TypeScript strict mode (no `any` without justification)
- ✅ Search codebase before creating new files (prevent duplicates)
- ✅ Follow existing patterns from similar files
**NEVER:**
- ❌ `console.log` statements (see `docs/CODE_AUDIT.md` for current count)
- ❌ Hardcoded table names (use `TABLE_NAMES` from `src/config/database.ts`)
- ❌ Hardcoded URLs (use `src/config/urls.ts`)
- ❌ Duplicate functionality
### AI Slop Prevention
**Before creating ANY new file:**
1. Search with semantic search: `@codebase "similar functionality"`
2. Check with grep: `grep -r "ComponentName"`
3. Verify naming conventions in target directory
4. Ensure no duplicates exist
---
## 📋 Detailed Topic-Specific Rules
For detailed, modular rules, see:
- `.cursor/rules/code-quality.mdc` - Code standards and patterns
- `.cursor/rules/database.mdc` - Database access patterns
- `.cursor/rules/deployment.mdc` - Deployment workflow
- `.cursor/rules/swiss-context.mdc` - Swiss-specific requirements
---
## 📚 Key Documentation
**Read BEFORE starting any task:**
1. `docs/development/DEV_GUIDE.md` - Core principles (DRY, SSOT)
2. `docs/BEST_PRACTICES.md` - AI slop prevention
3. `.claude/CLAUDE.md` ("Protected Files") - File protection rules
**Project Context:**
- `docs/SHARED_CONTEXT.md` - Tech stack, database, file structure, access points
- `docs/COMMANDS.md` - All npm scripts
- `docs/CODE_AUDIT.md` - Current issues to fix
**For specific features:**
- `docs/UNIFIED_AUTH.md` - Authentication system
- `docs/SHARED_CONTEXT.md` - Shop and platform status
- `docs/guides/ARCHITECTURE.md` - System architecture
---
## 🧪 Testing Changes
```bash
# After making changes:
npm run typecheck # TypeScript validation (CRITICAL: run before commits)
npm run build # Check TypeScript compilation
npm run lint # Check code quality
npm run test # Run tests (if applicable)
npm run d # Start and test manually
```
---
## 🚨 Known Issues
See `docs/CODE_AUDIT.md` for current issues:
- console.log statements → replace with `logger`
- Hardcoded table names → use `TABLE_NAMES`
- Hardcoded URLs → use `src/config/urls.ts`
- Missing auth checks
- Performance issues
---
**Remember**: This is a Swiss non-profit focused on sustainability and inclusion. Write clean, maintainable code that future volunteers can understand and extend. Quality matters, but so does making technology accessible to everyone.