diff --git a/CHANGELOG.md b/CHANGELOG.md index 992e2bfd..bbcb78f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to - ✨(backend) add metadata collection of VAD, connection and chat events - ✨(backend) introduce add-ons authentication backend - 💬(backend) clarify french transcription audio download link text #1299 +- 🚧(addons) introduce initial Microsoft Outlook add-in support (alpha) ### Fixed diff --git a/bin/Tiltfile b/bin/Tiltfile index 693edef9..2ee909aa 100644 --- a/bin/Tiltfile +++ b/bin/Tiltfile @@ -34,10 +34,11 @@ docker_build( 'localhost:5001/meet-frontend-dinum:latest', context='..', dockerfile='../docker/dinum-frontend/Dockerfile', - only=['./src/frontend', './docker', './.dockerignore'], + only=['./src/frontend', './src/addons', './docker', './.dockerignore'], target = 'frontend-production', live_update=[ sync('../src/frontend', '/home/frontend'), + sync('../src/addons', '/home/addons'), ] ) clean_old_images('localhost:5001/meet-frontend-dinum') diff --git a/docker/dinum-frontend/Dockerfile b/docker/dinum-frontend/Dockerfile index 7e7a63c0..20e2b28e 100644 --- a/docker/dinum-frontend/Dockerfile +++ b/docker/dinum-frontend/Dockerfile @@ -38,6 +38,21 @@ COPY ./docker/dinum-frontend/assets/ \ COPY ./docker/dinum-frontend/fonts/ \ ./dist/assets/fonts/ +# ---- Addons builder image ---- +FROM node:20-alpine AS addons-builder + +WORKDIR /home/addons/outlook + +COPY ./src/addons/outlook/package.json ./package.json +COPY ./src/addons/outlook/package-lock.json ./package-lock.json + +RUN npm ci + +COPY ./src/addons/outlook/ . + +RUN npx webpack --mode production + + # ---- Front-end image ---- FROM nginxinc/nginx-unprivileged:alpine3.23 AS frontend-production @@ -60,7 +75,11 @@ COPY --from=meet-builder \ /home/frontend/dist \ /usr/share/nginx/html -COPY ./src/frontend/default.conf /etc/nginx/conf.d +COPY --from=addons-builder \ + /home/addons/outlook/dist \ + /usr/share/nginx/html/addons/outlook + +COPY ./docker/dinum-frontend/nginx/dinum.conf /etc/nginx/conf.d COPY ./docker/files/usr/local/bin/entrypoint /usr/local/bin/entrypoint ENTRYPOINT [ "/usr/local/bin/entrypoint" ] diff --git a/docker/dinum-frontend/nginx/dinum.conf b/docker/dinum-frontend/nginx/dinum.conf new file mode 100644 index 00000000..6ef89f00 --- /dev/null +++ b/docker/dinum-frontend/nginx/dinum.conf @@ -0,0 +1,76 @@ +server { + listen 8080; + server_name localhost; + server_tokens off; + + root /usr/share/nginx/html; + + include /etc/nginx/extra/*.conf; + + location = /.well-known/windows-app-web-link { + default_type application/json; + alias /usr/share/nginx/html/.well-known/windows-app-web-link; + add_header Content-Disposition "attachment; filename=windows-app-web-link"; + } + + # Manifest — fetched, never iframed + location = /addons/outlook/manifest.xml { + alias /usr/share/nginx/html/addons/outlook/manifest.xml; + + add_header Access-Control-Allow-Origin "*"; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header X-Frame-Options "DENY"; + add_header Content-Security-Policy "frame-ancestors 'none'"; + } + + location ~* ^/addons/outlook/assets/.+\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + alias /usr/share/nginx/html/addons/outlook/assets/; + expires 30d; + add_header Cache-Control "public, max-age=2592000, immutable" always; + add_header Access-Control-Allow-Origin "*"; + add_header Vary "Origin" always; + } + + location ~ ^/addons/outlook(/.*)?$ { + alias /usr/share/nginx/html/addons/outlook$1; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache" always; + add_header Expires 0 always; + + set $ms_domains "https://*.live.com https://*.office.com https://*.microsoft.com https://*.office365.com https://*.sharepoint.com"; + + set $nonce $request_id; + + set $csp "upgrade-insecure-requests; "; + set $csp "${csp}frame-ancestors ${ms_domains}; "; + set $csp "${csp}script-src 'nonce-${nonce}' 'strict-dynamic'; "; + set $csp "${csp}connect-src 'self' ${ms_domains}; "; + set $csp "${csp}frame-src 'none'; "; + set $csp "${csp}object-src 'none'; "; + set $csp "${csp}base-uri 'none'; "; + + add_header Content-Security-Policy $csp; + + sub_filter 'NONCE_PLACEHOLDER' $nonce; + sub_filter_once off; + sub_filter_types text/html; + } + + # Serve static files with caching + location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 30d; + add_header Cache-Control "public, max-age=2592000"; + } + + # Serve static files + location / { + try_files $uri $uri/ /index.html; + # Add no-cache headers + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; # HTTP 1.0 header for backward compatibility + add_header Expires 0; + } + + # Optionally, handle 404 errors by redirecting to index.html + error_page 404 =200 /index.html; +} diff --git a/src/addons/outlook/.eslintrc.json b/src/addons/outlook/.eslintrc.json new file mode 100644 index 00000000..e406c09e --- /dev/null +++ b/src/addons/outlook/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "plugins": [ + "office-addins" + ], + "extends": [ + "plugin:office-addins/recommended" + ] +} diff --git a/src/addons/outlook/assets/add-16.png b/src/addons/outlook/assets/add-16.png new file mode 100644 index 00000000..e4e42729 Binary files /dev/null and b/src/addons/outlook/assets/add-16.png differ diff --git a/src/addons/outlook/assets/add-32.png b/src/addons/outlook/assets/add-32.png new file mode 100644 index 00000000..6763370b Binary files /dev/null and b/src/addons/outlook/assets/add-32.png differ diff --git a/src/addons/outlook/assets/add-80.png b/src/addons/outlook/assets/add-80.png new file mode 100644 index 00000000..de727501 Binary files /dev/null and b/src/addons/outlook/assets/add-80.png differ diff --git a/src/addons/outlook/assets/icon-128.png b/src/addons/outlook/assets/icon-128.png new file mode 100644 index 00000000..681e39f6 Binary files /dev/null and b/src/addons/outlook/assets/icon-128.png differ diff --git a/src/addons/outlook/assets/icon-16.png b/src/addons/outlook/assets/icon-16.png new file mode 100644 index 00000000..06607509 Binary files /dev/null and b/src/addons/outlook/assets/icon-16.png differ diff --git a/src/addons/outlook/assets/icon-32.png b/src/addons/outlook/assets/icon-32.png new file mode 100644 index 00000000..5b167f3f Binary files /dev/null and b/src/addons/outlook/assets/icon-32.png differ diff --git a/src/addons/outlook/assets/icon-64.png b/src/addons/outlook/assets/icon-64.png new file mode 100644 index 00000000..e9a940b5 Binary files /dev/null and b/src/addons/outlook/assets/icon-64.png differ diff --git a/src/addons/outlook/assets/icon-80.png b/src/addons/outlook/assets/icon-80.png new file mode 100644 index 00000000..d36d960c Binary files /dev/null and b/src/addons/outlook/assets/icon-80.png differ diff --git a/src/addons/outlook/assets/logo-filled.png b/src/addons/outlook/assets/logo-filled.png new file mode 100644 index 00000000..756353cd Binary files /dev/null and b/src/addons/outlook/assets/logo-filled.png differ diff --git a/src/addons/outlook/assets/settings-16.png b/src/addons/outlook/assets/settings-16.png new file mode 100644 index 00000000..58c5a7f8 Binary files /dev/null and b/src/addons/outlook/assets/settings-16.png differ diff --git a/src/addons/outlook/assets/settings-32.png b/src/addons/outlook/assets/settings-32.png new file mode 100644 index 00000000..08159045 Binary files /dev/null and b/src/addons/outlook/assets/settings-32.png differ diff --git a/src/addons/outlook/assets/settings-80.png b/src/addons/outlook/assets/settings-80.png new file mode 100644 index 00000000..a89cdfa2 Binary files /dev/null and b/src/addons/outlook/assets/settings-80.png differ diff --git a/src/addons/outlook/babel.config.json b/src/addons/outlook/babel.config.json new file mode 100644 index 00000000..8e1f40ec --- /dev/null +++ b/src/addons/outlook/babel.config.json @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "esmodules": false + } + } + ], + ] +} diff --git a/src/addons/outlook/manifest.xml b/src/addons/outlook/manifest.xml new file mode 100644 index 00000000..3188df49 --- /dev/null +++ b/src/addons/outlook/manifest.xml @@ -0,0 +1,190 @@ + + + a025f0f6-757a-4790-97f3-99c66c4a5795 + 0.0.1.0 + __APP_NAME__ + fr-FR + + + + + + + https://localhost:3000/ + + + + + + + + + + +
+ + + 250 + +
+
+ + + +
+
+ ReadWriteItem + + + + + + false + + + + + + + + + + + + + + + +