{"id":28913117,"url":"https://github.com/polyphony-chat/sonata","last_synced_at":"2025-07-04T03:34:10.780Z","repository":{"id":300207604,"uuid":"1005514690","full_name":"polyphony-chat/sonata","owner":"polyphony-chat","description":"A robust, performant polyproto home server.","archived":false,"fork":false,"pushed_at":"2025-06-28T20:47:34.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T21:30:03.401Z","etag":null,"topics":["polyphony","polyphony-chat","polyproto","polyproto-core"],"latest_commit_sha":null,"homepage":"https://polyproto.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polyphony-chat.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,"zenodo":null}},"created_at":"2025-06-20T10:50:45.000Z","updated_at":"2025-06-28T20:47:38.000Z","dependencies_parsed_at":"2025-06-20T12:33:52.355Z","dependency_job_id":"b81ff189-e24b-4ebe-8145-aba7ea46c102","html_url":"https://github.com/polyphony-chat/sonata","commit_stats":null,"previous_names":["polyphony-chat/sonata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/polyphony-chat/sonata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyphony-chat%2Fsonata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyphony-chat%2Fsonata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyphony-chat%2Fsonata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyphony-chat%2Fsonata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyphony-chat","download_url":"https://codeload.github.com/polyphony-chat/sonata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyphony-chat%2Fsonata/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263440775,"owners_count":23466994,"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":["polyphony","polyphony-chat","polyproto","polyproto-core"],"created_at":"2025-06-21T20:30:53.723Z","updated_at":"2025-07-04T03:34:10.764Z","avatar_url":"https://github.com/polyphony-chat.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/polyphony-chat/sonata/badge.svg?branch=main)](https://coveralls.io/github/polyphony-chat/sonata?branch=main)\n[![FAQ-shield]][FAQ]\n[![Discord]][Discord-invite]\n\u003cimg src=\"https://img.shields.io/static/v1?label=Status\u0026message=Early%20Development\u0026color=blue\"\u003e\n\n# sonata\n\nA robust, performant implementation of a polyproto home server.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e What is the difference between this project and [symfonia](https://github.com/polyphony-chat/symfonia)?\n\n\u003e [!TIP]\n\u003e\n\u003e sonata is a standalone polyproto home server, taking care of all the routes and behaviors defined in the polyproto-core specification.\n\u003e\n\u003e Symfonia is a polyproto-chat server, exclusively caring about the polyproto-chat extension and the routes and behaviors defined by *it*.\n\n---\n\n\u003e [!NOTE]\n\u003e This software is not yet ready to be used.\n\n## About\n\nsonata is a robust, performant polyproto home server implementation built with Rust. It provides a complete implementation of the polyproto-core specification, handling all the routes and behaviors defined therein.\n\n## Development Setup\n\n### Prerequisites\n\nBefore setting up the development environment, you'll need to install the following dependencies:\n\n- **Rust**: Install Rust and Cargo from [https://rustup.rs/](https://rustup.rs/)\n- **PostgreSQL**: Install PostgreSQL from [https://www.postgresql.org/download/](https://www.postgresql.org/download/)\n- **pre-commit**: Install pre-commit from [https://pre-commit.com/](https://pre-commit.com/)\n\n### Environment Configuration\n\n1. Copy the example environment file:\n\n   ```bash\n   cp .example.env .env\n   ```\n\n2. Edit the `.env` file with your database credentials and configuration.\n\n### Database Setup\n\n1. Create a PostgreSQL database for sonata:\n\n   ```sql\n   CREATE DATABASE sonata;\n   CREATE USER sonata WITH PASSWORD 'sonata';\n   GRANT ALL PRIVILEGES ON DATABASE sonata TO sonata;\n   ```\n\n2. The database migrations will be automatically applied when you run the application.\n\n### Building and Running\n\n#### Release Builds\n\nsonata is configured with aggressive optimizations for production releases. This significantly reduces binary size while maintaining performance.\n\nTo build sonata for release:\n\n```bash\ncargo build --release --config .config/release.toml\n```\n\nThis will create an optimized executable in `target/release/sonata`.\n\nFor development and testing, use the standard debug build:\n\n```bash\ncargo build\n```\n\n### Development Tools\n\n#### Pre-commit Hooks\n\nThis project uses pre-commit hooks to ensure code quality. Install and set up the hooks:\n\n```bash\npre-commit install\n```\n\nThe hooks will automatically:\n\n- Format rust code\n- Run `clippy` for linting\n- Check for common issues like trailing whitespace and adding a newline at the end of files\n- Prepare sqlx queries for offline mode\n\n## Configuration\n\nsonata uses a TOML configuration file (`sonata.toml`) for its settings. The configuration includes:\n\n- **API settings**: Port, host, and TLS configuration for the API server\n- **Gateway settings**: Port, host, and TLS configuration for the gateway server\n- **Database settings**: Connection parameters for PostgreSQL\n- **Logging**: Log level configuration\n\nSee `sonata.toml` for the default configuration and available options.\n\n## License\n\nThis project is licensed under the Mozilla Public License 2.0. See the [LICENSE](LICENSE) file for details.\n\n## Community\n\n- **Discord**: Join our community on [Discord](https://discord.com/invite/m3FpcapGDD)\n- **Website**: Visit [polyproto.org](https://polyproto.org)\n- **Email**: Contact us at [info@polyphony.chat](mailto:info@polyphony.chat)\n- **IRC**: See [our FAQ at the \"IRC\" section](https://github.com/polyphony-chat/.github/blob/main/FAQ.md#irc) for information on how to connect.\n\n\n[Discord]: https://dcbadge.limes.pink/api/server/m3FpcapGDD?style=flat\n\u003c!-- [Discord]: https://img.shields.io/badge/Discord-bf63f7.svg?style=flat\u0026logo=discord\u0026logoColor=white--\u003e\n[Discord-invite]: https://discord.com/invite/m3FpcapGDD\n[FAQ-shield]: https://img.shields.io/badge/Frequently_Asked_Questions_(FAQ)-ff62bd\n[FAQ]: https://github.com/polyphony-chat/.github/blob/main/FAQ.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyphony-chat%2Fsonata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyphony-chat%2Fsonata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyphony-chat%2Fsonata/lists"}