Files
tilbudgivern/AGENTS.md
alexpolo1 cf9b831e35 docs: Add AI agent configuration files for multiple AI assistants
- CLAUDE.md: Claude Code instructions
- .github/copilot-instructions.md: GitHub Copilot custom instructions
- .cursorrules: Cursor IDE project rules
- COPILOT_MEMORY.md: Active project context with documentation links
- AGENTS.md: General repository guidelines and coding standards
- GEMINI.md: Gemini AI detailed project overview

All files include: project overview, tech stack, architecture patterns,
Smart Packages system, roof types, Danish terminology, and common commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 11:02:21 +00:00

2.6 KiB

Repository Guidelines

Project Structure & Module Organization

  • frontend/ is the React UI (entry: frontend/src/), built with react-scripts.
  • backend/ is the Express API and services (entry: backend/src/).
  • tests/ contains Playwright, Selenium, and API/integration test assets.
  • database/ and migrations/ hold schema/data artifacts.
  • docs/ houses active documentation; _archive/ and archive/ capture historical fixes.
  • Root unified-server.js and package.json wire the unified runtime.

Documentation Map (Read First)

  • docs/README.md and README.md describe product scope and local setup.
  • docs/UI_TESTING_SETUP.md and tests/selenium/README.md explain UI test workflows.
  • docs/deployment/ covers PM2, DNS migration, and deployment pipeline.
  • docs/ENCRYPTED_ENV_* and docs/ENCRYPTED_ENV_SECURITY.md explain secret handling.
  • docs/OPENAI_COSTS_API.md and docs/LOGGING_SYSTEM.md describe cost tracking/logging.
  • docs/features/ and docs/guides/ describe Smart Packages, ordrestyring, and quoting flows.
  • apitest/ documents GraphQL API test batches and integration notes.

Build, Test, and Development Commands

npm run dev               # Start unified server (nodemon)
npm run start             # Start unified server (node)
npm run build             # Build frontend assets
npm run test:ui           # Playwright UI suite (headless)
npm run test:pw:local     # Playwright against localhost:4032
npm run test:selenium:local  # Selenium UI tests against localhost
./test-build-deploy.sh    # Full test + build + PM2 restart
./quick-deploy.sh         # Quick deploy for small changes

Coding Style & Naming Conventions

  • Follow existing JS/React/Node patterns per folder.
  • Prefer domain naming (e.g., quote, roof-type, smart-package, carpenter).
  • Keep modules focused and small; avoid cross-cutting helpers.

Testing Guidelines

  • Playwright config: tests/playwright.config.js (Chromium). Selenium uses Mocha.
  • Use PLAYWRIGHT_BASE_URL/SELENIUM_BASE_URL for environment targeting.
  • Local UI runs expect the unified server on port 4032 (see docs/UI_TESTING_SETUP.md).
  • Name UI specs by intent (e.g., roof-type-verification.spec.js).

Commit & Pull Request Guidelines

  • Recent history favors Conventional Commits (e.g., feat: ...).
  • PRs include a short summary, test evidence (commands + results), and UI screenshots when relevant.

Configuration & Secrets

  • Use backend/.env for local secrets (e.g., OPENAI_API_KEY).
  • Start PostgreSQL via docker-compose up -d for local work.
  • Never commit API keys or production credentials.