{"id":25940870,"url":"https://github.com/sprinter05/gochat","last_synced_at":"2025-12-02T02:02:20.839Z","repository":{"id":279477852,"uuid":"889666337","full_name":"Sprinter05/gochat","owner":"Sprinter05","description":"gochat is a light, TCP-based Client-Server chat application that runs its own application protocol.","archived":false,"fork":false,"pushed_at":"2025-08-06T10:35:41.000Z","size":1395,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-17T11:26:25.804Z","etag":null,"topics":["chat","chat-application","client","golang","protocol-specification","server","tcp","tls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sprinter05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-16T22:44:13.000Z","updated_at":"2025-08-13T11:25:25.000Z","dependencies_parsed_at":"2025-11-22T10:01:36.741Z","dependency_job_id":null,"html_url":"https://github.com/Sprinter05/gochat","commit_stats":null,"previous_names":["sprinter05/gochat"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Sprinter05/gochat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sprinter05%2Fgochat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sprinter05%2Fgochat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sprinter05%2Fgochat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sprinter05%2Fgochat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sprinter05","download_url":"https://codeload.github.com/Sprinter05/gochat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sprinter05%2Fgochat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27443442,"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-12-02T02:00:06.387Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["chat","chat-application","client","golang","protocol-specification","server","tcp","tls"],"created_at":"2025-03-04T05:19:34.094Z","updated_at":"2025-12-02T02:02:20.833Z","avatar_url":"https://github.com/Sprinter05.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gochat\ngochat is a light, **TCP**-based, client-server, **E2E** (end-to-end) chat protocol. Said protocol is detailed in the [Specification](doc/SPECIFICATION.md).\n\n![Banner](images/gochat_banner_white.png)\n\n## Content\nThis repository includes:\n- The protocol [documentation](doc/SPECIFICATION.md)\n- A client application with:\n    - A **TUI** (terminal user interface)\n    - A **shell** interface\n- A **server** implementation with:\n    - The **source code**\n    - The [implementation](doc/IMPLEMENTATION.md) details.\n\n## Download\nYou can download the executables for both the **Client** and **Server** for both `Windows x86_64` and `Linux x86_64` in the [Releases](https://github.com/Sprinter05/gochat/releases/latest) page\n\n## Stack\n### Client stack\nThe client's local database is a [SQLite](https://www.sqlite.org/) database handled by [GORM](https://gorm.io/index.html). The client **TUI** is made possible thanks to [tview](https://github.com/rivo/tview).\n### Server stack\nThe server database runs under [MariaDB](https://mariadb.org/), also handled by [GORM](https://gorm.io/index.html).\n\n## Packages\ngochat is made up of the following packets:\n- **internal:**\n    - **log:** Implements a global **logging** system.\n    - **models:** Implements **concurrently-safe data types**.\n    - **spec:** Implements the common code between client and server that makes the **gochat protocol** and **implementation** work.\n- **client:**\n    - **commands:** Implements all the functionality required for **every client command** specified in the gochat protocol.\n    - **db:** Implements the **database** connection management.\n    - **ui**: Implements the **TUI** for the application.\n    - **cli**: Implements the **shell** for the application.\n- **server:**\n    - **db:** Implements the **database** connection management.\n    - **hubs**: Implements the functionalities required to **fulfill client requests**.\n\n## Protocol\nThe gochat protocol is made to run underneath a **TCP** connection. The protocol also supports **TLS**, **RSA-encrypted** communication between clients, **administrative commands** and subscription-based **hooks** (also called events).\n\nFor more information on the protocol, be sure to read the [Specification](doc/SPECIFICATION.md) and [Implementation](doc/IMPLEMENTATION.md).\n\n## Build\n### Compiling\nIn order to compile the client or server you may use the `Makefile`. To build the any of them, in the root of the repository, run:\n\n```bash\n$ make \u003cserver/client/all\u003e\n```\n\n\u003e Note: You can delete the compiled applications by running `make clean`\n\nExecuting any of these commands will generate a `build/` directory if it wasn't created already. In it, the compiled binary executables will be generated.\n\n### Running\nBoth client and server provide a `--help` argument to see the available parameters for the program. The configuration file will be loaded automatically if it exists in the current directory and is named `config.json`.\n \n## Running a client instance\nThe client application can be ran by just using the executable. Necessary files will be created automatically by the application. We recommend reading the **Quickstart Guides** for the [TUI](doc/TUI.md) and [Shell](doc/SHELL.md).\n\n### Where can I connect?\nWe have chosen to create our own server instance that you can connect to, hosted at `gochat.sprintervps.party` on port `8037` (TLS) and port `9037` (No TLS).\n\n## Running the server\n### Running under Docker\nThis repository provides a full **Compose** stack to run the server. The *Docker image* will be automatically pulled from `ghcr.io/sprinter05/gochat:latest` (`v1` also works as a version). But you can also manually compile it through the provided **Dockerfile** by using the following command (ran in the root directory):\n\n```bash\ndocker build -t Sprinter05/gochat:latest .\n```\n\nAfter that you will need to run the compose stack using the file found in `docker/compose.yml` and running the following command:\n\n```bash\ndocker compose up -d\n```\n\n\u003e Note: If you compiled the image manually make sure to change the image name in the gochat service inside the `compose.yml` file.\n\nOnce the stack has been initialised you will find *3 new folders* created in the same directory used to run the stack. The `config` folder contains the `server.json` configuration file which can be used to modify the behaviour of the server (restart is required after changes to the configuration file), the `logs` folder contains all the relevant server logs, and the `certs` folder is an empty folder that must be used if you want the **TLS** functionality (you must provide both the private key and certificate in said folder, making sure the names are correct in the configuration file).\n\n### Running manually\nTo run manually you must use a **MariaDB** database and modify the server's configuration file accordingly to be able to connect to it.\n\n### Creating TLS certificates\nYou may run the server with a **TLS** port by creating the required **TLS** certificates. It is recommended to use `certbot` for creating your certificates, following the instructions of your domain provider. The required files generated using `certbot` will be `fullchain.pem` (`cert_file`) and `privkey.pem` (`key_file`). Other methods should also work, but are not documented here. Please note that *self-signed* certificates are also supported, but not recommended.\n\n\u003e Note: When connecting to the server through the TLS port you must use the domain and port combination instead of using ip and port or the TLS certificate will fail to load.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsprinter05%2Fgochat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsprinter05%2Fgochat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsprinter05%2Fgochat/lists"}