No description
Find a file
Vadym Samoilenko 86df16fc78 Make MAILGUN vars optional in deploy.sh validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 19:43:21 +00:00
server Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
.dockerignore Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
.gitignore Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
auth.js Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
config.json Add SLA Calculator web app 2026-03-06 15:01:40 +00:00
deploy.sh Make MAILGUN vars optional in deploy.sh validation 2026-03-10 19:43:21 +00:00
docker-compose.yml Move .env to /opt/loreal-sla-calculator/server/.env 2026-03-10 19:32:32 +00:00
Dockerfile Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
index.html Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
package.json Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00
README.md Update README with full project documentation 2026-03-06 15:05:20 +00:00
script.js Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment 2026-03-10 19:27:44 +00:00

SLA Calculator

A web-based SLA (Service Level Agreement) calculator for the eCom Content Factory. Replaces the Excel-based workflow with a 4-step wizard that PMs use to estimate project timelines and determine if deadlines can be met.

How It Works

  1. Select Brief Type - Choose from 9 brief types (Country Pull, Global Push, Local Push, etc.). The app auto-populates which of the 8 project stages apply.
  2. Configure Stages - Toggle stages on/off, set complexity levels, asset volumes, revision rounds, and market approval days.
  3. Enter Dates - Set the project kick-off date and required go-live date.
  4. View Results - See the full timeline breakdown, key dates per stage, and a clear Y/N verdict on whether the deadline can be met.

Project Structure

index.html    - UI (Tailwind CSS, Flatpickr date pickers, 4-step wizard)
script.js     - Calculation engine, form dynamics, PDF + iCal export
config.json   - All business rules (zero hard-coded logic in JS)

Editing Business Rules

All assumptions, stage definitions, complexity levels, cross-reference tables, tooltips, and default values live in config.json. Non-developers can edit this file to update:

  • Brief types and stage matrix - Which stages apply to which brief type
  • Production cross-reference table - Days by complexity x asset volume
  • Syndication cross-reference table - Days by complexity x EAN volume
  • Translation word count ranges - Days by word count bucket
  • Opera Upload days - Days by asset volume
  • Default values - Revision rounds, market approval days, revision days per round
  • Tooltips and descriptions - Help text shown to PMs in the UI
  • Syndication buffer - Currently 10 business days (configurable)

Key Calculation Logic

  • Uses business days (Monday-Friday), not calendar days
  • Each active stage adds: Handover (1 day) + WIP days + Market Approval days + (Revision Days x Rounds)
  • Production speed-up: PM can reduce WIP days by a percentage (e.g., 50% cuts 10 days to 5)
  • Syndication buffer: When syndication is active, a 10 business-day buffer is added to the suggested go-live date
  • Stages 4 & 5 (Translation PDP + Asset) run in parallel and share one set of inputs

Features

  • Dark mode toggle (persists to localStorage)
  • Mobile responsive layout
  • Export to PDF (landscape A4)
  • Export to iCal (.ics) with key milestone dates for Outlook/Google Calendar
  • Real-time calculation on every input change
  • Tooltips matching the original Excel comments

Running Locally

Open index.html in a browser, or serve with any static file server:

npx serve -l 8080

Then visit http://localhost:8080.

Dependencies (via CDN)

No build step required. No npm install needed.

Deployment

This is a fully static site (HTML + JS + JSON). Deploy to any static hosting:

  • Netlify - Drag & drop or connect this repo
  • Vercel - Connect this repo for auto-deploy
  • SharePoint - Upload files directly
  • Azure Static Web Apps - Free tier

Verified Against Excel

The calculator has been verified against the original Excel workbook example:

Input Value
Brief Type Country Pull - Simple
Active Stages Production + Opera Upload
Production Simple / 50-100 Assets / 0 revisions / 50% speedup
Kick-off 6 Mar 2026
Go-Live 9 Mar 2026
Output Value
Production Complete 16 Mar
Opera Upload Complete 19 Mar
Verdict N (cannot meet deadline)