3.0 KiB
3.0 KiB
Final Project Summary & Deployment Guide
Recent Changes (Last 3 Git Pushes)
Here is a summary of the most recent activity on the repository:
-
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.
- Message:
-
e32e43d- Timo, 10 hours ago- Message:
docs: Add comprehensive deployment guide for BizMatch project. - Impact: Added documentation for deployment procedures.
- Message:
-
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.
- Message:
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:
- Navigate to the project directory:
cd bizmatch - Install dependencies:
npm install - Build the project:
npm run build:ssr- This command executes
node version.js(to update build versions) and thenng build --configuration prod. - Output will be generated in
dist/bizmatch/browseranddist/bizmatch/server.
- This command executes
3. Running the Application
To start the production server:
npm run serve:ssr
- Entry Point:
dist/bizmatch/server/server.mjs - Port: The server listens on
process.env.PORTor 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.tsand ensure the polyfill is imported BEFORE any other imports:// 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 definedordocument is not definederrors 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.tsis 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.mdfor the most recent security audit and known issues.