Skip to content

Astelta/parkchat-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗨️ parkchat-client CodeFactor Go Report Card GitHub release (latest by date) License

A lightweight terminal chat client written in Go, using WebSockets and HTTP for history fetching.

It connects to a chat server with authentication, supports multiple rooms, and allows customization via a configuration file.


✨ Features

  • 🔑 User authentication via Basic Auth (nickname:password)

  • 🌐 Multiple chat rooms with /room <name> command

  • ⏳ Fetches room history when joining

  • 🎨 Configurable settings:

  • nickname & password

  • default room

  • server address

  • timestamp format

  • message prefix

  • custom prompt symbol

  • 📜 Message display with timestamps

  • custom colors


📦 Installation

Clone the repository and build the client:

git clone https://github.com/Astelta/parkchat-client.git
cd parkchat-client
go build -o parkchat-client

Or download a binary from the release page: release page.

Run the client:

./parkchat-client

👤 Registering a User

Before using the client, you must create an account on the server.

This is done with a POST request to the /register endpoint.

Linux/macOS (using curl):

curl -X POST http://chat.astelta.world/register \
-H "Content-Type: application/json" \
-d '{"nickname":"YourNickname","password":"YourPassword"}'

Windows (using PowerShell):

Invoke-WebRequest -Uri "http://chat.astelta.world/register" `
-Method POST `
-Headers @{ "Content-Type" = "application/json" } `
-Body '{"nickname":"YourNickname","password":"YourPassword"}'

⚙️ Configuration

You can provide a config.json file in the same directory.

Default configuration:

{
"nickname": "",
"password": "",
"start_room": "Ogolny",
"server_ip": "chat.astelta.world",
"message_prefix": "",
"timestamp_format": "02/01 15:04",
"prompt": "> ",
"websocket_port": "8080",
"colors": {
	"user": {
		"nickname": "blue",
		"text": "",
		"date": "green",
		"background": ""
	},
	"messages": {
		"nickname": "yellow",
		"text": "",
		"date": "cyan",
		"background": ""
	},
	"system": {
		"nickname": "red",
		"text": "brightCyan",
		"date": "brightGreen",
		"background": ""
	}
}
}

If no config file is found, the client will ask for credentials and room name interactively.

You can also customize your colors with the following available (those might be displayed differently depending on your system settings):

table of colors

Also the background:

table of background colors


💻 Usage

  • Type messages and press Enter to send

  • Commands:

  • /room <name> → switch to another chat room

  • /exit → logout and quit the client

  • /update → check for the latest version and update the app

Example session:


✅ Joined room 'Ogolny' as Alice

📜 Room:

[08/09 14:30] Bob: Hello!

[08/09 14:31] Alice: Hi everyone!

  

> /room New

✅ Joined room 'New' as Alice


📝 Notes

  • The client requires a running chat server that provides:

  • WebSocket endpoint at /ws/{room}

  • HTTP history endpoint at /history/{room}

  • Registration endpoint at /register

  • Authentication is done via Basic Auth headers (nickname:password).

About

a simple cli communicator with rooms to chat on

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages