Skip to content
RacoonByte01Public

About

A lightweight, self-hosted API for sending and receiving PGP-encrypted messages, with built-in user, role, and group management.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Chatychat

A lightweight, self-hosted API for sending and receiving PGP-encrypted messages, with built-in user, role, and group management. Keep your communications private and maintain full control over your data by running everything on your own server.

Features

  • User management
  • Group management
  • Role management
  • Send and receive messages

Requirements

  • Java 17
  • Apache Maven 3.9.16

Installation

Clone the repository and launch it with this command:

git clone https://github.com/RacoonByte01/ChatyChat.git
cd ChatyChat
./mvnw spring-boot:run

Or build it as a .jar with:

./mvnw clean package

Usage

Users

Method Endpoint Description
GET /users Get all users
GET /user/:name Get especifi user
POST /user Create new user
PUT /user Update user
DELETE /user Delete user

Tokens

Tokens are a fundamental part of the authentication process. They are generated via login and serve as credentials for authenticating the user.

It uses the Authorization header to pass the token.

Method Endpoint Description
GET /tokens Get all tokens
POST /login Create token
DELETE /token Delete specific token
DELETE /logout Delete token used in Authorization header

Groups

Groups are used to organize users and store the roles assigned to them.

Method Endpoint Description
GET /groups Get all groups the user belongs to
GET /group/:id Get specific group the user belongs to
POST /group Create new group (user is set as admin)
POST /group/:id Add user to the group
PUT /group/:id Update group
PUT /group/:id/:name Update role of specific user
DELETE /group/:id Delete specific group
DELETE /group/exit/:id Delete your user of specific group
DELETE /group/:id/:name Delete specific user

Roles

Roles are used to restrict or grant access to other users.

This number is converted to binary, and depending on whether a bit is enabled or disabled, a specific action will be allowed or denied.

Bit Value Action Description
0 1 Read Allow read the group
1 2 Write Allow write to the group
2 4 Add user Allow add users to the group
3 8 Update roles Allow update other users roles
4 16 Delete user Allow remove users from a group
5 32 Update group Allow update the group
6 64 Delete group Allow delete the group

Note

A user with role 0 has no management permissions and cannot perform any group actions beyond the permissions granted by the group.

A user with role 127 has full management permissions and can manage the group with the same level of control as an administrator.

Messages

Method Endpoint Description
GET /messages/:id Get all messages of a group
POST /send/:id Get all groups the user belongs to

About

A lightweight, self-hosted API for sending and receiving PGP-encrypted messages, with built-in user, role, and group management.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages