{"id":13806667,"url":"https://github.com/nag763/tchatchers","last_synced_at":"2025-04-04T15:10:52.878Z","repository":{"id":75577607,"uuid":"529531279","full_name":"nag763/tchatchers","owner":"nag763","description":"tchatchers is a blazing fast chat application built with Axum and Yew.rs","archived":false,"fork":false,"pushed_at":"2024-10-24T10:45:16.000Z","size":5845,"stargazers_count":190,"open_issues_count":1,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-24T11:18:16.727Z","etag":null,"topics":["axum","nginx","postgresql","redis","rust","wasm","websockets","yew"],"latest_commit_sha":null,"homepage":"https://tchatche.xyz","language":"Rust","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/nag763.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-08-27T08:49:18.000Z","updated_at":"2024-10-24T10:45:20.000Z","dependencies_parsed_at":"2024-02-22T21:27:50.258Z","dependency_job_id":"deb6c8c0-4ea9-4375-89b4-3880731004e8","html_url":"https://github.com/nag763/tchatchers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nag763%2Ftchatchers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nag763%2Ftchatchers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nag763%2Ftchatchers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nag763%2Ftchatchers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nag763","download_url":"https://codeload.github.com/nag763/tchatchers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198463,"owners_count":20900080,"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":["axum","nginx","postgresql","redis","rust","wasm","websockets","yew"],"created_at":"2024-08-04T01:01:14.524Z","updated_at":"2025-04-04T15:10:52.849Z","avatar_url":"https://github.com/nag763.png","language":"Rust","funding_links":[],"categories":["Web Framework","Projects"],"sub_categories":[],"readme":"![ci.yml](https://img.shields.io/github/actions/workflow/status/nag763/tchatchers/ci.yml)\n[![tchatchers-stars](https://img.shields.io/github/stars/nag763/tchatchers?style=social)](https://github.com/nag763/tchatchers/stargazers)\n[![tchatchers-license](https://img.shields.io/github/license/nag763/tchatchers)](https://raw.githubusercontent.com/nag763/tchatchers/main/LICENSE.MD)\n[![github-issues](https://img.shields.io/github/issues/nag763/tchatchers)](https://github.com/nag763/tchatchers/issues)\n[![instance-health](https://img.shields.io/website?down_color=red\u0026down_message=down\u0026label=public%20instance\u0026up_color=green\u0026up_message=up\u0026url=https%3A%2F%2Ftchatche.xyz)](https://tchatche.xyz)\n\n\u003cp align=\"center\"\u003e\u003cimg height=\"300\" src=\"https://raw.githubusercontent.com/nag763/tchatchers/main/.github/gh_logo.png\"\u003e\u003c/img\u003e\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003etchatchers\u003c/h2\u003e\n\u003ch4 align=\"center\"\u003eA blazing fast chat application built with Axum and yew.rs :rocket:\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nag763/tchatchers/main/.github/app_screens.png\"\u003e\u003c/img\u003e\u003c/p\u003e\n\n## TL;DR\n\n* :speech_balloon: tchatchers is a realtime chat application built with yew.rs (frontend) and axum (backend) frameworks.\n* :heavy_check_mark: Easy to use, only requires authentication informations to be used.\n* :rocket: Blazing fast, completely built on Rust.\n* :moon: Supports browser's dark mode.\n* :sparkles: Simple yet elegant UI.\n* :book: Translated in several languages.\n* :lock: With little data collected and robust security, this app is completly secured.\n* :ship: This application is fully optimized to be as small as possible for production environments.\n\n## How to access the application\n\nThe application is deployed on https://tchatche.xyz and should be compatible with any modern navigator.\n\nIt was formerly on tchatchers but the domain name renewal fee was too expensive.\n\n## About\n\ntchatchers is an application used to help clients to communicate between each others. It is built with yew.rs and axum server in order to provide blazing fast responses and strong API.\n\nThe main application's usage is to create rooms to talk between people being connected to the application. You like football ? Try the football room. You like philosophy ? Try the philosophy one.\n\nAll depends on you to chat how you want to .\n\n## :new: Installing the application locally and starting developping\n\nFollow [this guide](./SETUP.md). \n\n## Project structure\n\n```\n.\n├── Cargo.lock =\u003e Dependency lock file generated by Cargo\n├── Cargo.toml =\u003e Main configuration file for the Rust project\n├── CODE_OF_CONDUCT.md =\u003e Code of conduct for contributors\n├── docker-compose_dev.yml =\u003e Docker compose file for development environment\n├── docker-compose.yml =\u003e Docker compose file for production environment\n├── Dockerfile_back =\u003e Dockerfile for building the backend service\n├── Dockerfile_front =\u003e Dockerfile for building the frontend service\n├── Dockerfile_tct =\u003e Dockerfile for building the TCT tool\n├── LICENSE.MD =\u003e License file for the project\n├── Makefile.toml =\u003e Makefile for building and testing the project\n├── README.md =\u003e Project README file\n├── SETUP.md =\u003e Instructions for setting up the development environment\n├── setup.sh =\u003e Shell script for setting up the development environment\n├── tchatchers_back =\u003e Rust crate for the backend service\n├── tchatchers_cli_tools =\u003e Rust crate for command-line tools\n├── tchatchers_core =\u003e Rust crate for shared core functionality\n└── tchatchers_front =\u003e Rust crate for the frontend service\n└── tchatchers_async =\u003e Rust crate for the asynchronous service\n```\n\n## Rustdoc\n\nThe rustdoc can be found for each subproject at :\n\n- tchatchers_core : [here](https://tchatche.xyz/doc/tchatchers_core/) \n- tchatchers_back : [here](https://tchatche.xyz/doc/tchatchers_back/)\n- tchatchers_front : [here](https://tchatche.xyz/doc/tchatchers_front/)\n- tchatchers_async : [here](https://tchatche.xyz/doc/tchatchers_async/)\n- tct (tchatchers_cli_tool): [here](https://tchatche.xyz/doc/tct/)\n\n## Technologies used\n\n|Technology/Framework|Utility                     |Version|\n|--------------------|----------------------------|-------|\n|Rust                |Programming language        |1.68.2 |\n|Tailwind            |Stylesheets                 |3.X    |\n|yew.rs              |WASM Frontend framework     |0.20   |\n|axum                |Rust server                 |0.6.12 |\n|trunk-rs            |Rust development WASM server|0.16   |\n|nginx               |Reverse proxy server        |latest |\n|Postgres            |SQL engine                  |latest |\n|Redis               |Messaging and cache         |latest |\n\n## CICD\n\n![](https://raw.githubusercontent.com/nag763/tchatchers/main/.github/cicd.svg)\n\n## Production project architecture\n\n![](https://raw.githubusercontent.com/nag763/tchatchers/main/.github/application_schema.jpeg)\n\nThe production architecture consists of several layers :\n* \u003cu\u003eThe client\u003c/u\u003e, who uses the application and interacts with the different ressources.\n* \u003cu\u003eThe proxy layer\u003c/u\u003e, that defines some security constraints such as BruteForce mitigation, the HTTPS connection, the read time out and HTTP headers. This layer is the sole entry point for the client to the application, as others aren't publicly reachable since they are on another network.\n* \u003cu\u003eThe applicative layer :\u003c/u\u003e This contains two noticeable applicative layers :\n    - First, the front layer, a static WASM file being downloaded once by the client and then used to display the application's data to the client. Understand that there is no server side rendering.\n\n- \u003cu\u003eThe Asynchronous Layer\u003c/u\u003e: This layer, introduced in the updated architecture, is responsible for processing queued messages stored in Redis. It includes components such as the asynchronous payload, processor, and queue modules. These modules facilitate the retrieval, processing, and deletion of messages from the Redis queue.\n    - Secondly,the API layer, used to persist the application data, besides of permitting operations such as authentication and translation.\n* \u003cu\u003eThe data layer :\u003c/u\u003e Mainly used for persistence. The choice has been made to persist all the data onto a Postgres database, both the user's data and the chats. On network level, the data layer can only be accessed by the API layer, and is not exposed publicly. Redis on its side mainly stores the authorization and refresh tokens.\n\n\n## Postgres schema\n\nMade with one of my other tools, [doteur](https://github.com/nag763/doteur).\n\n![img](https://raw.githubusercontent.com/nag763/tchatchers/main/.github/schema.png)\n\n## Personnal objectives behind this project, feedback\n\nMy goal with this project was to learn more about both WASM and Websocket technologies besides of perfecting my Rust knowledge. It was really nice to build such a project and I hope it can inspire or help other peoples to built similar tools. I think the code is pretty good (even though it should be perfectible) on the back and core projects, but quite perfectible on the front one. It is to note that there are still some bugs remaining.\n\nMy feeling is that both Rust and WASM have a pretty good future when it comes to frontend apps. The backend side of Rust already has several frameworks that are making it a reliable language when it comes to handling data logic, and the development of yew.rs or similar technologies in the future could be a game changer for the interest users and firms have toward the language. \n\n## Special thanks\n\nThanks to the Rust community for all their advices and their time reviewing my project, it's always a pleasure to be part of such a community. :blush: :crab:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnag763%2Ftchatchers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnag763%2Ftchatchers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnag763%2Ftchatchers/lists"}