{"id":21384673,"url":"https://github.com/p2panda/tauri-example","last_synced_at":"2025-07-13T14:31:40.471Z","repository":{"id":191706743,"uuid":"685088595","full_name":"p2panda/tauri-example","owner":"p2panda","description":"How to build a local-first application with p2panda and Tauri","archived":false,"fork":false,"pushed_at":"2024-12-06T14:21:23.000Z","size":603,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T12:52:01.551Z","etag":null,"topics":["app","desktop","example","p2p","react","tauri"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p2panda.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-08-30T13:46:50.000Z","updated_at":"2025-03-11T22:34:31.000Z","dependencies_parsed_at":"2024-11-22T11:42:40.443Z","dependency_job_id":"5e8a440c-13f9-421d-a6e0-715b9b76bb56","html_url":"https://github.com/p2panda/tauri-example","commit_stats":null,"previous_names":["p2panda/tauri-example"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/p2panda/tauri-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2panda%2Ftauri-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2panda%2Ftauri-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2panda%2Ftauri-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2panda%2Ftauri-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2panda","download_url":"https://codeload.github.com/p2panda/tauri-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2panda%2Ftauri-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155724,"owners_count":23719570,"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":["app","desktop","example","p2p","react","tauri"],"created_at":"2024-11-22T11:42:31.781Z","updated_at":"2025-07-13T14:31:40.459Z","avatar_url":"https://github.com/p2panda.png","language":"Rust","readme":"# p2panda-tauri-example\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/p2panda/.github/main/assets/tauri-example-screenshot.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n[tutorial](https://aquadoggo.p2panda.org/tutorials/tauri/) 👈\n\nThis is an example on how to integrate an [`aquadoggo`](https://github.com/p2panda/aquadoggo/)\nnode right next to a web frontend using the desktop application framework\n[Tauri](https://tauri.app/). By embedding a node like that, your application will gain full\npeer-to-peer and local-first capabilities.\n\nOn the front-end there is a simple JavaScript web app which demonstrates how to interact with the\nembedded node using `shirokuma` to publish documents, `GraphQL` for queries, and `http`\nendpoint for requesting blobs.\n\n## Requirements\n\n- Rust\n- NodeJS\n\n## Usage\n\n```bash\n# Install NodeJS dependencies\nnpm install\n\n# Start Tauri development window\nnpm run tauri dev\n```\n\n## Storage\n\nTauri recommends where app data should be stored based on expected platform specific locations.\n\nLinux: Resolves to `$XDG_DATA_HOME` or `$HOME/.local/share`.  \nmacOS: Resolves to `$HOME/Library/Application Support`.  \nWindows: Resolves to `{FOLDERID_LocalAppData}`.\n\nData for both the WebView and the rust code is persisted to the sub-folder `p2panda-tauri-example`.\n\n## Identity\n\nOn first run a new ed25519 key pair is generated and saved to a file named `private-key.txt` in\nthe app data directory. From this point on it is re-used each time you start the application, this\nis the identity of the embedded `aquadoggo` node (which is different from a client's identity).\n\n## Configuration\n\nThe embedded `aquadoggo` node can be configured via a `config.toml` file. On initial startup\na default config is generated and stored in the app data directory.\n\nSee config file comments for detailed instructions on the extensive configuration options. Visit  \nthe [`aquadoggo` cli](https://github.com/p2panda/aquadoggo/tree/main/aquadoggo_cli) for further\ninformation and examples.\n\n## Compile release binaries\n\nWith the help of a github workflow task binaries for Windows, MacOS and Linux are compiled and\npushed to a new release whenever a you push a new tag. For example:\n\n```bash\n# Create a new tag\ngit tag v0.1.0\n\n# Push the current code and tags\ngit push --tags\n```\n\nThis will trigger the `ci` to compile binaries, create a new release (`v0.1.0`) and upload the\nbinaries to the release assets.\n\n## Development\n\n### Application data\n\nIn development mode (`npm run tauri dev`) data for each app instance is not persisted.\n\n### Schema\n\nSchema are deployed to the node automatically on initial startup from a `schema.lock` file located\nin the tauri `resources/schemas` directory. This file was created with the CLI tool\n[`fishy`](https://github.com/p2panda/fishy).\n\nWhen you replace these schema with the ones for your own application, don't forget to update `allow_schema_ids`\nin your `config.toml` as well!  \n\n### Logging\n\nYou can enable and configure logging using the `RUST_LOG` environment variable like so:\n\n```bash\n# Show debug logs emitted by `aquadoggo`\nRUST_LOG=\"aquadoggo=debug\" npm run tauri dev\n\n# Show info logs emitted by all crates used in `aquadoggo`\nRUST_LOG=\"info\" npm run tauri dev\n```\n\n### Multiple instances\n\nTo test out p2p discovery and replication locally you can run multiple instances of the app\nsimultaneously. You do this like so:\n\n```bash\n# Start up the front-end dev server, this same endpoint is shared across app instances.\nnpm run dev\n\n# Start the tauri app selecting random port http port for the node. Run this many times to launch more peers.\nnpm run peer\n\n# You can choose the http port manually too\nHTTP_PORT=1234 npm run peer\n```\n\n## Next steps\n\n1. Use [`fishy`](https://github.com/p2panda/fishy) to design, manage and deploy schemas on your node\n2. Read more about the p2panda TypeScript SDK [`shirokuma`](https://github.com/p2panda/shirokuma) which will help you to create data\n3. Use the node's [GraphQL API](https://p2panda.org/specification/APIs/queries) to query, filter and sort data\n4. Check out the configuration possibilities of [`aquadoggo`](https://github.com/p2panda/aquadoggo/)\n5. Learn more about [Tauri](https://tauri.app/)\n\n## License\n\nGNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE)\n\n## Supported by\n\n\u003cimg src=\"https://raw.githubusercontent.com/p2panda/.github/main/assets/nlnet-logo.svg\" width=\"auto\" height=\"80px\"\u003e\u003cbr /\u003e\n\n[`p2panda`]: https://aquadoggo.p2panda.org/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2panda%2Ftauri-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2panda%2Ftauri-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2panda%2Ftauri-example/lists"}