- 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>
2.6 KiB
2.6 KiB
Repository Guidelines
Project Structure & Module Organization
frontend/is the React UI (entry:frontend/src/), built withreact-scripts.backend/is the Express API and services (entry:backend/src/).tests/contains Playwright, Selenium, and API/integration test assets.database/andmigrations/hold schema/data artifacts.docs/houses active documentation;_archive/andarchive/capture historical fixes.- Root
unified-server.jsandpackage.jsonwire the unified runtime.
Documentation Map (Read First)
docs/README.mdandREADME.mddescribe product scope and local setup.docs/UI_TESTING_SETUP.mdandtests/selenium/README.mdexplain UI test workflows.docs/deployment/covers PM2, DNS migration, and deployment pipeline.docs/ENCRYPTED_ENV_*anddocs/ENCRYPTED_ENV_SECURITY.mdexplain secret handling.docs/OPENAI_COSTS_API.mdanddocs/LOGGING_SYSTEM.mddescribe cost tracking/logging.docs/features/anddocs/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_URLfor 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/.envfor local secrets (e.g.,OPENAI_API_KEY). - Start PostgreSQL via
docker-compose up -dfor local work. - Never commit API keys or production credentials.