{"id":23424304,"url":"https://github.com/ringtailsoftware/cubiti","last_synced_at":"2025-08-25T13:31:38.372Z","repository":{"id":65018586,"uuid":"580621806","full_name":"ringtailsoftware/cubiti","owner":"ringtailsoftware","description":"cubiti is a toy Fediverse server written in Node.js","archived":false,"fork":false,"pushed_at":"2022-12-21T02:38:40.000Z","size":274,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-18T09:09:54.758Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ringtailsoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-21T02:37:15.000Z","updated_at":"2023-02-16T16:39:34.000Z","dependencies_parsed_at":"2023-01-13T15:17:14.256Z","dependency_job_id":null,"html_url":"https://github.com/ringtailsoftware/cubiti","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/ringtailsoftware%2Fcubiti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringtailsoftware%2Fcubiti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringtailsoftware%2Fcubiti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringtailsoftware%2Fcubiti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringtailsoftware","download_url":"https://codeload.github.com/ringtailsoftware/cubiti/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230911421,"owners_count":18298978,"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-12-23T04:16:36.822Z","updated_at":"2024-12-23T04:16:37.916Z","avatar_url":"https://github.com/ringtailsoftware.png","language":"JavaScript","readme":"\u003ch1\u003e\u003cpicture\u003e\n  \u003cimg alt=\"cubiti\" src=\"cubiti-server/public/images/cubiti-logo-cropped.png?raw=true\" height=\"110\"\u003e\n\u003c/picture\u003e\u003c/h1\u003e\n\ncubiti is a toy Fediverse server written in Node.js\n\u003cbr\u003e\nIt speaks to Mastodon and other federated network services supporting [ActivityPub](https://www.w3.org/TR/activitypub/)\n\nAs a front-end, it provides a partial implementation of the [Mastodon API](https://docs.joinmastodon.org/client/intro/) so you can connect with Mastodon client apps such as [Pinafore](https://pinafore.social/), [MetaText](https://apps.apple.com/us/app/metatext/id1523996615), [Mammoth](https://mastodon.social/@JPEGuin/109315609418460036) and more.\n\ncubiti serves two APIs, Mastodon in the front and ActivityPub in the back.\n\nDeveloping cubiti was an exercise in learning about Fediverse APIs and protocols. As a service, **it is insecure, buggy and incomplete**. However, it supports enough to follow, post, like, reblog and view conversations including image media, blurhash and content warnings.\n\nNote, the admin command interface is more mature than the Mastodon API support.\n\n## Tech stack\n\n- **sqlite3** (persistent storage)\n- **redis** (pubsub for realtime timeline updates)\n- **Node.js** (everything else)\n\n## Initial setup\n\n\tdocker-compose build\n\tdocker-compose up\n\t\nCreate a user account via the admin command interface\n\n\tdocker-compose run --rm cubiti-server\n\t\nAt the prompt, type:\n\n\tuser add cubiti mypassword\n\nIt will respond by showing part of the created database record:\n\n\t{\n  \t\tuserid: 1,\n  \t\tusername: 'cubiti',\n  \t\tpubkey: '-----BEGIN PUBLIC KEY-----\\n' +\n  \t\t...\n  \t}\n\nBrowse to [https://localhost/](https://localhost/) (and accept the security warning about the self-signed certificate mismatch). Click the invitation to login via [pinafore.social](https://pinafore.social)\n\nYou should see an empty timeline. Some interaction is possible, but you are talking to yourself. As the @cubiti users does not follow anyone, posted messages will be dropped.\n\n## Setup a real server\n\n - Buy a domain, configure DNS, create a valid key pair\n - Copy the cert over `nginx-alpine-ssl/nginx-selfsigned.crt` and the key over `nginx-alpine-ssl/nginx-selfsigned.key`\n - Edit `data/config.json` and set `domain` to your real domain\n\nRun the server\n\n\tdocker-compose down\n\tdocker-compose build\n\tdocker-compose up\n\nTest that your @cubiti account is discoverable with Webfinger\n\n - Go to [https://webfinger.net/](https://webfinger.net/)\n - Type in `cubiti@yourdomain`\n - You should see a JSON webfinger document\n\nBrowse to https://domain, follow the link to Pinafore, add `domain` and login. You should now see an empty timeline.\n\nWell done! You're on the fediverse\n\n## Next\n\nThe search Mastodon API is not yet implemented, so you have nobody to follow and no posts to view yet.\n\nEither, use another fediverse account to start interacting with cubiti@domain, or use the admin interface\n\nTo get a prompt, run:\n\n\tdocker-compose run --rm cubiti-server\n\nMost command require a `userid`, that's the user the admin is executing the command for. If you only have the single user we created above, use `1`\n\nAt the prompt, you can follow a user with:\n\n\taction follow 1 https://mastodon.me.uk/users/tobyjaffey\n\t\nTo send a message to all of your followers:\n\n\taction sendnote 1 \"Hello world\"\n\t\nTo unfollow:\n\n\taction unfollow 1 https://mastodon.me.uk/users/tobyjaffey\n\t\nTo like a post:\n\n\taction like 1 https://foo.social/users/bar/statuses/109548408290883351 https://foo.social/users/bar\n\t\nTo unlike a post\n\n\taction unlike 1 https://foo.social/users/bar/statuses/109548408290883351 https://foo.social/users/bar\n\n## Next next\n\nNow that you have some followers and some data, you can do the same actions (and more) through the Mastodon API (via Pinafore). Some things work, some do not.\n\n## Contact\n\n@tobyjaffey@mastodon.me.uk\n\n[https://mastodon.me.uk/users/tobyjaffey](mastodon.me.uk/users/tobyjaffey)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringtailsoftware%2Fcubiti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringtailsoftware%2Fcubiti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringtailsoftware%2Fcubiti/lists"}