{"id":28855480,"url":"https://github.com/spiral/simple-chat","last_synced_at":"2026-05-04T12:33:15.579Z","repository":{"id":237405817,"uuid":"608194425","full_name":"spiral/simple-chat","owner":"spiral","description":"A real-time demo chat application using the Spiral Framework, RoadRunner, and Centrifugo with authentication and bidirectional communication.","archived":false,"fork":false,"pushed_at":"2023-06-06T02:35:21.000Z","size":11033,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-19T23:05:59.367Z","etag":null,"topics":["bidirectional","centrifugo","grpc","php","roadrunner","spiral-framework","websocket"],"latest_commit_sha":null,"homepage":"https://spiral.dev/docs/cookbook-simple-chat","language":"JavaScript","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/spiral.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-03-01T14:14:07.000Z","updated_at":"2025-03-15T20:59:21.000Z","dependencies_parsed_at":"2024-05-01T11:54:04.967Z","dependency_job_id":null,"html_url":"https://github.com/spiral/simple-chat","commit_stats":null,"previous_names":["spiral/simple-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spiral/simple-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fsimple-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fsimple-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fsimple-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fsimple-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiral","download_url":"https://codeload.github.com/spiral/simple-chat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fsimple-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32607533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bidirectional","centrifugo","grpc","php","roadrunner","spiral-framework","websocket"],"created_at":"2025-06-19T23:05:45.385Z","updated_at":"2026-05-04T12:33:15.574Z","avatar_url":"https://github.com/spiral.png","language":"JavaScript","funding_links":["https://github.com/sponsors/roadrunner-server"],"categories":[],"sub_categories":[],"readme":"# A real-time chat application\n\n![Real time chat](https://user-images.githubusercontent.com/773481/231367651-38986905-b9ab-41ef-b904-2c752c0fa5dd.jpg)\n\nHello developer! Welcome to your new awesome demo application built with the Spiral framework.\n\nReal-time chat applications have become increasingly popular in recent years, and implementing WebSocket servers to\nenable bidirectional communication has become essential for building such applications. However, creating this kind of\ncan be a challenging task.\n\nFortunately, there are new frameworks and tools available that make it easier to set up WebSocket servers. In this\ntutorial, we will demonstrate how to create a real-time chat application using the Spiral Framework, RoadRunner, and\nCentrifugo with authentication and bidirectional communication.\n\nSpiral Framework offers an array of seamlessly integrated components, which makes it an ideal choice for building\ncomplex applications. In this tutorial, we will guide you on creating a simple real-time chat application using Spiral\nFramework, Centrifugo, RoadRunner, and ORM.\n\nYou can find a tutorial on how to build this application on the Spiral\nwebsite - [Real-time chat application](https://spiral.dev/docs/cookbook-simple-chat)\n\n## Run the application\n\nTo start HTTP server using RoadRunner, run the following command in your project directory:\n\n```bash\n./rr serve\n```\n\nOpen the application in your browser: http://127.0.0.1:8080 and use `bill` or `john` as a username and `secret` as a\npassword to login. After authentication, you will be redirected to the chat page where you can send messages to the\nserver.\n\n\u003e **Note**:\n\u003e For more information on how to use RoadRunner with Spiral, please consult\n\u003e the [official documentation](https://spiral.dev/docs/start-server).\n\n\nTo help you get started, we've provided some instructions for configuring the individual packages that were installed.\nDepending on the packages you chose during the installation, you'll find the following next steps:\n\n## Next Steps\n\n## Configuration\n\n1. Please, configure the environment variables in the `.env` file at the application's root.\n2. Read documentation about Spiral Framework: https://spiral.dev/docs\n\n### RoadRunnerBridge\n\n1. The settings for RoadRunner are in a file named `.rr.yaml` at the main folder of the app.\n2. Documentation: https://spiral.dev/docs/start-server\n\n### CycleBridge\n\n1. Database configuration file: `app/config/database.php`\n2. Migrations configuration file: `app/config/migration.php`\n3. Cycle ORM configuration file: `app/config/cycle.php`\n4. Documentation: https://spiral.dev/docs/basics-orm\n\n## Console commands\n\n### Download or update RoadRunner\n\nAllows to install the latest version of the RoadRunner compatible with your environment (operating system, processor\narchitecture, runtime, etc...).\n\n```bash\ncomposer rr:download\n# or\n./vendor/bin/rr get-binary\n```\n\n## Project Structure\n\nIf you chose to install the default application skeleton, your project will have the following directory structure:\n\n```\n- Endpoint\n    - Web\n        - UserController.php\n        - Filter\n            - ...\n        - Middleware\n            - ...\n        - Interceptor\n            - ...\n        - routes.php\n    - Centrifugo\n        - Interceptor\n            - AuthenticatorInterceptor.php\n        - ConnectService.php\n        - ...\n- Application\n    - Bootloader\n        - RoutesBootloader.php\n        - UserModuleBootloader.php\n    - Exception\n        - SomeException.php\n    - Kernel.php\n- Entity\n    - User.php\n- Repository\n    - UserRepositoryInterface.php\n```\n\n#### Here's a brief explanation of the directories and files in this structure:\n\n- **Endpoint**: This directory contains the entry points for your application, including HTTP endpoints (in the Web\n  subdirectory), command-line interfaces (in the Console subdirectory), and gRPC services (in the RPC subdirectory).\n\n- **Application**: This directory contains the core of your application, including the Kernel class that boots your\n  application, the Bootloader classes that register services with the container, and the Exception directory that\n  contains exception handling logic.\n\nThe project structure we provided is a common structure used in many PHP applications, and it can serve as a starting\npoint for your projects By following this structure, you can organize your code in a logical and maintainable\nway, making it easier to build and scale your applications over time. Of course, you may need to make adjustments to fit\nthe specific needs of your project, but this structure provides a solid foundation for most applications.\n\n**Good luck with your project!**\n\n## Useful resources\n\n- [**Spiral Framework documentation**](https://spiral.dev/docs)\n- [**RoadRunner documentation**](https://roadrunner.dev/docs)\n- [Community packages](https://github.com/spiral-packages).\n- [Birddog](https://github.com/roadrunner-server/birddog) — OpenSource tool for monitoring RoadRunner instances.\n- [Support us](https://github.com/sponsors/roadrunner-server)\n- [Contributing](https://spiral.dev/docs/about-contributing/)\n\n## Support\n\nIf you have any questions or need help with the project, please don't hesitate to reach out! You can find us on Discord\nat the following link:\n\n[Discord Server](https://discord.gg/TFeEmCs)\n\nAlternatively, you can create an issue on GitHub to report a bug or request a feature:\n\n[Create an Issue on GitHub](https://github.com/spiral/framework/issues/new/choose)\n\nWe welcome any feedback or suggestions you may have, and are always happy to help troubleshoot any issues you may\nencounter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiral%2Fsimple-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiral%2Fsimple-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiral%2Fsimple-chat/lists"}