# 🔬 FUTBin Complete Technical Architecture, Stack, Endpoints & DNS Reverse Engineering

> **Ecosystem:** `@aphrody/fut` — BXC Monorepo  
> **Target:** `https://www.futbin.com`  
> **Investigation Date:** September 2026 (EA SPORTS FC 27 Season)  
> **Status:** Verified Live via BXC Impersonated Prober

---

## 1. Executive Summary & Technology Stack

FUTBin is the historic market leader in Ultimate Team data, running a mature, highly optimized monolithic PHP/Laravel SSR infrastructure protected by Cloudflare Turnstile.

```mermaid
flowchart TD
    subgraph Client ["Client Browser"]
        HTML["PHP Blade SSR HTML"]
        UI["Bootstrap 4/5 + jQuery 3.6"]
        CHARTS["Highcharts / Chart.js"]
    end

    subgraph Edge ["Edge & CDN Layer (Cloudflare)"]
        CF_DNS["Cloudflare Anycast DNS"]
        TURNSTILE["Cloudflare Turnstile (Managed Challenge)"]
        CF_CACHE["Cloudflare Cache / Tiered Cache"]
    end

    subgraph Backend ["FUTBin Origin Infrastructure"]
        NGINX["Nginx Web Servers (Reverse Proxy)"]
        FPM["PHP-FPM Cluster (Laravel / Custom Framework)"]
        REDIS["Redis In-Memory Key-Value (Live Market Prices)"]
        MARIA["MariaDB / MySQL Cluster (Master-Slave Replication)"]
        WORKERS["EA Market Auction Harvesters (Node/Python Bots)"]
    end

    Client -->|HTTP/2| CF_DNS
    CF_DNS --> TURNSTILE
    TURNSTILE -->|Valid Clearance Cookie| CF_CACHE
    CF_CACHE -->|Cache Miss| NGINX
    NGINX --> FPM
    FPM --> REDIS
    FPM --> MARIA
    WORKERS -->|Real-time UTAS Auctions| REDIS
```

### 1.1 Stack Breakdown

| Layer | Technology | Details / Versions |
| :--- | :--- | :--- |
| **Backend Runtime** | PHP 8.2+ (PHP-FPM) | Laravel / Blade SSR engine |
| **Frontend Libraries** | jQuery 3.6 + Bootstrap 5 | Standard SSR markup with `id="flat-prices"`, `pcdisplay-*` classes |
| **Data Visualizations** | Highcharts / Chart.js | Daily and hourly market price graphs |
| **Database** | MariaDB / MySQL 8 | Relational schema storing players, historical prices, and squads |
| **In-Memory Cache** | Redis Cluster | Ultra-fast key-value store for live card prices and SBC costs |
| **Edge Protection** | Cloudflare Enterprise + Turnstile | `cf-mitigated: challenge`, `__cf_bm`, `cf_clearance` cookies |
| **Harvester Fleet** | Crowdsourced + Headless Workers | Import extension + dedicated Web App automated sessions |

---

## 2. DNS Infrastructure & Network Topology

### 2.1 Host Registry & Anycast IP Routing

| Hostname | Role | IP / Anycast Routing | CDN / Edge |
| :--- | :--- | :--- | :--- |
| `futbin.com` | Root Apex Domain | `104.16.242.69`, `104.16.243.69`, `104.16.244.69`, `104.16.245.69`, `104.16.246.69` | Cloudflare |
| `www.futbin.com` | Main User-Facing Portal | `104.16.242.69`, `104.16.243.69`, `104.16.244.69`, `104.16.245.69`, `104.16.246.69` | Cloudflare |
| `cdn.futbin.com` | Static Assets (CSS, JS, Fonts) | `104.16.242.69`, `104.16.245.69` | Cloudflare Edge |

### 2.2 Live Headers & Protection Behavior

Standard curl without browser TLS fingerprinting receives:
```http
HTTP/2 403 Forbidden
date: Thu, 17 Sep 2026 09:15:15 GMT
content-type: text/html; charset=UTF-8
cf-mitigated: challenge
server: cloudflare
cf-ray: a3c7015e3fabafb4-ATL
```

**BXC Bypass Protocol**:
BXC solves this transparently using `ImpersonatedClient` with `profile: "chrome131"`, which emulates Chrome's exact TLS Client Hello and HTTP/2 SETTINGS frame, combined with our stored session cookies (`packages/fut/src/cookies/futbin.json`).

---

## 3. Complete Catalog of FUTBin Endpoints

### 3.1 Live Pricing & Autocomplete Endpoints
- `GET https://www.futbin.com/search?year=27&term=:query`  
  Returns JSON array of matching players with `id`, `name`, `rating`, `version`.
- `GET https://www.futbin.com/27/playerPrices?player=:resourceId`  
  Returns JSON object containing real-time prices for PS, Xbox, and PC, plus Price Range min/max and update timestamp.
- `GET https://www.futbin.com/27/playerGraph?type=daily_graph&year=27&set_id=:resourceId`  
  Returns raw timestamp-price tuples for historical price trend analysis.

### 3.2 SBC & Community Endpoints
- `GET https://www.futbin.com/27/squad-building-challenges`  
  Lists all active SBC sets, categories, and estimated coin completion costs.
- `GET https://www.futbin.com/27/squad-building-challenges/ea/:eaId/:slug`  
  Details of a specific challenge and requirements.
- `GET https://www.futbin.com/27/squad-building-challenges/ea/:eaId/:slug/cheapest`  
  Community cheapest 11-player solutions with live price sums.

### 3.3 Squad Builder & Fodder Index
- `GET https://www.futbin.com/market/fodder`  
  HTML table of cheapest players by rating bracket (83, 84, 85, 86, 87, 88, 89, 90, 91+).
- `GET https://www.futbin.com/27/squad/:squadId`  
  Community or user-built 11-player squad with formation, chemistry points, and total market value.
