How wasi-master/13ft works
Purpose and Entry Points
13 Feet Ladder is a self-hosted Python service that retrieves article pages through crawler-like and fallback fetch strategies, then presents content without typical paywall/ad barriers. Its primary application is a Flask app in app/portable.py; it can run directly, under Gunicorn, or in containers. A separate serverless entry point exists at api/index.py for Vercel-style deployment.
HTTP Application Layer
app/portable.py owns the user-facing HTTP interface: a landing/input flow and URL-addressable article retrieval (/<target-url>). It coordinates status/loading display, URL handling, content retrieval attempts, and rendering responses. app/gunicorn.conf.py supplies production-process configuration when launched with Gunicorn.
Retrieval and Bypass Pipeline
The central control flow is:
1. Browser submits or embeds a target article URL.
2. The app requests it while impersonating Googlebot, seeking indexable full-page content.
3. If the primary approach fails, it tries multiple source/fallback methods.
4. Retrieved content or a failure/status result is returned to the browser.
The upstream target publisher is the principal external dependency and trust boundary; its paywall, bot detection, availability, and markup determine success. Core implementation is concentrated in app/portable.py.
Presentation and Localization
The service serves a lightweight browser interface rather than a separate frontend application. Runtime locale selection is controlled through LOCALE; translation catalogs are JSON assets loaded by the application. Key paths: app/portable.py, app/locales/en.json, and app/locales/de.json (with additional language catalogs under app/locales/).
Deployment Shapes
The application supports local Python execution and production WSGI serving, with dependencies defined in app/requirements.txt. Containerized deployment is defined by Dockerfile and Compose manifests (docker-compose.yaml, docker-compose.dev.yaml), allowing the same service to run standalone or behind a reverse proxy. Root requirements.txt likely supports the Vercel/API deployment path alongside api/index.py.
Serverless Boundary
api/index.py is the platform-facing API handler for deployment configured by vercel.json. This creates a second runtime boundary from the Flask/Gunicorn path: Vercel invokes the API module, while conventional hosts invoke app/portable.py. Engineers changing retrieval behavior should verify whether logic is duplicated or delegated across these two entry points.
Build and Distribution
CI is defined in .github/workflows/build.yaml; published images are intended for Docker registries. The material runtime stack is Python + Flask/Gunicorn, optionally Docker/Compose, and optionally Vercel serverless infrastructure. No database, queue, authentication provider, or persistent storage is indicated by the repository structure.
Main entry points: portable.py Flask retrieval app · index.py Serverless API handler · Dockerfile Docker image · en.json Translation catalogs
Components 13
Application runtimes
- Flask retrieval app · Owns HTTP routes, retrieval orchestration, and response rendering.
app/portable.py - Translation catalogs · Loaded according to the LOCALE setting.
app/locales/en.json - Gunicorn · Production host for the Flask application.
app/gunicorn.conf.py - Serverless API handler · Platform-facing entry point separate from the Flask runtime.
api/index.py
Deployment paths
- Vercel platform
vercel.json - Direct Python run
app/portable.py - Docker image
Dockerfile - Compose deployment · Runs the service standalone or behind a reverse proxy.
docker-compose.yaml - App dependencies
app/requirements.txt - API dependencies
requirements.txt - Image build CI · Builds images for registry publication.
.github/workflows/build.yaml
Other components
- Browser · Submits article URLs and receives rendered results.
- Target publisher · Paywall, bot detection, availability, and markup affect retrieval.
Connections 14
- Browser → Flask retrieval app: submits target URL
- Flask retrieval app → Target publisher: Googlebot-like fetch, then fallbacks
- Target publisher → Flask retrieval app: article content or failure
- Flask retrieval app → Browser: renders content/status
- Translation catalogs → Flask retrieval app: localized UI text
- Gunicorn → Flask retrieval app: serves WSGI app
- Direct Python run → Flask retrieval app: runs directly
- Compose deployment → Docker image: runs
- Docker image → Flask retrieval app: hosts service
- App dependencies → Flask retrieval app: installs runtime packages
- Vercel platform → Serverless API handler: invokes
- API dependencies → Serverless API handler: installs API packages
- Serverless API handler → Target publisher: retrieval behavior may be delegated or duplicated
- Image build CI → Docker image: builds image