feat: Add FaceAI integration with handoff and return functionality
- Introduced a new workspace for FaceAI in package.json. - Implemented FaceAI handoff logic in faceai_handoff.php, including identity verification and token signing. - Created faceai_return.php to handle return requests from FaceAI, validating tokens and forwarding results. - Developed faceai_simulator.php and faceai_simulator_view.php for simulating the FaceAI interface with demo photos. - Enhanced rus-ecom-240621.js to support new FaceAI features, including dynamic URL building and button integration. - Added faceai_config.php for configuration management, including environment variable handling and utility functions. - Updated HTML structure and styles in simulator view for better user experience.
This commit is contained in:
parent
f65a85dcc9
commit
da362c201f
31 changed files with 4511 additions and 60 deletions
34
faceai/docker-compose.yml
Normal file
34
faceai/docker-compose.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
services:
|
||||
faceai:
|
||||
image: node:20-alpine
|
||||
container_name: regalami-faceai
|
||||
working_dir: /app
|
||||
command: sh -c "npm run start --workspace @regalami/faceai-backend"
|
||||
environment:
|
||||
PORT: 3001
|
||||
FACEAI_FRONTEND_URL: http://localhost:3001
|
||||
FACEAI_PUBLIC_BASE_URL: http://localhost:3001
|
||||
FACEAI_LEGACY_RETURN_URL: http://localhost:8080/faceai_return.php
|
||||
FACEAI_ENABLE_LOCAL_LEGACY_STATIC: 1
|
||||
FACEAI_LOCAL_LEGACY_STATIC_ROOT: /legacy-www
|
||||
FACEAI_SHARED_SECRET: change-me
|
||||
FACEAI_SESSION_COOKIE: rus_faceai_session
|
||||
volumes:
|
||||
- .:/app
|
||||
- ../www:/legacy-www:ro
|
||||
ports:
|
||||
- "3001:3001"
|
||||
|
||||
legacy-php:
|
||||
image: php:8.3-apache
|
||||
container_name: regalami-legacy-php
|
||||
environment:
|
||||
FACEAI_BACKEND_INTERNAL_URL: http://faceai:3001
|
||||
FACEAI_FRONTEND_URL: http://localhost:3001
|
||||
FACEAI_SHARED_SECRET: change-me
|
||||
FACEAI_ALLOW_DEV_HANDOFF: 1
|
||||
FACEAI_IDENTITY_COOKIE: rus_faceai_identity
|
||||
volumes:
|
||||
- ../www:/var/www/html
|
||||
ports:
|
||||
- "8080:80"
|
||||
Loading…
Add table
Add a link
Reference in a new issue