{"id":29715058,"url":"https://github.com/ryjen/emotext","last_synced_at":"2025-10-29T20:21:10.746Z","repository":{"id":303294224,"uuid":"1014991165","full_name":"ryjen/emotext","owner":"ryjen","description":"(mirror) an elixir/phoenix chat app to learn and use the erlang vm","archived":false,"fork":false,"pushed_at":"2025-07-06T20:29:05.000Z","size":3479,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T21:33:34.577Z","etag":null,"topics":["elixir-phoenix","erlang","functional-programming","webapp"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ryjen.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,"zenodo":null}},"created_at":"2025-07-06T19:55:20.000Z","updated_at":"2025-07-06T20:32:51.000Z","dependencies_parsed_at":"2025-07-06T21:35:05.729Z","dependency_job_id":"291154ae-591b-4b40-92ea-1dab68e6f6ad","html_url":"https://github.com/ryjen/emotext","commit_stats":null,"previous_names":["ryjen/emotext"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryjen/emotext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryjen%2Femotext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryjen%2Femotext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryjen%2Femotext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryjen%2Femotext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryjen","download_url":"https://codeload.github.com/ryjen/emotext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryjen%2Femotext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266796332,"owners_count":23985471,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elixir-phoenix","erlang","functional-programming","webapp"],"created_at":"2025-07-24T05:01:08.938Z","updated_at":"2025-10-29T20:21:10.733Z","avatar_url":"https://github.com/ryjen.png","language":"Elixir","readme":"# Emotext 🎭\n\nA modern chat application inspired by IRC + Multi-User Dungeons (MUDs) from the 90s, built with Elixir and Phoenix Framework.\n\n## 🎯 Project Overview\n\nEmotext is an experimental project that applies Ruby on Rails knowledge to pure functional programming using Elixir on the Phoenix Framework. The application demonstrates the power of the Erlang Virtual Machine (BEAM) for building concurrent, fault-tolerant chat systems.   \n\nThe original code (check history) used MongoDB, PostgreSQL was swapped in to save VPS resources and reuse.\n\n### Why Elixir and Phoenix?\n\nThis project explores the transition from object-oriented programming (Ruby on Rails) to functional programming paradigms:\n\n- **[Functional Programming](https://en.wikipedia.org/wiki/Functional_programming)** - Emphasizes immutability, pure functions, and declarative code\n- **[Elixir](https://elixir-lang.org/)** - A dynamic, functional language designed for building maintainable and scalable applications\n- **[Phoenix Framework](https://phoenixframework.org/)** - A productive web framework that does not compromise speed or maintainability\n\n### Erlang VM Inspiration\n\nThe choice of the Erlang VM is inspired by WhatsApp's legendary scalability achievements. WhatsApp famously handled billions of messages with a small engineering team, largely thanks to the Erlang VM's actor model and fault-tolerance capabilities.\n\n**Learn more:** [How WhatsApp Uses Erlang VM](https://www.erlang.org/blog/20-years-of-open-source-erlang/)\n\n## 🎮 Use Case: MUD-Style Chat\n\nEmotext recreates the nostalgic experience of Multi-User Dungeons from the 1990s, where players used text commands and emojis to:\n\n- **Verbosely explain emotions** - Express complex feelings through descriptive commands\n- **Convey humor** - Share jokes and playful interactions\n- **Foster communication** - Build communities through rich text-based interaction\n- **Create immersive experiences** - Use commands like `/smile`, `/laugh`, `/dance` to bring conversations to life\n\n## ✨ Features\n\n- **Real-time Communication** - Built on Phoenix Channels and WebSockets\n- **Room-based Architecture** - Multiple chat rooms with isolated conversations\n- **Command System** - MUD-style commands for expressive communication\n- **Emoji Integration** - Rich emoji support for enhanced expression\n- **User Authentication** - Secure user management with Guardian\n- **Profanity Filtering** - Built-in content moderation\n- **Responsive Design** - Modern UI with TailwindCSS\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Elixir 1.14+ and Erlang/OTP 26+\n- PostgreSQL 12+\n- Node.js 16+ (for asset compilation)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/ryjen/emotext.git\n   cd emotext\n   ```\n\n2. **Install dependencies**\n   ```bash\n   mix setup\n   ```\n\n3. **Configure your database**\n   ```bash\n   # Update config/dev.exs with your PostgreSQL credentials\n   mix ecto.create\n   mix ecto.migrate\n   ```\n\n4. **Start the Phoenix server**\n   ```bash\n   mix phx.server\n   ```\n\n5. **Visit the application**\n   Open [http://localhost:4000](http://localhost:4000) in your browser\n\n## 🐳 Docker Deployment\n\n```bash\n# Build and run with Docker Compose\ndocker-compose up --build\n\n# Or build the Docker image manually\ndocker build -t emotext .\ndocker run -p 4000:4000 emotext\n```\n\n## 🎯 Usage Examples\n\n### Basic Commands\n\n```\n/say Hello everyone!           # Send a message to the room\n/smile                        # Express happiness\n/laugh                        # Show amusement\n/dance                        # Celebrate with movement\n/whisper @username message    # Private message\n```\n\n### Emoji Aliases\n\n```\n:)    # Converts to /smile\n\u003c3    # Converts to /love\n:D    # Converts to /grin\n```\n\n## 🏗️ Architecture\n\n```\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Phoenix       │    │   LiveView      │    │   Channels      │\n│   Controllers   │◄──►│   Components    │◄──►│   (WebSockets)  │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n         │                       │                       │\n         ▼                       ▼                       ▼\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Ecto          │    │   GenServer     │    │   PubSub        │\n│   (Database)    │    │   (State)       │    │   (Messaging)   │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n```\n\n## 🧪 Testing\n\n```bash\n# Run the test suite\nmix test\n\n# Run tests with coverage\nmix test --cover\n\n# Run specific test files\nmix test test/emotext_web/channels/room_channel_test.exs\n```\n\n## 📚 API Documentation\n\nGenerate documentation with ExDoc:\n\n```bash\nmix docs\nopen doc/index.html\n```\n\n## 🌍 Internationalization\n\n**Note:** i18n is not currently supported but is planned for future releases. The application currently supports English only.\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development Guidelines\n\n- Follow Elixir style conventions\n- Write tests for new features\n- Update documentation as needed\n- Ensure all tests pass before submitting\n\n## 📋 Roadmap\n\n- [ ] Fix remaining issues upgrading elixir/phoenix\n- [ ] Channel bots and automation\n- [ ] Custom user commands\n- [ ] Integration with IRC networks\n- [ ] Internationalization (i18n)\n- [ ] User preferences and themes\n- [ ] Mobile application\n- [ ] Voice chat integration\n\n## 🛠️ Built With\n\n- **[Elixir](https://elixir-lang.org/)** - Functional programming language\n- **[Phoenix Framework](https://phoenixframework.org/)** - Web framework\n- **[Phoenix LiveView](https://hexdocs.pm/phoenix_live_view/)** - Real-time user experiences\n- **[Ecto](https://hexdocs.pm/ecto/)** - Database wrapper and query generator\n- **[PostgreSQL](https://www.postgresql.org/)** - Database\n- **[TailwindCSS](https://tailwindcss.com/)** - Utility-first CSS framework\n- **[Guardian](https://hexdocs.pm/guardian/)** - Authentication library\n\n## 📄 License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## 👥 Authors\n\n- **ryjen** - *Initial work* - [ryjen](https://github.com/ryjen)\n\n## 🙏 Acknowledgments\n\n- Inspired by the classic MUD games of the 1990s\n- WhatsApp's innovative use of the Erlang VM for massive scale\n- The Elixir and Phoenix communities for excellent documentation and support\n- The functional programming community for pushing the boundaries of software design\n\n## 📞 Support\n\n- Create an [issue](https://github.com/ryjen/emotext/issues) for bug reports\n- Start a [discussion](https://github.com/ryjen/emotext/discussions) for questions\n- Check the [documentation](https://hexdocs.pm/emotext/) for detailed guides\n\n---\n\n*Built with ❤️ and functional programming*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryjen%2Femotext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryjen%2Femotext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryjen%2Femotext/lists"}