CLI chat to just chat. No ads, no statistics collection, no special terms, no unknown third-party services, no spies, no tricky interfaces... no bullshit.
ya2ber is just derived from yabber, which is the synonym for jabber, which is the synonym for usual talk.
- Authentication based on login and password.
- Shows how many visitors are in the chat. Currently, this info is shown in PS1 prompt.
- Chat members are notified when someone left.
- There are 3 message categories/types - system (including ones from server), authentication purposed and just chat messages.
- Client and server use JSON as data format for transmitting data to each other. See how.
- Entering of password is hidden (like many other CLI applications do, including
sudo
) and isn't stored in history. - Authentication errors are well recognized because of verbose error messages.
- Client doesn't contain any validation logic for user credentials, this a server's responsibility.
- Server stores such specific user data: registration date, last activity date and last used IP address.*
- Server doesn't store any message history. Instead, client could store history locally as an option.
- Prevention of typosquatting in usernames.
- Rework UI for using blessed curses-like library
- libsignal library is used for communication encryption
*
actually, server stores last login date rather than last activity date for now
Example of client's message:
{
"message": "Hello, username!",
"type": "message",
"command": "/username"
}
Example of server's message:
{
"message": "username left the chat",
"type": "system",
"online": 5
}
git clone git@github.com:zhibirc/ya2ber.git
cd ya2ber
# it'll automatically install dependencies in all nested application folders
npm install
We use pre-commit for running code checks locally, just before committing, to ensure that all basic code requirements and policies were respected. Installation is pretty simple (one-time action):
# install pre-commit using Python's pip
pip install pre-commit
# OR
# install pre-commit using using Homebrew
brew install pre-commit
# install the Git hook scripts
pre-commit install
Now pre-commit will run automatically on git commit
!
Configuration for pre-commit hooks is stored in .pre-commit-config.yaml
file.
pre-commit notes
- If you want to skip all the pre-commit checks (not recommended!), you can add the
-n
parameter as follows:
git commit -m "commit message" -n
- Alternatively if you only want to skip some specific check, you can use
SKIP=<hook_id>
before the command:
SKIP=codespell git commit -m "commit message"
Generally, it may be necessary to use some sensitive data, usually stored in environment variables, in application. For example, AWS keys. If so, it's important to remember that any sensitive data shouldn't be leaked to the public, including GitHub repository.
To accomplish this, create .env.local file (don't use .env file in this case) in the appropriate directory (client/ or server/), and put environment variables intended to be private there. This file is ignored by Git and excluded from Docker context on image build.
We use GNU Make for automate operations related to source code and application deployment.
Get help/guide for all available commands.
make
make help