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,2 @@
from .adapter import adapter
from .config import CONFIG

View file

@ -0,0 +1,119 @@
"""Delaware — Division of Corporations portal automation."""
from __future__ import annotations
from scripts.formation.base import StatePortal, NameSearchResult, FormationOrder, FilingResult, FilingStatus
from .config import CONFIG
class DEPortal(StatePortal):
STATE_CODE = "DE"
STATE_NAME = "Delaware"
PORTAL_NAME = CONFIG["portal_name"]
PORTAL_URL = CONFIG["portal_url"]
NWRA_ADDRESS = CONFIG["nwra_address"]
NWRA_CITY = CONFIG["nwra_city"]
NWRA_STATE = CONFIG["nwra_state"]
NWRA_ZIP = CONFIG["nwra_zip"]
async def search_name(self, name: str) -> NameSearchResult:
"""Search Delaware business name availability."""
try:
page = await self.start_browser()
await page.goto(CONFIG["name_search_url"])
await self.human_delay()
# Type name into search field
sel = CONFIG["selectors"]
if sel["name_search_input"]:
await self.type_slowly(sel["name_search_input"], name)
await self.safe_click(sel["name_search_submit"])
await page.wait_for_load_state("networkidle")
content = await page.content()
available = CONFIG["selectors"]["name_unavailable_indicator"] not in content
return NameSearchResult(
available=available,
state_code=self.STATE_CODE,
searched_name=name,
raw_response=content[:2000],
)
return NameSearchResult(
available=False,
state_code=self.STATE_CODE,
searched_name=name,
raw_response="Selectors not yet configured for this state",
)
except Exception as e:
self.log.error("Name search failed: %s", e)
return NameSearchResult(
available=False,
state_code=self.STATE_CODE,
searched_name=name,
raw_response=str(e),
)
finally:
await self.close_browser()
async def file_llc(self, order: FormationOrder) -> FilingResult:
"""File LLC in Delaware."""
try:
page = await self.start_browser()
await page.goto(CONFIG["filing_url"])
await self.human_delay()
await self.screenshot("llc_start")
# TODO: Implement Delaware-specific LLC filing flow
# Each state's portal has different form fields, steps, and workflows.
# The selectors in config.py need to be populated by inspecting the portal.
# NOTE: Delaware imposes an annual franchise tax of $300/yr for LLCs.
return FilingResult(
success=False,
status=FilingStatus.ERROR,
state_code=self.STATE_CODE,
entity_name=order.entity_name,
error_message="LLC filing automation not yet implemented for Delaware",
screenshot_path=await self.screenshot("llc_not_implemented"),
)
except Exception as e:
self.log.error("LLC filing failed: %s", e)
return FilingResult(
success=False,
status=FilingStatus.ERROR,
state_code=self.STATE_CODE,
entity_name=order.entity_name,
error_message=str(e),
)
finally:
await self.close_browser()
async def file_corporation(self, order: FormationOrder) -> FilingResult:
"""File Corporation in Delaware."""
try:
page = await self.start_browser()
await page.goto(CONFIG["filing_url"])
await self.human_delay()
return FilingResult(
success=False,
status=FilingStatus.ERROR,
state_code=self.STATE_CODE,
entity_name=order.entity_name,
error_message="Corporation filing automation not yet implemented for Delaware",
)
except Exception as e:
return FilingResult(
success=False,
status=FilingStatus.ERROR,
state_code=self.STATE_CODE,
entity_name=order.entity_name,
error_message=str(e),
)
finally:
await self.close_browser()
def adapter() -> DEPortal:
return DEPortal()

View file

@ -0,0 +1,68 @@
"""Delaware — Division of Corporations portal configuration."""
CONFIG = {
"state_code": "DE",
"state_name": "Delaware",
"sos_name": "Delaware Division of Corporations",
"portal_name": "Delaware ICIS Entity Search",
"portal_url": "https://corp.delaware.gov",
"name_search_url": "https://icis.corp.delaware.gov/ecorp/entitysearch/namesearch.aspx",
"filing_url": "https://icis.corp.delaware.gov/ecorp/entitysearch",
"search_method": "playwright",
# Socrata API (not applicable)
"socrata_domain": "",
"socrata_dataset_id": "",
# NW Registered Agent address in this state
"nwra_name": "Northwest Registered Agent LLC",
"nwra_address": "8 The Green Ste A",
"nwra_city": "Dover",
"nwra_state": "DE",
"nwra_zip": "19901",
# State fees (cents)
"llc_formation_fee": 11000,
"corp_formation_fee": 8900,
"expedited_fee": 50000,
"expedited_label": "24-hour",
# VERIFIED selectors from live portal HTML (2026-03-19)
"selectors": {
# Name search (namesearch.aspx) — ASP.NET WebForms with __VIEWSTATE
"name_search_input": "#ctl00_ContentPlaceHolder1_frmEntityName",
"file_number_input": "#ctl00_ContentPlaceHolder1_frmFileNumber",
"name_search_submit": "#ctl00_ContentPlaceHolder1_btnSubmit",
"error_label": "#ctl00_ContentPlaceHolder1_lblError",
"error_message": "#ctl00_ContentPlaceHolder1_lblErrorMessage",
"name_results_table": "#tblResults",
"name_available_indicator": "", # No results = name available
"name_unavailable_indicator": "", # Results present = name taken
# CAPTCHA
"captcha_panel": "#ctl00_ContentPlaceHolder1_pnlCaptcha",
"captcha_image_base": "/Ecorp/CaptchaHandler.ashx?type=image&key=",
# Honeypot field (hidden)
"honeypot_field": "input[name='email_confirm']",
# LLC filing form selectors — NOT YET VERIFIED (requires active filing session)
"llc_name_field": "",
"llc_agent_name_field": "",
"llc_agent_address_field": "",
"llc_principal_address_field": "",
"llc_organizer_name_field": "",
"llc_management_type_select": "",
"llc_purpose_field": "",
"llc_submit_button": "",
# Corp filing form selectors
"corp_name_field": "",
"corp_agent_name_field": "",
"corp_shares_field": "",
"corp_submit_button": "",
},
"notes": (
"Delaware imposes an annual franchise tax of $300/yr for LLCs. "
"CRITICAL: Name search has CAPTCHA on every request (image-based, in pnlCaptcha div). "
"Anti-scraping warning on portal: 'The Division of Corporations strictly prohibits mining data. "
"Use of automated tools in any form may result in the suspension of your access.' "
"Need 2captcha or anticaptcha integration for automated name search. "
"Portal uses ASP.NET WebForms with __VIEWSTATE — must maintain session cookies. "
"Hidden honeypot field 'email_confirm' must be left empty. "
"JavaScript cookie 'js_token' set via btoa(Date.now()) required. "
"$5,000 for 1-hour rush, $1,000 for same-day, $500 for 24-hour."
),
}