Initial commit — Performance West telecom compliance platform

Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-04-27 06:54:22 -05:00
commit f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions

View file

@ -0,0 +1,60 @@
/**
* Content script for FCC CORES (apps.fcc.gov/coresWeb/*)
*
* Injects a guidance overlay when on the CORES user management pages
* to help the client add filings@performancewest.net as an authorized user.
*/
(function() {
'use strict';
const PW_EMAIL = 'filings@performancewest.net';
// Only inject on relevant pages
const url = window.location.href.toLowerCase();
if (!url.includes('coresweb') && !url.includes('cores')) return;
// Wait for page to load
setTimeout(injectGuidance, 2000);
function injectGuidance() {
// Look for user management forms or "Add User" buttons
const addUserBtn = document.querySelector('input[value*="Add"], button:contains("Add User"), a[href*="addUser"]');
const emailFields = document.querySelectorAll('input[type="text"][name*="email"], input[type="email"]');
// Inject floating helper banner
const banner = document.createElement('div');
banner.id = 'pw-cores-helper';
banner.innerHTML = `
<div style="position:fixed;bottom:20px;right:20px;z-index:99999;background:#1e3a5f;color:white;padding:16px 20px;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.2);max-width:320px;font-family:-apple-system,sans-serif;">
<div style="display:flex;justify-content:space-between;align-items:start;">
<strong style="font-size:13px;">Performance West Helper</strong>
<button id="pw-close" style="background:none;border:none;color:#94a3b8;cursor:pointer;font-size:18px;line-height:1;">&times;</button>
</div>
<p style="font-size:11px;color:#94a3b8;margin:8px 0;">Add this email as an authorized user on your FRN:</p>
<div style="background:#2d4a73;padding:8px 12px;border-radius:6px;font-family:monospace;font-size:13px;cursor:pointer;user-select:all;" id="pw-email-copy">${PW_EMAIL}</div>
<p style="font-size:10px;color:#64748b;margin-top:8px;">Click the email to copy. Then paste it into the "Add User" form above.</p>
</div>
`;
document.body.appendChild(banner);
// Close button
document.getElementById('pw-close')?.addEventListener('click', () => banner.remove());
// Copy on click
document.getElementById('pw-email-copy')?.addEventListener('click', () => {
navigator.clipboard.writeText(PW_EMAIL).then(() => {
const el = document.getElementById('pw-email-copy');
if (el) { el.textContent = 'Copied!'; setTimeout(() => el.textContent = PW_EMAIL, 1500); }
});
});
// Auto-fill email fields if empty
emailFields.forEach(field => {
if (!field.value) {
field.value = PW_EMAIL;
field.style.backgroundColor = '#eff6ff';
field.style.borderColor = '#93c5fd';
}
});
}
})();

View file

@ -0,0 +1,4 @@
/* Highlight email fields that PW helper auto-filled */
input[style*="background-color: rgb(239, 246, 255)"] {
transition: border-color 0.3s ease;
}

View file

@ -0,0 +1,53 @@
/**
* Content script for USAC E-File (forms.universalservice.org)
*
* Injects a guidance overlay when on the USAC access management pages
* to help the client grant filing access to filings@performancewest.net.
*/
(function() {
'use strict';
const PW_EMAIL = 'filings@performancewest.net';
// Wait for page to load
setTimeout(injectGuidance, 2000);
function injectGuidance() {
// Look for access management or user forms
const emailFields = document.querySelectorAll('input[type="text"][name*="email"], input[type="email"], input[name*="user"]');
// Inject floating helper banner
const banner = document.createElement('div');
banner.id = 'pw-usac-helper';
banner.innerHTML = `
<div style="position:fixed;bottom:20px;right:20px;z-index:99999;background:#1e3a5f;color:white;padding:16px 20px;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.2);max-width:320px;font-family:-apple-system,sans-serif;">
<div style="display:flex;justify-content:space-between;align-items:start;">
<strong style="font-size:13px;">Performance West Helper</strong>
<button id="pw-close-usac" style="background:none;border:none;color:#94a3b8;cursor:pointer;font-size:18px;line-height:1;">&times;</button>
</div>
<p style="font-size:11px;color:#94a3b8;margin:8px 0;">Grant filing access to this email for your 499 Filer ID:</p>
<div style="background:#2d4a73;padding:8px 12px;border-radius:6px;font-family:monospace;font-size:13px;cursor:pointer;user-select:all;" id="pw-email-copy-usac">${PW_EMAIL}</div>
<p style="font-size:10px;color:#64748b;margin-top:8px;">Click to copy. Navigate to "Manage Users" or "Authorized Contacts" and add this email with filing permissions.</p>
</div>
`;
document.body.appendChild(banner);
document.getElementById('pw-close-usac')?.addEventListener('click', () => banner.remove());
document.getElementById('pw-email-copy-usac')?.addEventListener('click', () => {
navigator.clipboard.writeText(PW_EMAIL).then(() => {
const el = document.getElementById('pw-email-copy-usac');
if (el) { el.textContent = 'Copied!'; setTimeout(() => el.textContent = PW_EMAIL, 1500); }
});
});
// Auto-fill email fields if empty
emailFields.forEach(field => {
if (!field.value) {
field.value = PW_EMAIL;
field.style.backgroundColor = '#eff6ff';
field.style.borderColor = '#93c5fd';
}
});
}
})();

