CoolFace
Apppublic

Alph4Centauri/email-summerization-ui

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

๐Ÿ“ง Email Summarizer Office Add-in Frontend

This is the frontend component of the Email Summarizer Office Add-in. It serves the static files (HTML, JavaScript, CSS) that make up the user interface for the Outlook add-in.

๐Ÿ—๏ธ Architecture

This is part of a two-space architecture:

  1. 1.Frontend Space (This Space) - Serves Office add-in UI files
  2. 2.taskpane.html - Main UI
  3. 3.taskpane.js - Business logic
  4. 4.manifest.xml - Office add-in configuration
  5. 5.Runs on CPU basic (free tier)
  1. 1.Backend Space - AI summarization API
  2. 2.Flask API with BART model
  3. 3.Handles email/attachment processing
  4. 4.Requires GPU tier for model inference

๐Ÿ”ง Configuration Required

1. Update Backend URL

Edit taskpane.js and replace:

javascript

API_BASE_URL: 'https://alph4Centauri-email-summarization-api.hf.space'

With your actual backend space URL.

2. Update Manifest URLs

Edit manifest.xml and replace all instances of:

xml
https://marco31-EmailParserUI.hf.space
https://alph4Centauri-email-summarization-api.hf.space

With your actual space URLs.

๐Ÿ“ฑ Office Add-in Installation

Development Installation

  1. 1.Download the manifest.xml file from this space
  2. 2.In Outlook, go to Get Add-ins โ†’ My Add-ins โ†’ Custom Add-ins
  3. 3.Choose Add from file and upload the manifest.xml
  4. 4.The add-in will appear in Outlook's ribbon

Production Installation

  1. 1.Upload manifest.xml to your organization's add-in catalog
  2. 2.Deploy through Microsoft 365 admin center
  3. 3.Users will see it in their Outlook automatically

๐ŸŒ Files Served

FilePurposeURL Path
taskpane.htmlMain add-in UI/taskpane.html
taskpane.jsFrontend logic/taskpane.js
commands.jsRibbon commands/commands.js
manifest.xmlAdd-in configuration/manifest.xml
nginx.confWeb server configInternal

๐Ÿ” CORS & Security

The nginx configuration includes:

  • โ€”CORS headers for Office domains
  • โ€”Security headers (X-Frame-Options, etc.)
  • โ€”Proper MIME types for Office files
  • โ€”Gzip compression

๐Ÿงช Testing Your Frontend

1. Check Files Load

  • โ€”Visit https://marco31-EmailParserUI.hf.space/taskpane.html
  • โ€”Should show the Email Summarizer interface

2. Check Manifest

  • โ€”Visit https://marco31-EmailParserUI.hf.space/manifest.xml
  • โ€”Should download the XML file

3. Test in Outlook

  • โ€”Install the add-in using the manifest
  • โ€”Open an email and click the "Summarize" button
  • โ€”Should show your task pane

๐Ÿšจ Common Issues

Frontend Won't Load

  • โ€”Check that all URLs in manifest.xml are correct
  • โ€”Ensure this space is Running status
  • โ€”Verify nginx configuration is correct

Add-in Won't Install

  • โ€”Check manifest.xml syntax with Office Add-in Validator
  • โ€”Ensure all URLs in manifest are HTTPS
  • โ€”Verify the add-in ID is unique

Can't Connect to Backend

  • โ€”Update API_BASE_URL in taskpane.js
  • โ€”Check backend space is running
  • โ€”Verify CORS settings allow frontend domain

๐Ÿ“ˆ Monitoring

Check these endpoints to verify everything works:

  • โ€”https://marco31-EmailParserUI.hf.space/taskpane.html - UI loads
  • โ€”https://marco31-EmailParserUI.hf.space/manifest.xml - Manifest downloads
  • โ€”Backend health: https://marco31-EmailParserUI.hf.space/health - API status

๐Ÿ”„ Updates

To update the frontend:

  1. 1.Edit the files in this space
  2. 2.Frontend will auto-update (no Office restart needed)
  3. 3.Users may need to refresh their task pane

To update the backend:

  1. 1.Update backend space separately
  2. 2.No frontend changes needed (unless API changes)

๐Ÿ’ก Cost Optimization

This frontend space can run on:

  • โ€”CPU basic (free) - Perfect for static file serving
  • โ€”No GPU needed
  • โ€”Minimal resource usage

Total cost = Backend space cost only!

๐Ÿ”— Related Links

๐Ÿ“ž Support

For issues:

  1. 1.Check browser console for JavaScript errors
  2. 2.Verify all URLs are correct in manifest.xml and taskpane.js
  3. 3.Test backend API directly via health endpoint
  4. 4.Check Office add-in logs in Outlook

Ready to use! Just update the URLs and install the manifest in Outlook.