diff --git a/DOCKER_SYNC_GUIDE.md b/DOCKER_SYNC_GUIDE.md index e688d5b..a559fa5 100644 --- a/DOCKER_SYNC_GUIDE.md +++ b/DOCKER_SYNC_GUIDE.md @@ -1,27 +1,27 @@ -# Docker Code Sync Guide - -If you have made changes to the backend code and they don't seem to take effect (even though the files on disk are updated), it's because the Docker container is running from a pre-compiled `dist/` directory. - -### The Problem -The `bizmatch-app` container compiles the TypeScript code *only once* when the container starts. It does not automatically watch for changes and recompile while running. - -### The Solution -You must restart or recreate the container to trigger a new build. - -**Option 1: Quick Restart (Recommended)** -Run this in the `bizmatch-server` directory: -```bash -docker-compose restart app -``` - -**Option 2: Force Rebuild (If changes aren't picked up)** -If a simple restart doesn't work, use this to force a fresh build: -```bash -docker-compose up -d --build app -``` - -### Summary for Other Laptops -1. **Pull** the latest changes from Git. -2. **Execute** `docker-compose restart app`. -3. **Verify** the logs for the new `WARN` debug messages. +# Docker Code Sync Guide + +If you have made changes to the backend code and they don't seem to take effect (even though the files on disk are updated), it's because the Docker container is running from a pre-compiled `dist/` directory. + +### The Problem +The `bizmatch-app` container compiles the TypeScript code *only once* when the container starts. It does not automatically watch for changes and recompile while running. + +### The Solution +You must restart or recreate the container to trigger a new build. + +**Option 1: Quick Restart (Recommended)** +Run this in the `bizmatch-server` directory: +```bash +docker-compose restart app +``` + +**Option 2: Force Rebuild (If changes aren't picked up)** +If a simple restart doesn't work, use this to force a fresh build: +```bash +docker-compose up -d --build app +``` + +### Summary for Other Laptops +1. **Pull** the latest changes from Git. +2. **Execute** `docker-compose restart app`. +3. **Verify** the logs for the new `WARN` debug messages. . \ No newline at end of file diff --git a/FINAL_SUMMARY.md b/FINAL_SUMMARY.md index 339f8d9..321ae81 100644 --- a/FINAL_SUMMARY.md +++ b/FINAL_SUMMARY.md @@ -1,73 +1,73 @@ -# Final Project Summary & Deployment Guide - -## Recent Changes (Last 3 Git Pushes) - -Here is a summary of the most recent activity on the repository: - -1. **`e3e726d`** - Timo, 3 minutes ago - * **Message**: `feat: Initialize BizMatch application with core UI components, routing, listing pages, backend services, migration scripts, and vulnerability management.` - * **Impact**: Major initialization of the application structure, including core features and security baselines. - -2. **`e32e43d`** - Timo, 10 hours ago - * **Message**: `docs: Add comprehensive deployment guide for BizMatch project.` - * **Impact**: Added documentation for deployment procedures. - -3. **`b52e47b`** - Timo, 10 hours ago - * **Message**: `feat: Initialize Angular SSR application with core pages, components, and server setup.` - * **Impact**: Initial naming and setup of the Angular SSR environment. - ---- - -## Deployment Instructions - -### 1. Prerequisites -* **Node.js**: Version **20.x** or higher is recommended. -* **Package Manager**: `npm`. - -### 2. Building for Production (SSR) -The application is configured for **Angular SSR (Server-Side Rendering)**. You must build the application specifically for this mode. - -**Steps:** -1. Navigate to the project directory: - ```bash - cd bizmatch - ``` -2. Install dependencies: - ```bash - npm install - ``` -3. Build the project: - ```bash - npm run build:ssr - ``` - * This command executes `node version.js` (to update build versions) and then `ng build --configuration prod`. - * Output will be generated in `dist/bizmatch/browser` and `dist/bizmatch/server`. - -### 3. Running the Application -To start the production server: - -```bash -npm run serve:ssr -``` -* **Entry Point**: `dist/bizmatch/server/server.mjs` -* **Port**: The server listens on `process.env.PORT` or defaults to **4200**. - -### 4. Critical Deployment Checks (SSR & Polyfills) -**⚠️ IMPORTANT:** -The application uses a custom **DOM Polyfill** to support third-party libraries that might rely on browser-specific objects (like `window`, `document`) during server-side rendering. - -* **Polyfill Location**: `src/ssr-dom-polyfill.ts` -* **Server Verification**: Open `server.ts` and ensure the polyfill is imported **BEFORE** any other imports: - ```typescript - // IMPORTANT: DOM polyfill must be imported FIRST - import './src/ssr-dom-polyfill'; - ``` -* **Why is this important?** - If this import is removed or moved down, you may encounter `ReferenceError: window is not defined` or `document is not defined` errors when the server tries to render pages containing Leaflet maps or other browser-only libraries. - -### 5. Environment Variables & Security -* Ensure all necessary environment variables (e.g., Database URLs, API Keys) are configured in your deployment environment. -* Since `server.ts` is an Express app, you can extend it to handle specialized headers or proxy configurations if needed. - -### 6. Vulnerability Status -* Please refer to `FINAL_VULNERABILITY_STATUS.md` for the most recent security audit and known issues. +# Final Project Summary & Deployment Guide + +## Recent Changes (Last 3 Git Pushes) + +Here is a summary of the most recent activity on the repository: + +1. **`e3e726d`** - Timo, 3 minutes ago + * **Message**: `feat: Initialize BizMatch application with core UI components, routing, listing pages, backend services, migration scripts, and vulnerability management.` + * **Impact**: Major initialization of the application structure, including core features and security baselines. + +2. **`e32e43d`** - Timo, 10 hours ago + * **Message**: `docs: Add comprehensive deployment guide for BizMatch project.` + * **Impact**: Added documentation for deployment procedures. + +3. **`b52e47b`** - Timo, 10 hours ago + * **Message**: `feat: Initialize Angular SSR application with core pages, components, and server setup.` + * **Impact**: Initial naming and setup of the Angular SSR environment. + +--- + +## Deployment Instructions + +### 1. Prerequisites +* **Node.js**: Version **20.x** or higher is recommended. +* **Package Manager**: `npm`. + +### 2. Building for Production (SSR) +The application is configured for **Angular SSR (Server-Side Rendering)**. You must build the application specifically for this mode. + +**Steps:** +1. Navigate to the project directory: + ```bash + cd bizmatch + ``` +2. Install dependencies: + ```bash + npm install + ``` +3. Build the project: + ```bash + npm run build:ssr + ``` + * This command executes `node version.js` (to update build versions) and then `ng build --configuration prod`. + * Output will be generated in `dist/bizmatch/browser` and `dist/bizmatch/server`. + +### 3. Running the Application +To start the production server: + +```bash +npm run serve:ssr +``` +* **Entry Point**: `dist/bizmatch/server/server.mjs` +* **Port**: The server listens on `process.env.PORT` or defaults to **4200**. + +### 4. Critical Deployment Checks (SSR & Polyfills) +**⚠️ IMPORTANT:** +The application uses a custom **DOM Polyfill** to support third-party libraries that might rely on browser-specific objects (like `window`, `document`) during server-side rendering. + +* **Polyfill Location**: `src/ssr-dom-polyfill.ts` +* **Server Verification**: Open `server.ts` and ensure the polyfill is imported **BEFORE** any other imports: + ```typescript + // IMPORTANT: DOM polyfill must be imported FIRST + import './src/ssr-dom-polyfill'; + ``` +* **Why is this important?** + If this import is removed or moved down, you may encounter `ReferenceError: window is not defined` or `document is not defined` errors when the server tries to render pages containing Leaflet maps or other browser-only libraries. + +### 5. Environment Variables & Security +* Ensure all necessary environment variables (e.g., Database URLs, API Keys) are configured in your deployment environment. +* Since `server.ts` is an Express app, you can extend it to handle specialized headers or proxy configurations if needed. + +### 6. Vulnerability Status +* Please refer to `FINAL_VULNERABILITY_STATUS.md` for the most recent security audit and known issues. diff --git a/bizmatch-server/prod.dump b/bizmatch-server/prod.dump old mode 100644 new mode 100755 diff --git a/bizmatch/Dockerfile b/bizmatch/Dockerfile index 8515709..70d106c 100644 --- a/bizmatch/Dockerfile +++ b/bizmatch/Dockerfile @@ -1,13 +1,13 @@ -FROM node:22-alpine - -WORKDIR /app - -# GANZEN dist-Ordner kopieren, nicht nur bizmatch -COPY dist ./dist -COPY package*.json ./ - -RUN npm ci --omit=dev - -EXPOSE 4200 - -CMD ["node", "dist/bizmatch/server/server.mjs"] +FROM node:22-alpine + +WORKDIR /app + +# GANZEN dist-Ordner kopieren, nicht nur bizmatch +COPY dist ./dist +COPY package*.json ./ + +RUN npm ci --omit=dev + +EXPOSE 4200 + +CMD ["node", "dist/bizmatch/server/server.mjs"] diff --git a/bizmatch/docker-compose.yml b/bizmatch/docker-compose.yml index 3b1a0a9..c216dfe 100644 --- a/bizmatch/docker-compose.yml +++ b/bizmatch/docker-compose.yml @@ -1,10 +1,10 @@ -services: - bizmatch-ssr: - build: . - image: bizmatch-ssr - container_name: bizmatch-ssr - restart: unless-stopped - ports: - - '4200:4200' - environment: - NODE_ENV: DEVELOPMENT +services: + bizmatch-ssr: + build: . + image: bizmatch-ssr + container_name: bizmatch-ssr + restart: unless-stopped + ports: + - '4200:4200' + environment: + NODE_ENV: DEVELOPMENT diff --git a/bizmatch/src/app/pages/subscription/my-listing/my-listing.component.html b/bizmatch/src/app/pages/subscription/my-listing/my-listing.component.html index c87276f..94ab119 100644 --- a/bizmatch/src/app/pages/subscription/my-listing/my-listing.component.html +++ b/bizmatch/src/app/pages/subscription/my-listing/my-listing.component.html @@ -1,172 +1,172 @@ -
| Title | -Category | -Located in | -Price | -Internal # | -Publication Status | -Actions | -
|---|---|---|---|---|---|---|
| - - | - -- - | -- - | -- - | -- - | -- - | -- - | -
| {{ listing.title }} | -{{ listing.listingsCategory === 'commercialProperty' ? 'Commercial Property' : 'Business' }} | -{{ listing.location.name ? listing.location.name : listing.location.county ? listing.location.county : this.selectOptions.getState(listing.location.state) }} | -${{ listing.price ? listing.price.toLocaleString() : '' }} | -- {{ listing.internalListingNumber ?? '—' }} - | -- - {{ listing.draft ? 'Draft' : 'Published' }} - - | -- @if(listing.listingsCategory==='business'){ - - } @if(listing.listingsCategory==='commercialProperty'){ - - } - - | -
Category: {{ listing.listingsCategory === 'commercialProperty' ? 'Commercial Property' : 'Business' }}
-Located in: {{ listing.location?.name ? listing.location.name : listing.location?.county }} - {{ listing.location?.state }}
-Price: ${{ listing.price.toLocaleString() }}
-Internal #: {{ listing.internalListingNumber ?? '—' }}
-| Title | +Category | +Located in | +Price | +Internal # | +Publication Status | +Actions | +
|---|---|---|---|---|---|---|
| + + | + ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | +
| {{ listing.title }} | +{{ listing.listingsCategory === 'commercialProperty' ? 'Commercial Property' : 'Business' }} | +{{ listing.location.name ? listing.location.name : listing.location.county ? listing.location.county : this.selectOptions.getState(listing.location.state) }} | +${{ listing.price ? listing.price.toLocaleString() : '' }} | ++ {{ listing.internalListingNumber ?? '—' }} + | ++ + {{ listing.draft ? 'Draft' : 'Published' }} + + | ++ @if(listing.listingsCategory==='business'){ + + } @if(listing.listingsCategory==='commercialProperty'){ + + } + + | +
Category: {{ listing.listingsCategory === 'commercialProperty' ? 'Commercial Property' : 'Business' }}
+Located in: {{ listing.location?.name ? listing.location.name : listing.location?.county }} - {{ listing.location?.state }}
+Price: ${{ listing.price.toLocaleString() }}
+Internal #: {{ listing.internalListingNumber ?? '—' }}
+