View file

@ -0,0 +1,36 @@
{
"manifest_version": 3,
"name": "PW FCC Access Helper",
"version": "1.0.0",
"description": "Guides you through granting Performance West access to your FCC CORES and USAC E-File accounts for 499-A filing.",
"permissions": ["activeTab"],
"host_permissions": [
"https://apps.fcc.gov/*",
"https://forms.universalservice.org/*"
],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
},
"content_scripts": [
{
"matches": ["https://apps.fcc.gov/coresWeb/*"],
"js": ["content-cores.js"],
"css": ["content-style.css"]
},
{
"matches": ["https://forms.universalservice.org/*"],
"js": ["content-usac.js"],
"css": ["content-style.css"]
}
],
"icons": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
}

View file

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { width: 340px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a1a2e; padding: 16px; }
.header { text-align: center; margin-bottom: 16px; }
.header h1 { font-size: 15px; font-weight: 700; color: #1e3a5f; }
.header p { font-size: 11px; color: #666; margin-top: 4px; }
.step { background: #f8f9fa; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.step.active { background: #eff6ff; border-color: #93c5fd; }
.step.done { background: #f0fdf4; border-color: #86efac; }
.step-header { display: flex; align-items: center; gap: 8px; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: #cbd5e1; color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step.active .step-num { background: #2563eb; }
.step.done .step-num { background: #22c55e; }
.step-title { font-size: 13px; font-weight: 600; }
.step-desc { font-size: 11px; color: #64748b; margin-top: 4px; margin-left: 30px; }
.step-action { margin-top: 8px; margin-left: 30px; }
.btn { display: inline-block; padding: 6px 14px; background: #1e3a5f; color: white; font-size: 11px; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #2d4a73; }
.email-box { background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 12px; margin-top: 8px; margin-left: 30px; font-family: monospace; font-size: 12px; color: #1e3a5f; user-select: all; }
.footer { text-align: center; margin-top: 12px; font-size: 10px; color: #94a3b8; }
.footer a { color: #1e3a5f; text-decoration: none; }
</style>
</head>
<body>
<div class="header">
<h1>Performance West</h1>
<p>FCC Access Setup Helper</p>
</div>
<div class="step active" id="step-1">
<div class="step-header">
<span class="step-num">1</span>
<span class="step-title">FCC CORES — Add Authorized User</span>
</div>
<p class="step-desc">Log into FCC CORES and add our email as an authorized user on your FRN.</p>
<div class="step-action">
<a href="https://apps.fcc.gov/coresWeb/publicHome.do" target="_blank" class="btn">Open FCC CORES</a>
</div>
<div class="email-box" id="email-cores">filings@performancewest.net</div>
</div>
<div class="step" id="step-2">
<div class="step-header">
<span class="step-num">2</span>
<span class="step-title">USAC E-File — Grant Filing Access</span>
</div>
<p class="step-desc">Log into USAC E-File and add our account as an authorized filer for your 499 ID.</p>
<div class="step-action">
<a href="https://forms.universalservice.org" target="_blank" class="btn">Open USAC E-File</a>
</div>
<div class="email-box" id="email-usac">filings@performancewest.net</div>
</div>
<div class="step" id="step-3">
<div class="step-header">
<span class="step-num">3</span>
<span class="step-title">Notify Us</span>
</div>
<p class="step-desc">Once both accounts are set up, let us know so we can begin your filing.</p>
<div class="step-action">
<a href="https://performancewest.net/contact" target="_blank" class="btn">Contact Us</a>
</div>
</div>
<div class="footer">
<a href="https://performancewest.net/services/telecom/fcc-499a">Learn more about our 499-A filing service</a>
</div>
<script src="popup.js"></script>
</body>
</html>

View file

@ -0,0 +1,13 @@
// Copy email to clipboard on click
document.querySelectorAll('.email-box').forEach(el => {
el.style.cursor = 'pointer';
el.title = 'Click to copy';
el.addEventListener('click', () => {
navigator.clipboard.writeText('filings@performancewest.net').then(() => {
const orig = el.textContent;
el.textContent = 'Copied!';
el.style.color = '#22c55e';
setTimeout(() => { el.textContent = orig; el.style.color = '#1e3a5f'; }, 1500);
});
});
});