The Problem
Manual web‑scraping pipelines require custom code for each site, fragile selectors, and ad‑hoc orchestration. Teams spend weeks building and maintaining scrapers that break on layout changes, and they lack a repeatable way to expose scraped data as an API.
What This Does
maxun delivers an open‑source, no‑code platform that turns any website into a structured API. The repo bundles six related projects:
- src/ – React UI and core client logic (e.g.,
src/context/globalInfo.tsx,src/helpers/clientSelectorGenerator.ts). - server/ – Node back‑end handling recording storage, browser orchestration, and workflow scheduling (
server/src/index.ts,server/src/server.ts). - maxun‑core/ – Shared runtime used by both UI and back‑end (
maxun-core/src/interpret.ts). - browser/ – Tiny HTTP server that drives a headless Chromium instance (
browser/server.ts). - legacy/ – Historical UI components kept for reference.
- perf/ – Performance‑testing helper (
perf/performance.ts).
The platform supports four robot types (Extract, Scrape, Crawl, Search) and ships an SDK for programmatic use. UI actions are recorded, transformed into selector trees, and persisted via the back‑end API.
How It Is Wired
Execution begins in browser/server.ts (frontend entry) and server/src/index.ts (backend entry).
- Backend start –
server/src/index.tsimportsserver/src/server.ts, which creates an Express app, registers routes (e.g.,src/api/storage.ts) and starts listening. The server’s logger (server/src/logger.ts) is a high‑traffic hub: 26 modules import it. - Request flow – A typical “run robot” request hits
src/api/storage.ts::createLLMRobot, which callsserver/src/sdk/workflowEnricher.ts::enrichWorkflow. That module reaches out to an LLM viaaxios.put(network) and may read a file (fs.readFileSync) for version data. - Browser orchestration –
server/src/browser-management/controller.ts::initializeRemoteBrowserForRecordingspawns a remote Chromium process. Calls eventually reachbrowser/server.tswhere the headless browser executes recorded actions. - Global state –
src/context/globalInfo.tsxsuppliesuseGlobalInfoStoreandnotify. It is the most connected module (30 importers) and a frequent source of side‑effects (notifycalled from 59 places). - Cycles – Import cycles involve
src/context/globalInfo.tsx,src/api/storage.ts, andserver/src/server.ts. The cycle inflates build times and makes refactoring risky because a change in any member can trigger recompilation of the whole cycle. - Outbound effects – Across the code base there are 67 network calls (mostly Axios), 4 DB writes, 4 cryptographic operations, and 6 model invocations. The shortest traced path from a scheduler entry (
readyHandlerinserver/src/workflow‑management/scheduler/index.ts) to an outbound request isreadyHandler → readyForRunHandler → interpretStoredRecording → axios.post.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/maxun
cd maxun
# Install dependencies (npm works for all package.json files)
npm ci # creates lockfiles if added later
# Build and run the full stack with Docker
docker compose up --build
Environment – copy ENVEXAMPLE to .env and fill in required keys (e.g., database URL, LLM endpoint). The backend reads these variables in server/src/index.ts.
Running a robot – Once containers are up, the UI is served at http://localhost:3000. Use the web UI to record actions or invoke the SDK (maxun-core) from another service. The SDK entry point is maxun-core/src/interpret.ts::run.
Real‑World Use
A data‑engineering team can embed Maxun in a nightly pipeline:
import { run } from 'maxun-core';
await run({
robotId: 'abc123',
mode: 'extract',
output: 'json',
});
The call triggers the scheduler, launches a headless browser, extracts selectors, and stores the result in the PostgreSQL instance defined by the Docker compose file.
Code Health & Issues
- High – No test suite – 182 source files, zero test files.
- High – No lockfile –
browser/package.jsonlacks a lockfile, risking non‑reproducible builds. - High – No CI workflow – No GitHub Actions or other CI config.
- High – No build gate for Docker image –
browser/Dockerfileis never validated by CI. - Medium – Dependabot missing – No automated dependency updates.
- Medium – Base image not pinned –
Dockerfile.backenduses mutablenode:20-slim. - Medium – Container runs as root – No non‑root
USERdirective. - Low – Repository conventions missing – No
.editorconfig,.gitattributes, or formatter config.
The Bottom Line
Maxun provides a complete, containerized stack for turning web interactions into API endpoints, with a clear separation between UI, back‑end, and core runtime. The codebase is functional but suffers from high cyclomatic complexity, missing tests, and limited automation. It is suitable for teams that can invest in stabilising the build pipeline and refactoring the hub modules before extending production use.