# Working Tree Audit

Project: helpyourneighbour

## Modified tracked files
README.md
backend/playwright.config.js
backend/scripts/integration-test.mjs

--- README.md
# helpyourneighbour

Erster funktionaler Backend-Stand für die Vision:

- Nutzerregistrierung und Login (`/auth/register`, `/auth/login`)
- Hilfeanfragen erstellen/listen (`/requests`)
- Angebote + Gegenangebote + Deal-Annahme (`/offers/...`)
- Bewertungsgrundlage mit 2-14 Tage Prompt-Fenster (`/reviews/:dealId`)
- Datenmodell inkl. postalischer Adress-Verifikation (`backend/sql/schema.sql`)
- Address-Change-Flow mit Briefcode (`/addresses/change-request`, `/addresses/verify`)
- Kontaktdatenaustausch nach Deal (`/contacts/request`, `/contacts/respond`, `/contacts/deal/:dealId`)
- Serverseitige AES-256-GCM-Verschlüsselung für Adresse/Telefon (`DATA_ENCRYPTION_KEY`)

## Docker-Test (Unraid Host)

```bash
./scripts/test-in-docker.sh
```

## Start

```bash
cd backend
cp .env.example .env
npm install
npm run db:init
npm run start
```

## Forgejo Tasks

- #1 Backend Grundgerüst + Auth API
- #2 Datenmodell für Request/Offer/Negotiation/Deal
- #3 Bewertungssystem 2-14 Tage Verzögerung
- #4 Adressänderung nur per Briefbestätigung

## API Governance

- Dispute-Flow Doku: `docs/dispute-flow.md`

- OpenAPI: `openapi.yaml` (Spiegel: `docs/openapi.yaml`)
- Versioning/Deprecation Policy: `docs/api-versioning.md`
- Rollen- und Rechtekonzept: `docs/roles-and-permissions.md`

## Development Quickstart (auto-synced)

```bash
cd backend
npm install
npm test
npm run start
```


--- backend/playwright.config.js
const { defineConfig } = require('@playwright/test');

module.exports = defineConfig({
  testDir: './tests',
  timeout: 30000,
  expect: {
    timeout: 5000
  },
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: 'html',
  use: {
    actionTimeout: 0,
    baseURL: 'http://localhost:3000',
    trace: 'on-first-retry',
  },
  projects: [
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
      },
    },
  ],
});
--- backend/scripts/integration-test.mjs
// Einfacher HTTP-Test ohne Playwright
// Funktion zum Senden einer HTTP-Anfrage
async function testHealthEndpoint() {
  try {
    const response = await fetch('http://localhost:3000/health');
    if (response.status === 200) {
      console.log('Integration test passed: API server is running and healthy');
      return true;
    } else {
      console.error(`Integration test failed: Expected status 200, got ${response.status}`);
      return false;
    }
  } catch (error) {
    console.error('Integration test failed:', error.message);
    return false;
  }
}

// Führe den Test aus
testHealthEndpoint().then(success => {
  if (!success) {
    process.exit(1);
  }
});

## Untracked files
.DS_Store
._.DS_Store
PROJECT_SUMMARY.md
STATUS.md
backend/.DS_Store
backend/._.DS_Store
backend/playwright-report/index.html
backend/playwright.config.mjs
backend/test-results/.last-run.json
backend/tests/integration-test.spec.js
docs/plans/2026-03-06-continue-working-the-helpyourneighbour-project-after.md
docs/plans/2026-03-06-implement-the-next-concrete-improvement-for.md
docs/plans/2026-03-06-initial-session-startup-and-greeting.md
docs/plans/2026-03-06-start.md
docs/runtime/agent_state_helpyourneighbour.json
docs/runtime/backlog_item_helpyourneighbour.md
docs/runtime/generated_artifacts_helpyourneighbour.md
docs/runtime/goal_brief_helpyourneighbour.md
docs/runtime/goal_targets_helpyourneighbour.md
docs/runtime/integration_candidates_helpyourneighbour.md
docs/runtime/integration_context_helpyourneighbour.md
docs/runtime/integration_repair_brief_helpyourneighbour.md
docs/runtime/integration_status_helpyourneighbour.env
docs/runtime/integration_targets_helpyourneighbour.md
docs/runtime/integration_test_helpyourneighbour.log
docs/runtime/integration_triage_helpyourneighbour.md
docs/runtime/notion_recall_helpyourneighbour.md
docs/runtime/project_snapshot_helpyourneighbour.md
docs/runtime/smoke_status_helpyourneighbour.env
docs/runtime/smoke_test_helpyourneighbour.log
docs/runtime/task_helpyourneighbour_1_backlog-goal-verify.log
docs/runtime/task_helpyourneighbour_1_backlog-inspect.log
docs/runtime/task_helpyourneighbour_1_backlog-project-snapshot.log
docs/runtime/task_helpyourneighbour_1_integration-check.log
docs/runtime/task_helpyourneighbour_1_integration-context-audit.log
docs/runtime/task_helpyourneighbour_1_integration-failure-blocked.log
docs/runtime/task_helpyourneighbour_1_integration-repair-brief.log
docs/runtime/task_helpyourneighbour_1_integration-targets.log
docs/runtime/task_helpyourneighbour_1_integration-triage.log
docs/runtime/task_helpyourneighbour_1_no-work.log
docs/runtime/task_helpyourneighbour_1_project-snapshot.log
docs/runtime/task_helpyourneighbour_1_working-tree-audit.log
docs/runtime/task_helpyourneighbour_2_backlog-goal-brief.log
docs/runtime/task_helpyourneighbour_2_backlog-goal-targets.log
docs/runtime/task_helpyourneighbour_2_generated-artifacts-review.log
docs/runtime/task_helpyourneighbour_2_integration-candidates.log
docs/runtime/task_helpyourneighbour_2_integration-failure-blocked.log
docs/runtime/task_helpyourneighbour_2_no-work.log
docs/runtime/verify_helpyourneighbour_1_backlog-goal-verify.log
docs/runtime/verify_helpyourneighbour_1_backlog-inspect.log
docs/runtime/verify_helpyourneighbour_1_backlog-project-snapshot.log
docs/runtime/verify_helpyourneighbour_1_integration-check.log
docs/runtime/verify_helpyourneighbour_1_integration-failure-blocked.log
docs/runtime/verify_helpyourneighbour_1_integration-repair-brief.log
docs/runtime/verify_helpyourneighbour_1_integration-targets.log
docs/runtime/verify_helpyourneighbour_1_integration-triage.log
docs/runtime/verify_helpyourneighbour_1_no-work.log
docs/runtime/verify_helpyourneighbour_1_project-snapshot.log
docs/runtime/verify_helpyourneighbour_2_backlog-goal-brief.log
docs/runtime/verify_helpyourneighbour_2_backlog-goal-targets.log
docs/runtime/verify_helpyourneighbour_2_generated-artifacts-review.log
docs/runtime/verify_helpyourneighbour_2_integration-candidates.log
docs/runtime/verify_helpyourneighbour_2_integration-failure-blocked.log
docs/runtime/verify_helpyourneighbour_2_no-work.log
docs/runtime/working_tree_audit_helpyourneighbour.md
