{"id":20217809,"url":"https://github.com/matrix-org/tardis","last_synced_at":"2025-04-10T15:44:15.845Z","repository":{"id":38986488,"uuid":"266638329","full_name":"matrix-org/tardis","owner":"matrix-org","description":"Time Agnostic Room DAG Inspection Service","archived":false,"fork":false,"pushed_at":"2025-03-06T04:21:05.000Z","size":2966,"stargazers_count":28,"open_issues_count":10,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-24T13:36:11.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://matrix-org.github.io/tardis/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matrix-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-24T22:54:26.000Z","updated_at":"2025-02-25T13:02:59.000Z","dependencies_parsed_at":"2024-12-16T14:34:23.315Z","dependency_job_id":"ff8c5ab8-019f-4135-95b3-c4d5e6bec670","html_url":"https://github.com/matrix-org/tardis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Ftardis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Ftardis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Ftardis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Ftardis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrix-org","download_url":"https://codeload.github.com/matrix-org/tardis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243500,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:35:45.544Z","updated_at":"2025-04-10T15:44:15.837Z","avatar_url":"https://github.com/matrix-org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## TARDIS - Time Agnostic Room DAG Inspection Service\n\nTARDIS is a time-travelling debugger for Matrix room DAGs, which reads a plaintext file\nto graphically visualise a room using [d3-dag](https://github.com/erikbrinkman/d3-dag) for\ndebugging purposes. It can then perform state resolution at any given event on the DAG via\na shim server. TARDIS comes with a Synapse shim server, which needs to be run in addition\nto TARDIS. See `shims/synapse`.\n\n## Generates stuff like this:\n\n![](img/tardis.png)\n\n### To use:\n\nRequires node 20+ for global crypto variables.\n```\nyarn install\nyarn run start\n```\nor:\n```\ndocker build -t tardis .\ndocker run --rm -p 5173:5173 tardis\n```\n\n## Loading events\n\n### ..via existing events in a database\nProvide a new-line delimited JSON file which contains events to render in the full federation format (with `prev_events`, etc).\nTo get such a file _for Synapse installations on Postgres_, run the following (assuming `matrix` is the name of your DB):\n```\n$ psql matrix\nmatrix=\u003e \\t\nTuples only is on.\nmatrix=\u003e \\o the-file.ndjson\nmatrix=\u003e select jsonb_insert(json::JSONB, '{event_id}', ('\"' || event_id || '\"')::JSONB) from event_json where event_id in \n    (select event_id from events where\n        room_id='!THE_ROOM_ID' and\n        stream_ordering \u003c (select stream_ordering from events where event_id='$LATEST_EVENT_ID') and \n        stream_ordering \u003e (select stream_ordering from events where event_id='$EARLIEST_EVENT_ID')\n        order by stream_ordering asc\n    );\n```\n\nFor SQLite3 use `select '{\"event_id\":\"' || event_id || '\",' || substr(json, 2) from event_json`.\n\nYou can drop the `stream_ordering` clauses if the room is small and you want to see the entire thing.\n\nIt is important that the events are sorted in causal order. To do this with [jq](https://jqlang.github.io/jq/): just do:\n```\ncat the-file.ndjson | jq -s 'sort_by(.depth)' \u003e sorted-file.ndjson\n```\nThe file created by these commands can be dropped **as-is** into TARDIS.\n\n### ..via scenario JSON5 files\nProvide a JSON5 file which contains the scenario to run. See the `examples` directory for examples on\nthe keys available.\n\n## Developing\n\n\n### Building WASM\nSometimes we want to create mock scenarios which don't exist in databases. We use placeholder event IDs in this case. However, state\nresolution demands that they are actual event IDs. Tardis uses the same code paths as Dendrite (via wasm) to generate the correct event IDs.\nTo build the wasm, you need [tinygo](https://tinygo.org/) installed and then:\n```\nGOOS=js GOARCH=wasm tinygo build -o ./public/gmsl.wasm --no-debug ./cmd/wasm/main.go\n```\nA working version is already supplied with this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Ftardis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix-org%2Ftardis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Ftardis/lists"}