Giter Site home page Giter Site logo

xieren58 / tchatchers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nag763/tchatchers

0.0 0.0 0.0 711 KB

tchatche.rs is a blazing fast chat application built with Axum and Yew.rs

Home Page: https://tchatche.rs

License: MIT License

Shell 0.07% JavaScript 0.32% Rust 99.03% HTML 0.58%

tchatchers's Introduction

tchatchers-stars tchatchers-license github-issues

tchatche.rs

A blazing fast chat application built with Axum and yew.rs ๐Ÿš€

TL;DR

  • ๐Ÿ’ฌ tchatche.rs is a realtime chat application built with yew.rs (frontend) and axum (backend) frameworks.
  • โœ”๏ธ Easy to use, only requires authentication informations to be used.
  • ๐Ÿš€ Blazing fast, completely built on Rust.
  • ๐ŸŒ” Supports browser's dark mode.
  • โœจ Simple yet elegant UI.

How to access the application

The application is deployed on https://tchatche.rs and should be compatible with any modern navigator.

About

tchatche.rs is an application used to help clients to communicate between each others. It is built with yew.rs and axum servers in order to provide blazing fast responses and strong API. It is also using Postgres and Redis services in order to store the user data and retrieve the room messages.

Project structure

.
โ”œโ”€โ”€ Cargo.lock
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ CODE_OF_CONDUCT.md
โ”œโ”€โ”€ docker-compose_dev.yml => in order to launch redis and pg services in
development
โ”œโ”€โ”€ docker-compose.yml => deployment docker-compose file
โ”œโ”€โ”€ Dockerfile_back => deployment backend dockerfile
โ”œโ”€โ”€ Dockerfile_front => deployment frontend dockerfile
โ”œโ”€โ”€ Dockerfile_migrations => deployment migrations dockerfile
โ”œโ”€โ”€ LICENSE.md
โ”œโ”€โ”€ migrations => PG migration projet, has to be ran with sqlx
โ”œโ”€โ”€ nginx.conf => the nginx configuration
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ tchatchers_back => the backend project
โ”œโ”€โ”€ tchatchers_core => the core project, gathers the APi shared both by the
front and backend
โ””โ”€โ”€ tchatchers_front => the frontend project

Technologies used

Technology/Framework Utility Version
Rust Programming language 1.64
Tailwind Stylesheets 3.X
yew.rs WASM Frontend framework 0.19
axum rust server 0.5.4
trunk-s Rust development WASM server 0.16
nginx Reverse proxy server latest
Postgres SQL engine latest
Redis Key value NoSQL engine latest

Production project architecture

The production architecture consists of several layers :

  • The client, who uses the application and interacts with the different ressources.
  • The proxy layer, 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.
  • The applicative layer : One part being the frontend built in WASM, so static assets in production, another part being the backend, built in axum, so running as a task. It is important to note that in production, only the backend part exists, since the frontend and proxy are on the same image. Besides, only the backend can access to the data layer within the network.
  • The data layer : Mainly used for persistence. While Postgres will contain the data about the users, redis will store the messages that have been sent in the chatrooms. Postgres schema can be found right below, redis one is as simple as ROOM_NAME[KEY]=MESSAGES[LIST].

Postgres schema

Made with one of my other tools, doteur.

img

Personnal objectives behind this project, feedback

My 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.

My 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.

Special thanks

Thanks 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. ๐Ÿ˜Š ๐Ÿฆ€

tchatchers's People

Contributors

nag763 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.