{"id":13638377,"url":"https://github.com/bacwyls/basket","last_synced_at":"2025-04-19T17:33:43.720Z","repository":{"id":124090285,"uuid":"591511523","full_name":"bacwyls/basket","owner":"bacwyls","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-13T16:43:53.000Z","size":191,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-09T08:39:31.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bacwyls.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}},"created_at":"2023-01-20T23:56:24.000Z","updated_at":"2023-08-30T16:36:01.000Z","dependencies_parsed_at":"2023-11-13T17:52:20.511Z","dependency_job_id":null,"html_url":"https://github.com/bacwyls/basket","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/bacwyls%2Fbasket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacwyls%2Fbasket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacwyls%2Fbasket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacwyls%2Fbasket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bacwyls","download_url":"https://codeload.github.com/bacwyls/basket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249750185,"owners_count":21320089,"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:44.913Z","updated_at":"2025-04-19T17:33:43.434Z","avatar_url":"https://github.com/bacwyls.png","language":"TypeScript","funding_links":[],"categories":["Applications"],"sub_categories":[],"readme":"# basket\n\nbasket is a simple db of tagged images\n\nthe frontend displays the most recent image in the full window,\nso it can be used to add some personal style to an urbit desktop environment.\n\nin addition to being a personal db,\nbasket is an experimental app on top of the 'rooms' primitive in [Realm](https://twitter.com/HoliumCorp)\n\nmembers of a room have temporary write-access to each others basket db.\nthe frontend makes it ergonomic and fun to share / collaboritively create this data.\n\nin theory (at scale), this creates a kind of decentralized giphy.\n\nthe images you know about are the images your friends have shared with you.\nit gamifies the creation of rich, human curated image metadata.\none obvious use case for this is keeping track of memes.\n\nTo export the full dataset you can GET `http://yoururbitship.com/~/scry/basket/images.json`\nThen you might want to use a python script to actually download the images to local storage.\n\nEventually, it would be nice to have a simple way to export and share the dataset.\n\n## Desk\n\nto integrate with rooms, :basket uses a scry into the local `:rooms-v2` agent.\nroom-members relay their pokes through the room-creator, who broadcasts it to everyone.\n\ntheres a bunch of routing logic to make all of that work.\nfor the base-case of users who _arent_ in Realm and in a room:\nwe just pretend the user is an a room by himself, and that he is the creator.\n\nthis seemed more elegant than creating two seperate branches of app logic.\n\n## UI\n\nThe frontend has one subscription to the basket agent.\nit speaks the same language as the backend, basket-actions.\n\n```\n:: basket-action\n[%set-image *]\n[%forget-image *]\n[%tag-image *]\n[%untag-image *]\n```\n\nit has two views: 'live' and 'repo'\nthe 'live' view displays the 'live' image on the screen. this corresponds with 'latest' in the :basket agent.\nthe 'repo' view displays items from the db, which it grabs from a scry to the backend. from here, you can delete images or tags.\nfrom here, you can click on an item to set it to the live view.\n\nyou can also search the dataset by tag using a searchbar at the bottom of the page.\n\n### some dev docs generated by @urbit/create-landscape-app\n\nTo get started using basket first you need to run `npm install` inside the `ui` directory.\n\nTo develop you'll need a running ship to point to. To do so you first need to add a `.env.local` file to the `ui` directory. This file will not be committed. Adding `VITE_SHIP_URL={URL}` where **{URL}** is the URL of the ship you would like to point to, will allow you to run `npm run dev`. This will proxy all requests to the ship except for those powering the interface, allowing you to see live data.\n\nYour browser may require CORS requests to be enabled for the use of `@urbit/http-api`. The following commands will add `http://localhost:3000` to the CORS registry of your ship\n\n```bash\n~zod:dojo\u003e +cors-registry\n\n[requests={~~http~3a.~2f.~2f.localhost ~~http~3a.~2f.~2f.localhost~3a.3000} approved={} rejected={}]\n\n~zod:dojo\u003e |cors-approve ~~http~3a.~2f.~2f.localhost~3a.3000\n\n~zod:dojo\u003e +cors-registry\n\n[requests={~~http~3a.~2f.~2f.localhost} approved={~~http~3a.~2f.~2f.localhost~3a.3000} rejected={}]\n\n~your-sig:dojo\u003e\n```\n\nRegardless of what you run to develop, Vite will hot-reload code changes as you work so you don't have to constantly refresh.\n\n### Deploying\n\nTo deploy, run `npm run build` in the `ui` directory which will bundle all the code and assets into the `dist/` folder. This can then be made into a glob by doing the following:\n\n1. Create or launch an urbit using the -F flag\n2. On that urbit, if you don't already have a desk to run from, run `|merge %work our %base` to create a new desk and mount it with `|mount %work`.\n3. Now the `%work` desk is accessible through the host OS's filesystem as a directory of that urbit's pier ie `~/zod/work`.\n4. From the `ui` directory you can run `rsync -avL --delete dist/ ~/zod/work/basket` where `~/zod` is your fake urbit's pier.\n5. Once completed you can then run `|commit %work` on your urbit and you should see your files logged back out from the dojo.\n6. Now run `=dir /=garden` to switch to the garden desk directory\n7. You can now run `-make-glob %work /basket` which will take the folder where you just added files and create a glob which can be thought of as a sort of bundle. It will be output to `~/zod/.urb/put`.\n8. If you navigate to `~/zod/.urb/put` you should see a file that looks like this `glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob`. The characters between `glob-` and `.glob` are a hash of the glob's contents.\n9. Now that we have the glob it can be uploaded to any publicly available HTTP endpoint that can serve files. This allows the glob to distributed over HTTP.\n10. Once you've uploaded the glob, you should then update the corresponding entry in the docket file at `desk/desk.docket-0`. Both the full URL and the hash should be updated to match the glob we just created, on the line that looks like this:\n\n```hoon\n    glob-http+['https://bootstrap.urbit.org/glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob' 0v5.fdf99.nph65.qecq3.ncpjn.q13mb]\n```\n\n11. This can now be safely committed and deployed.\n\n[react]: https://reactjs.org/\n[typescript]: https://www.typescriptlang.org/\n[tailwind css]: https://tailwindcss.com/\n[vite]: https://vitejs.dev/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacwyls%2Fbasket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbacwyls%2Fbasket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacwyls%2Fbasket/lists"}