feat: Runtime configuration and Docker deployment improvements

Frontend:
- Add runtime configuration service for deployment-time API URL injection
- Create docker-entrypoint.sh to generate config.json from environment variables
- Update ApiService, ApprovalService, and DocumentViewer to use RuntimeConfigService
- Add APP_INITIALIZER to load runtime config before app starts

Backend:
- Fix init-blockchain.js to properly quote mnemonic phrases in .env file
- Improve docker-entrypoint.sh with health checks and better error handling

Docker:
- Add API_BASE_URL environment variable to frontend container
- Update docker-compose.yml with clear documentation for remote deployment
- Reorganize .env.example with clear categories (REQUIRED FOR REMOTE, PRODUCTION, AUTO-GENERATED)

Workflow fixes:
- Fix DepartmentApproval interface to match backend schema
- Fix stage transformation for 0-indexed stageOrder
- Fix workflow list to show correct stage count from definition.stages

Cleanup:
- Move development artifacts to .trash directory
- Remove root-level package.json (was only for utility scripts)
- Add .trash/ to .gitignore
This commit is contained in:
Mahi
2026-02-08 18:44:05 -04:00
parent 2c10cd5662
commit d9de183e51
171 changed files with 10236 additions and 8386 deletions

View File

@@ -853,15 +853,18 @@ export class DocumentUploadComponent {
readonly hashCopied = signal(false);
readonly documentTypes: { value: DocumentType; label: string; icon: string }[] = [
{ value: 'FIRE_SAFETY_CERTIFICATE', label: 'Fire Safety Certificate', icon: 'local_fire_department' },
{ value: 'BUILDING_PLAN', label: 'Building Plan', icon: 'apartment' },
{ value: 'PROPERTY_OWNERSHIP', label: 'Property Ownership', icon: 'home' },
{ value: 'INSPECTION_REPORT', label: 'Inspection Report', icon: 'fact_check' },
{ value: 'POLLUTION_CERTIFICATE', label: 'Pollution Certificate', icon: 'eco' },
{ value: 'ELECTRICAL_SAFETY_CERTIFICATE', label: 'Electrical Safety Certificate', icon: 'electrical_services' },
{ value: 'STRUCTURAL_STABILITY_CERTIFICATE', label: 'Structural Stability Certificate', icon: 'foundation' },
{ value: 'IDENTITY_PROOF', label: 'Identity Proof', icon: 'badge' },
{ value: 'ID_PROOF', label: 'Identity Proof', icon: 'badge' },
{ value: 'ADDRESS_PROOF', label: 'Address Proof', icon: 'location_on' },
{ value: 'FIRE_SAFETY', label: 'Fire Safety Certificate', icon: 'local_fire_department' },
{ value: 'FLOOR_PLAN', label: 'Floor Plan', icon: 'apartment' },
{ value: 'SITE_PLAN', label: 'Site Plan', icon: 'map' },
{ value: 'BUILDING_PERMIT', label: 'Building Permit', icon: 'home_work' },
{ value: 'BUSINESS_LICENSE', label: 'Business License', icon: 'storefront' },
{ value: 'PHOTOGRAPH', label: 'Photograph', icon: 'photo_camera' },
{ value: 'NOC', label: 'No Objection Certificate', icon: 'verified' },
{ value: 'LICENSE_COPY', label: 'License Copy', icon: 'file_copy' },
{ value: 'HEALTH_CERT', label: 'Health Certificate', icon: 'health_and_safety' },
{ value: 'TAX_CLEARANCE', label: 'Tax Clearance', icon: 'receipt_long' },
{ value: 'OTHER', label: 'Other Document', icon: 'description' },
];