{"id":13638587,"url":"https://github.com/johnhyde/turf","last_synced_at":"2025-04-19T18:30:45.871Z","repository":{"id":164223262,"uuid":"630285006","full_name":"johnhyde/turf","owner":"johnhyde","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-17T00:39:25.000Z","size":5491,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2024-11-09T08:39:58.569Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"hoon","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnhyde.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":"2023-04-20T03:58:30.000Z","updated_at":"2024-10-17T00:39:30.000Z","dependencies_parsed_at":"2023-10-22T11:22:01.359Z","dependency_job_id":"db2cc0ce-6b90-4915-8511-3177352c50c6","html_url":"https://github.com/johnhyde/turf","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnhyde%2Fturf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnhyde%2Fturf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnhyde%2Fturf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnhyde%2Fturf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnhyde","download_url":"https://codeload.github.com/johnhyde/turf/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249764719,"owners_count":21322288,"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-08-02T01:00:49.441Z","updated_at":"2025-04-19T18:30:44.954Z","avatar_url":"https://github.com/johnhyde.png","language":"hoon","funding_links":[],"categories":["Applications"],"sub_categories":[],"readme":"# turf\n\n## Dev Ship Setup\n\n- `npm install`\n- `npm run init`\n- Spin up a comet or distribution ship, or a fakeship. Such as, for example, the\n  command ./urbit -F nec in wherever you keep your urbits. (Fakeships seem to\n  take about 10 minutes to spin up on my machine.)\n- If need be, edit `VITE_SHIP_URL` in `.env.local` to point to your dev ship's\n  web interface. This should be the url your ship gives you in its boilerplate\n  output when starting up, in the line like\n  `http: web interface live on http://localhost:8080`. In fact, this is almost\n  certainly the value you will see, which is why that is the default in the\n  .env.local file. (This value technically could change a bunch, but in practice\n  is usually just the same one.)\n- Set TURF_DESK in .env.local if the path to your desk directory will be\n  different than the default (it probably will be different). This should be the\n  file system path to the turf folder in your ship folder; that is, something\n  like path/to/nec/turf. It can be a relative or absolute path, whatever works\n  best for you.\n- `npm run desk`\n  - As part of that script, the following commands will be run in your ship as\n    though you had run them from the ship's dojo. If the script fails for some\n    reason, feel free to run them manually:\n  - `|new-desk %turf`\n  - `|mount %turf`\n  - `|commit %turf`\n  - `|install our %turf`\n- Make sure that your versions are cromulent. An error message like\n  `clay: wait-for-kelvin, [need=[%zuse %415] have=[n=[lal=%zuse num=413] l={} r={}]]`\n  when you try to `|commit` means you are NOT crom, you will NOT pass go, and\n  you will NEVER collect $200. Try updating urbit in such a case.\n\n## Dev Ship Running\n\n- From the turf source folder:\n- `npm start`\n- Visit http://127.0.0.1:3000/ and sign in with your access code (`+code` in the\n  dojo to get this access code) (you will get cryptic Urbit api and\n  file-not-found errors in the web console if you forget this step. Notably,\n  session.js will be missing, although other errors will also cause this.)\n- Visit http://127.0.0.1:3000/apps/turf/\n- If you make changes to the front-end, you will have to refresh the web page,\n  or possibly hit r on the command line window running vite, depending on your\n  operating system or perhaps other factors (it's supposed to hot-reload, but\n  wasn't designed to work with phaser so it often doesn't really work properly).\n  You can, however, leave this open while you modify the back-end with\n  `npm run desks`, which is orthogonal.\n\n### Setting Up And Running Multiple Ships\n\nFor multiple ships, eg to test multiplayer:\n\n- An important thing to remember is that fakeships also use hierarchical\n  networking, as described in\n  https://developers.urbit.org/guides/core/environment#local-networking. This is\n  inconvenient, so your best bet is to run two fake galaxies, like ~bud and\n  ~nec. You can also just add more running ships to your setup to sponsor\n  appropriately.\n- Do the ship setup steps multiple times, setting TURF_DESK2 to your second\n  desk, and running `npm run desks` instead of `npm run desk`. Don't worry: this\n  is idempotent, so you can do it again even if you've already installed the\n  first ship, no problem. (It will update the turf code in the other ship to the\n  newest version, however.)\n- `npm start` like usual. Or, I suppose you can use `npm start\u0026` to start it as\n  a background process in your shell (at least in bash). (You may find\n  background processes too annoying and cumbersome, however. Here's a hint: use\n  fg to resume a stopped background procress.)\n- start a second ui dev server like so:\n  `SHIP_URL=\"http://127.0.0.1:8081\" npm run dev -- --port 3001`. This is what\n  `npm run start2` does.\n- the command `npm run tmux` runs the four processes you'll need (including the\n  urbit ships), in one convenient package, and lets you see all the processes in\n  a tmux instance.\n\n## Syncing Source Code To The Ships\n\nTo push the hoon source code to the ships, run `npm run desks` or\n`npm run desks`. Since this script includes a `|commit` to the desks, they will\nhot-reload automatically when the new source code is pushed to them thereby.\n\n# Vite Template Stuff\n\n## Usage\n\nThose templates dependencies are maintained via [pnpm](https://pnpm.io) via\n`pnpm up -Lri`.\n\nThis is the reason you see a `pnpm-lock.yaml`. That being said, any package\nmanager will work. This file can be safely be removed once you clone a template.\n\n```bash\n$ npm install # or pnpm install or yarn install\n```\n\n### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev` or (equivalently) `npm start`\n\nRuns the app in the development mode.\u003cbr\u003e Open\n[http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits (maybe).\u003cbr\u003e\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.\u003cbr\u003e It correctly bundles\nSolid in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\u003cbr\u003e Your app is\nready to be deployed!\n\n## Deployment\n\nYou can deploy the `dist` folder to any static host provider (netlify, surge,\nnow, etc.)\n\n## Addendum\n\nFurther documentation on this project can be found in [./desk/doc/](./desk/doc/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnhyde%2Fturf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnhyde%2Fturf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnhyde%2Fturf/lists"}