Skip to content

Commit

Permalink
Merge pull request #4 from limuy2022/main
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
marci1175 authored Aug 31, 2024
2 parents 3d04a58 + 9fda1df commit f31aef6
Show file tree
Hide file tree
Showing 29 changed files with 505 additions and 456 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: typos

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: typos-action
uses: crate-ci/typos@master
with:
files: .
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,76 @@
# Matthias

A (soon to be) multiplatform self-hosted chat application built completely in Rust.

## Features
| Features | Desktop | Mobile |
| -------- | ------- | ------- |
| Encrypted messages ensuring security |||
| Backend which doesn't rely on any central provider |||
| Customizable profiles |||
| Text, audio, image, file messages, and images |||
| Custom emojis |||
| Intuitive user interface |||
| Experimental MD (Markdown) support |||
| Voice calls |||
| Extensive lua (using luajit) API with documentation at [Gitbook](https://matthias.gitbook.io/) with external libs available |||
| Custom connection urls (If the app is installed through the installer) This allows the user to connect to a server with just a link |||

| Features | Desktop | Mobile |
| ----------------------------------------------------------------------------------------------------------------------------------- | ------- | ------ |
| Encrypted messages ensuring security |||
| Backend which doesn't rely on any central provider |||
| Customizable profiles |||
| Text, audio, image, file messages, and images |||
| Custom emojis |||
| Intuitive user interface |||
| Experimental MD (Markdown) support |||
| Voice calls |||
| Extensive lua (using luajit) API with documentation at [Gitbook](https://matthias.gitbook.io/) with external libs available |||
| Custom connection urls (If the app is installed through the installer) This allows the user to connect to a server with just a link |||

**Disclaimer: The application has never been security audited, and has known flaws.**

### Additional Features (For desktop only):

- Windows installer (Using a Visual Studio project)

# Children repositories (Crates/Repos created for the purpose of showcasing/improving Matthias)

- [Wincam](https://github.com/marci1175/wincam) (Used to capture images from the host's camera)
- [Protocol Showcase](https://github.com/marci1175/matthias-tokio-protocol/tree/master) (Used to showcase Matthias's TCP protocol)
- [mLua proc macro](https://github.com/marci1175/mlua_proc_macro) (Used in creating the lua API)

_________________________________________________________
__All this__ with great performance, due to the project being multi-threaded, using async calls with egui, and many more!
---

**All this** with great performance, due to the project being multi-threaded, using async calls with egui, and many more!
I have also tried to make my codebase futureproof by implementing custom automatizations (Example: code generating for emojis) and custom proc macros.
_________________________________________________________

---

## How to compile:

- First, you must have the Rust compiler installed on your computer with all of its dependencies.
- The next step is to download the source code of this project. (whether that be git cloning or downloading it from github's website)
- Navigate to the source folder and run ```cargo r --release``` (Or without --release for debugging)
- Navigate to the source folder and run `cargo r --release` (Or without --release for debugging)
- Please note that some features may not be available when running the application after compilation (For links to work you must "install" the application through the installer provided)

### How to create an installer (Note: You must have the Visual Studio installed for this):

- Navigate to `desktop/Installer` in the project folder, and open up the Matthias.sln file.
- Click on build on the top menu bar and click Build Solution (Or use the `ctrl+shift+b` key combination)
- After building go to `desktop/Installer/MatthiasSetup/Release/` and you will find two files:
- One containing the dependencies (Smaller file size)
- One containing the application itself (Bigger file size)

## Community

Feel free to chat in the official [Matthias discord server](https://discord.gg/66KFkByMGa)!

## Preview

### Lua API

![lua api](https://github.com/marci1175/Matthias/blob/813d91dec618beca08e85f9c09e7acb1d977c03d/.github/assets/luaapi.png)

### Messages

![Messages](https://github.com/marci1175/Matthias/blob/813d91dec618beca08e85f9c09e7acb1d977c03d/.github/assets/messages.png)

### Register page

![Register page](https://github.com/marci1175/Matthias/blob/813d91dec618beca08e85f9c09e7acb1d977c03d/.github/assets/register.png)

**When wanting to install both, start by opening up the smaller file (Dependency installer), it will automatically open up the application installer.**

# Legacy

- The predecessor of Matthias was [ChatApp](https://github.com/marci1175/ChatApp)
6 changes: 4 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Security Policy

## Supported Versions
Only the latest verison of the application will recive security updates, as I am not going to maintain older versions of the app.

Only the latest version of the application will receive security updates, as I am not going to maintain older versions of the app.

## Reporting a Vulnerability

Write an accurate description of what this vulnerability is capable of.
Write an accurate step-by-step tutorial on how to replicate/exploit a bug in the app.

## Report outcomes
If the vulnerability report is accepted, a fix for it will most likely be present in the next quickfix/version.

If the vulnerability report is accepted, a fix for it will most likely be present in the next quickfix/version.
5 changes: 5 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[default.extend-words]
caf = "caf"

[files]
extend-exclude = ["*.vdproj"]
18 changes: 9 additions & 9 deletions desktop/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl eframe::App for backend::Application
Some(sep_idx) => {
let (address, password) = link.split_at(sep_idx);

//Leave out parts of the password which are artifically added to the argmuent
//Leave out parts of the password which are artificially added to the argmuent
let password = &password[1..password.len() - 1];

//Connect to server
Expand Down Expand Up @@ -274,8 +274,8 @@ impl eframe::App for backend::Application
};
});

//Connection reciver
match self.connection_reciver.try_recv() {
//Connection receiver
match self.connection_receiver.try_recv() {
Ok(connection) => {
if let Some(connection) = connection {
//Modify client_connection
Expand Down Expand Up @@ -304,10 +304,10 @@ impl eframe::App for backend::Application
}
}
else {
// A race condition will occur if we connected succesfully after getting a connection error (request timed out)
// A race condition will occur if we connected successfully after getting a connection error (request timed out)
// So we check if we have already made the connection before actually modifying the value based on the timed out request
if !matches!(self.client_connection.state, ConnectionState::Connected(_)) {
//If we recived a None it means we have an error
//If we received a None it means we have an error
self.client_connection.state = ConnectionState::Error;
self.disconnect_from_server();
}
Expand All @@ -319,7 +319,7 @@ impl eframe::App for backend::Application
}

//Voip instance listener
match self.voip_connection_reciver.try_recv() {
match self.voip_connection_receiver.try_recv() {
Ok(voip) => {
self.client_ui.voip = Some(voip.clone());

Expand Down Expand Up @@ -477,7 +477,7 @@ impl backend::Application
});

ui.horizontal(|ui| {
ui.label("Microphone volume precentage");
ui.label("Microphone volume percentage");
self.client_ui
.microphone_volume
.fetch_update(
Expand Down Expand Up @@ -516,7 +516,7 @@ impl backend::Application
//Reset all messages and everything else
self.client_ui.incoming_messages = ServerMaster::default();

//Forget all imaes so the cahced imges will be deleted
//Forget all imaes so the cached imges will be deleted
ctx.forget_all_images();

let toasts = self.toasts.clone();
Expand Down Expand Up @@ -838,7 +838,7 @@ pub fn read_extensions_dir() -> anyhow::Result<Vec<ExtensionProperties>>
for entry in fs::read_dir(format!("{}\\matthias\\extensions", env!("APPDATA")))? {
let dir_entry = entry.map_err(|err| Error::msg(err.to_string()))?;

//If the file doesnt have an extension, then we can ingore it
//If the file doesnt have an extension, then we can ignore it
if let Some(extension) = dir_entry.path().extension() {
//If the file is a lua file
if extension.to_string_lossy() == "lua" {
Expand Down
Loading

0 comments on commit f31aef6

Please sign in to comment.