{"id":18994416,"url":"https://github.com/xtdb/xt-fiddle","last_synced_at":"2026-01-17T05:42:15.456Z","repository":{"id":224773145,"uuid":"736198117","full_name":"xtdb/xt-fiddle","owner":"xtdb","description":"XT Play - a web tool for creating small examples with XTDB","archived":false,"fork":false,"pushed_at":"2025-11-03T11:50:03.000Z","size":943,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-03T12:15:22.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://play.xtdb.com","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-27T08:46:51.000Z","updated_at":"2025-11-03T11:49:59.000Z","dependencies_parsed_at":"2024-03-26T17:26:10.788Z","dependency_job_id":"72173dab-be9a-4e68-8402-3fb0e1802fe8","html_url":"https://github.com/xtdb/xt-fiddle","commit_stats":null,"previous_names":["xtdb/xt-fiddle","xtdb/play"],"tags_count":33,"template":false,"template_full_name":"FiV0/clj-template","purl":"pkg:github/xtdb/xt-fiddle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fxt-fiddle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fxt-fiddle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fxt-fiddle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fxt-fiddle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtdb","download_url":"https://codeload.github.com/xtdb/xt-fiddle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fxt-fiddle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28500872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08T17:25:30.216Z","updated_at":"2026-01-17T05:42:15.450Z","avatar_url":"https://github.com/xtdb.png","language":"Clojure","readme":"# XT-play\n\nThis repo holds all the code behind [XT play](https://play.xtdb.com/), a web tool for exploring the [XTDB database](https://xtdb.com).\n\nIt is deployed on an AWS Lambda but can be run locally as a normal web server for ease of development.\n\n## Deploy\n\nThis repo is setup to deploy on push to `main`, so just merge your PR and go!\n\n## Development\n\nFor the front end you'll need to install deps:\n\n```sh\ncorepack enable \u0026\u0026 yarn install\n```\n\nAfter that for development you'll need two processes:\n\n### Shadow-cljs\n\nThis can be started with:\n\n```sh\nnpx shadow-cljs watch app\n```\n\nNow shadow-cljs will be watching for changes recompiling.\nSee the [shadow-cljs docs](https://shadow-cljs.github.io/docs/UsersGuide.html) for more.\n\n### Clojure REPL\n\nStart the REPL separately using `clj -M:dev:repl` (or similar). Make sure nothing else is conflicting with port 5432 (used for connecting to ephemeral XTDB instances over the pgwire protocol).\n\nThen you can start the server by running `(go)` in the `user` namespace.\n\nYou should than be able to browse the cljs dev build at [http://localhost:8000](http://localhost:8000).\n\n### Emacs development\n\n```\nM-x cider-jack-in-clj\u0026cljs\n```\n\nWhich command should be used (default clojure-cli): `shadow-cljs`\n\nFrom the repl:\n\n```\nM-x cider-repl-set-ns user\n```\n\nSwitch to namespace: `user`\n\n```\nuser\u003e (watch-deps!) (go!) (browse!)\n\n```\n\n## Troubleshooting\n\n### Errors on shadow startup\n\n\u003cdetails\u003e\n\u003csummary\u003e java.lang.UnsupportedClassVersionError  \u003c/summary\u003e\n\n#### Error\n\n```sh\nCaused by: java.lang.UnsupportedClassVersionError: xtdb/api/Xtdb has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 55.0\n```\n#### Solution\nYou're likely using the wrong java version for the project to run. Hint: the major version in the project is in the error, make sure you're running the correct java version before running.\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e -A:cljs:dev (No such file or directory)  \u003c/summary\u003e\n\n#### Error\n\n```sh\nExecution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).\n-A:cljs:dev (No such file or directory)\n```\n\n#### Solution\nCheck Clojure is installed and up to date\n\n```sh\nclojure -Sdescribe\n```\noutput:\n```txt\n{:version \"1.12.0.1488\"\n :config-files [\"/usr/local/lib/clojure/deps.edn\" \"/home/juxt/.clojure/deps.edn\" \"deps.edn\" ]\n :config-user \"/home/juxt/.clojure/deps.edn\"\n :config-project \"deps.edn\"\n :install-dir \"/usr/local/lib/clojure\"\n :config-dir \"/home/juxt/.clojure\"\n :cache-dir \".cpcache\"\n :force false\n :repro false\n :main-aliases \"\"\n :repl-aliases \"\"}\n```\n\n---\n\n\u003c/details\u003e\n\n### Cljs development errors\n\n\u003cdetails\u003e\n\u003csummary\u003e\nshadow-cljs - Stale Output! Your loaded JS was not produced by the running shadow-cljs instance. Is the watch for this build running?\n\u003c/summary\u003e\n\nIf the watch did not start properly, you can manually start it by navigating to [http://localhost:9630/builds](http://localhost:9630/builds) and selecting \"Watch\".\nReturn to the running XTDB Play and refresh the page.\nHot reloads should now be working.\n\nIf this doesn't work, try a hard refresh or clearing site data.\n\n\u003c/details\u003e\n\n\n## Infrastructure\n\nInfrastructure is spread across five(!) files, all in the `cloudformation` folder:\n\n| File | Description |\n| --- | --- |\n| `00-github-keys.yml` | Contains the user used by github to deploy |\n| `01-certificate.yml` | Creates the certificate used by CloudFront (must be deployed in `us-east-1`) |\n| `02-lambda-deps.yml` | Contains the things the lambda needs to deploy (an s3 bucket and role |\n| `03-lambda.yml` | The lambda itself, in a separate file so github can deploy just that |\n| `04-domain.yml` | The stuff needed to address the lambda via a static url |\n\nThese are glued together by liberal use of ssm parameters and [dynamic references](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html).\n\nOn initial deployment they *must* be deployed in the below order.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eInitial creation\u003c/summary\u003e\n\n\u003e [!NOTE]\n\u003e Wait for each step to finish deploying before deploying the next stage\n\n```sh\naws cloudformation create-stack \\\n    --capabilities CAPABILITY_IAM \\\n    --stack-name xt-play--github \\\n    --template-body \"file://$(pwd)/cloudformation/00-github-keys.yml\"\n```\n\nMake sure to add the access_key_id and secret_access_key to the github actions secrets.\n\n```sh\naws cloudformation create-stack \\\n    --region us-east-1 \\\n    --capabilities CAPABILITY_IAM \\\n    --stack-name xt-play--certificate \\\n    --template-body \"file://$(pwd)/cloudformation/01-certificate.yml\" \\\n    --parameters ParameterKey=HostedZoneId,ParameterValue=\u003chostedZoneId\u003e \\\n                 ParameterKey=HostedZoneName,ParameterValue=\u003chostedZoneName\u003e\n```\n\n```sh\naws cloudformation create-stack \\\n    --capabilities CAPABILITY_IAM \\\n    --stack-name xt-play--lambda-deps \\\n    --template-body \"file://$(pwd)/cloudformation/02-lambda-deps.yml\"\n```\n\nBefore running this next step, upload the code to the freshly created s3 bucket.\nLook in `03-lambda.yml` for the location.\n\n(Updates to this will mainly be done by github)\n```sh\naws cloudformation create-stack \\\n    --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND \\\n    --stack-name xt-play--lambda \\\n    --template-body \"file://$(pwd)/cloudformation/03-lambda.yml\" \\\n    --parameters ParameterKey=PlayCodeVersion,ParameterValue=\u003cversionId\u003e\n```\n\nThe `certificateArn` here is from 01-certificate.yml, it can't be an ssm parameter due to being in a different region :/\n```sh\naws cloudformation create-stack \\\n    --capabilities CAPABILITY_IAM \\\n    --stack-name xt-play--domain \\\n    --template-body \"file://$(pwd)/cloudformation/04-domain.yml\" \\\n    --parameters ParameterKey=HostedZoneId,ParameterValue=\u003chostedZoneId\u003e \\\n                 ParameterKey=HostedZoneName,ParameterValue=\u003chostedZoneName\u003e \\\n                 ParameterKey=CertificateArn,ParameterValue=\u003ccertificateArn\u003e\n```\n\n\u003e [!NOTE]\n\u003e To run an update just swap out `create-stack` for `update-stack`\n\u003e\n\u003e To delete a stack either use the AWS Console or run:\n\u003e ```sh\n\u003e aws cloudformation delete-stack --stack-name \u003cstack-name\u003e\n\u003e ```\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtdb%2Fxt-fiddle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtdb%2Fxt-fiddle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtdb%2Fxt-fiddle/lists"}