This public repository builds a static, read-only Swagger UI portal for the Instagram, TikTok, YouTube, Likee, and Dzen API contracts. It publishes contract files, not API containers, and does not make any API publicly reachable. The viewer renders one selected contract at a time and deliberately disables Swagger UI's Try it out capability.
Python 3.12 is the supported build environment. Install the exporter and service dependencies, generate the specifications from a local source checkout, then validate and test:
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip install -r /path/to/electrolite/deploy/youtube-api/requirements.txt
python -m pip install -r /path/to/electrolite/deploy/likee-api/requirements.txt
python -m pip install -r /path/to/electrolite/deploy/dzen-api/requirements.txt
python -m pip install -r /path/to/electrolite-instagram-browser-api/requirements.txt
python -m pip install -r /path/to/electrolite/deploy/tiktok-browser-api/requirements.txt
python scripts/export_openapi.py --source-root /path/to/electrolite --instagram-source-root /path/to/electrolite-instagram-browser-api --output-dir site/specs
python scripts/validate_site.py --site site
python -m unittest discover -s tests -v
python -m http.server --directory site 8000The exporter loads every service in a separate Python process, blocks socket networking during imports and schema generation, calls only FastAPI's app.openapi(), and never enters an application lifespan. Output uses sorted, consistently indented JSON for deterministic diffs. It rejects non-OpenAPI-3 documents, empty path maps, and runtime servers URLs.
verify.yml runs export, portal validation, and local tests for portal changes. pages.yml performs the same build weekly or on manual dispatch, uploads only site/, and deploys it with the official GitHub Pages actions.
Both workflows check out the private source repositories inbev92/electrolite and inbev92/electrolite-instagram-browser-api with independent read-only deploy keys. Store their private halves in this repository as the Actions secrets ELECTROLITE_READ_KEY and INSTAGRAM_API_READ_KEY. Never print or commit either key. Checkout disables credential persistence, and workflow permissions are read-only except for the dedicated Pages deployment job's pages: write and id-token: write permissions.
GitHub Pages must be configured to use GitHub Actions as its build source. Publishing remains subject to the repository and organization Pages visibility settings.
The generated JSON contains no API keys, internal addresses, or runtime service URLs. The portal is a static contract reference and cannot send requests from Swagger UI. Closing the Dokploy aliases removes access to the live FastAPI /docs, /redoc, and /openapi.json endpoints; this portal continues to display the last generated static contracts without exposing those services.