This repository contains a local proof of concept for mapping inbound JSON, XML, EDI 214, and EDI 856 payloads into JSON or XML outputs.
The backend owns parsing, schema artifact persistence, schema inference, mapping
suggestions, JavaScript transform execution, validation, and template versioning.
The frontend is a TanStack Start workbench that calls the FastAPI backend directly.
See docs/architecture-current.md for the current script-first architecture.
Start the backend:
cd backend
source .venv/bin/activate
uvicorn app.main:app --host 127.0.0.1 --port 8000Start the frontend in a second terminal:
cd frontend
pnpm dev --host 127.0.0.1 --port 3000Open http://127.0.0.1:3000.
Backend:
cd backend
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"Frontend:
cd frontend
pnpm installBackend:
cd backend
.venv/bin/pytest
.venv/bin/ruff check app tests
.venv/bin/pyright app testsFrontend:
cd frontend
pnpm lint
pnpm typecheck
pnpm buildRun the backend first, then from another terminal:
backend/scripts/demo_json_to_json.sh
backend/scripts/demo_xml_to_json.sh
backend/scripts/demo_json_to_xml.sh
backend/scripts/demo_edi_214.sh
backend/scripts/demo_edi_856.shSet API_BASE_URL if the backend is not on http://127.0.0.1:8000.
- Open the
Schematab. - Create a source schema from pasted text or an uploaded file.
- Create a target schema from pasted JSON/XML or an uploaded file.
- Open the
Mappingtab. - Select the saved source and target schemas.
- Generate field hints and a JavaScript transform draft.
- Review or edit the
function transform(source, helpers)script. - Click
Runusing the saved source sample or switch to override input. - Save the mapping template.
- Load a linked saved template or seeded snapshot-only example.
Runtime schema and template data is written to backend/data/templates.sqlite3
by default and is ignored by Git. Override it with TEMPLATE_DB_PATH for
isolated demos; relative paths are resolved from the backend directory. The
backend initializes this database automatically and seeds example script
templates.