AI stack architect

Describe what you are building. Watch the stack assemble.

Stack4That turns a plain-language request such as “Build the stack for a real-time AI news application” into a coherent technology architecture. TypeSafe decides every slot against a continuously refreshed catalog of real technologies, and the chosen ones assemble on screen out of physics-driven logo blocks.

Three plates. The top one is still falling into place.

The technology universe: a dark canvas crowded with physics-driven logo blocks, and a command bar reading “Build the stack for a real-time AI news application.”
Discover. The home screen is a universe of technology blocks. Typing glows the ones that match.

Two experiences, one knowledge base

What it does

Discover

The pile is physical, simulated with Matter.js and drawn on a single canvas, so React never mounts a component per block. Click a block for its knowledge-base record, evidence, and change history. The whole catalog is browsable at /catalog.

Drag the browser window and the blocks lag behind the box that holds them, crowd toward the trailing wall, and settle again. Press space to toss the pile. Hold space to charge a bigger launch, up to a full-screen eruption that falls back under gravity.

Build

Submit a request and the server streams its work over Server-Sent Events. Candidate blocks light up while retrieval runs, then the chosen ones fly out of the pile on a ballistic path and land in their architecture row. Once settled, relationships are drawn between them.

Click any block for why it is there, the decision it won, tradeoffs, confidence, sources, and an implementation snippet written against the actual stack. “Use instead” swaps an alternative in and re-evaluates whatever depended on it.

Logo blocks suspended across the canvas after a space-bar launch, with the command bar reading “make it open source.”
Follow-ups such as “make it open source” or “use AWS instead” shake the current stack loose and rebuild it in the same thread.
The decision panel for PostgreSQL: why it won the relational database slot, alternatives including MySQL and SQLite, and an implementation snippet.
Every selection is explained: why the slot exists, why this technology won, and what it was chosen over.

What you can count on

Key features

  • A pile you can throw

    Matter.js on one canvas. Window drags shove the pile. Space launches it, and a charged launch fills the screen before gravity brings it home.

  • Explained selections

    Why the slot exists, why this technology won, what it was chosen over, the calibrated confidence, and the sources behind each claim.

  • Nothing invented

    Candidate identifiers always come from the catalog, so a technology that does not exist cannot be recommended.

  • Revise in place

    “Use instead” swaps an alternative and re-evaluates dependents. Later messages keep the objectives from earlier turns.

  • A catalog with a memory

    Refresh re-checks first-party sites and repositories. Discover pulls from nine sources. Nothing is deleted; changes are appended.

  • Snippets for this stack

    Explanations and implementation sketches are generated from the structured decision, so they name the criteria that actually decided it.

From a sentence to an architecture

How it works

Every stage emits events, so visual assembly starts as soon as the first decision lands rather than when the stack is finished. There is no fallback decision engine. TypeSafe decides, and code keeps the result coherent.

  1. Intent

    One TypeSafe request reads the raw text: capabilities, budget, scale, team, hosting, cloud, language, open-source stance, and a role for every catalog technology named in the request. An unknown stays an assumption. Two words such as “todo app” borrow an archetype; a detailed request is kept as written.

  2. Requirement graph

    Capabilities become slots with request-specific descriptions and dependency edges. Code resolves the conflicts that follow, such as one cross-platform mobile slot instead of two native ones.

  3. Retrieval

    Hybrid scoring per slot — taxonomy, BM25, semantic similarity, constraints, maturity, evidence freshness, and fit with what is already selected — returns 10 to 30 candidates. It never decides anything.

  4. Decision engine

    For each slot, TypeSafe chooses among candidate identifiers and scores the criteria that matter for this request. A cheap MVP weighs cost and speed. A HIPAA platform weighs security and maturity. There is no universal 0-to-100 score.

  5. Stack optimizer

    Code checks duplicates, cloud clashes, language mismatches, and licensing or compliance gaps. TypeSafe judges optional slots, redundant pairs, and oversized stacks. The smallest coherent architecture wins.

  6. Explanations

    Explanations and snippets are generated from the structured decision rather than free-written prose, so they reference the criteria that decided it and the alternatives that beat the winner on some dimension.

The full pipeline

User request → intent and constraints → architecture requirement graph → hybrid retrieval → candidate sets → TypeSafe decision engine → compatibility validation → stack optimization → final architecture → streaming visual assembly → explanations and snippets

Knowledge base

Technology is the canonical entity. Each record carries taxonomy, capabilities, deployment models, languages, integrations, pricing, maturity, lifecycle, compliance, and evidence rows with a source URL, a claim, and a confidence. Companies own many technologies. A retired technology keeps its history and the reason it went.

The intelligence pipeline runs discover, fetch, normalize, deduplicate, classify, validate, enrich, embed, upsert, and audit. Discover draws on Wikidata, the Apache Software Foundation catalog, the CNCF landscape, Docker Hub official images, the yc-oss dataset, GitHub search, npm, top PyPI packages, and crates.io. A source that fails is logged and skipped.

The pipeline page with a run in progress, live progress, recent catalog changes, and candidates held for a later run.
/pipeline shows runs, changes, and candidates, and can launch a run with live progress.

Node 20 or newer

Quick start

Every decision is made by TypeSafe, and there is no fallback engine, so a key from console.typesafe.ai is required. The curated seed loads into a local SQLite file on first start, so the app is useful immediately.

Terminal
git clone https://github.com/MoRohn/stack4that.git
cd stack4that
cp .env.example .env.local      # add TYPESAFE_API_KEY
npm install && npm link         # installs the stack4that command
stack4that start                # builds if needed, starts in the background, opens the app

The first start offers to make http://stack4that:3333 resolve on this machine, which is one line in /etc/hosts. Decline it and the app is served at http://localhost:3333. Run stack4that setup later to change your mind. Run the discovery pipeline whenever you want the catalog to grow.

Self-host

Vercel

Set TYPESAFE_API_KEY, CRON_SECRET, and a libSQL database (DATABASE_URL=libsql://… with DATABASE_AUTH_TOKEN), since the filesystem is read-only. The cron in vercel.json runs the pipeline nightly.

Any Node host

The default SQLite file works. Set PIPELINE_INPROCESS_SCHEDULE=1 to keep the catalog fresh inside a long-running Node process. All configuration is environment variables, documented in .env.example.

The live app at stack4that.com runs on a managed TypeSafe AI key, so visitors do not provide one. Self-hosters set TYPESAFE_API_KEY in the environment, as in the quick start above. The app never accepts a key from the browser.

What the app itself is built with

Tech stack

  • Next.js and ReactApp, routes, and the streaming UI
  • TypeScriptThe architect, catalog, and pipeline
  • TypeSafeEvery architecture decision
  • Matter.jsThe physics-driven logo blocks
  • libSQL and SQLiteLocal knowledge base; Turso when the disk is read-only
  • Tailwind CSSThe product interface
  • Simple IconsBrand marks, with other icons through the favicon proxy
  • Node.js 20+The stack4that command and the server

Describe what you are building.

Watch the stack assemble.