A decent chat server implementation in C++
haskal 5570eed169 Merge branch 'fix-cors' of alex/decent-cpp into master | 6 years ago | |
---|---|---|
Simple-Web-Server @ 1056bd2e70 | 6 years ago | |
Simple-WebSocket-Server @ fcc631b4d6 | 6 years ago | |
cmake | 6 years ago | |
json @ 8d104e6fe3 | 6 years ago | |
optional-lite @ 86ee3d2d4b | 6 years ago | |
.clang-format | 6 years ago | |
.gitignore | 6 years ago | |
.gitmodules | 6 years ago | |
CMakeLists.txt | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
crypto.cpp | 6 years ago | |
crypto.h | 6 years ago | |
data.cpp | 6 years ago | |
data.h | 6 years ago | |
dcstdint.h | 6 years ago | |
http.cpp | 6 years ago | |
http.h | 6 years ago | |
main.cpp | 6 years ago | |
util.cpp | 6 years ago | |
util.h | 6 years ago | |
ws.cpp | 6 years ago | |
ws.h | 6 years ago |
A decent server implementation in C++, using eidheim/Simple-Web-Server, eidheim/Simple-WebSocket-Server, and SQLite3.
Node.js is bloated and slow. This server is designed to be blazingly fast
,
fearlessly concurrent
, and guarantee data safety
.
Dependencies (install with your favorite package manager)
Older versions of dependencies will probably still work, but it's untested.
git clone --recursive https://notabug.org/haskal/decent-cpp.git
cd decent-cpp
mkdir build
cd build
cmake ..
make
./decent-cpp
Use MSYS MinGW64, and use cmake -G"MSYS Makefiles" ..
Items of the decent api that are currently implemented:
Status | Endpoint |
---|---|
DONE | Retrieve server version [GET /api] |
DONE | Retrieve all settings [GET /api/settings] |
DONE | Modify settings [PATCH /api/settings] |
WIP | Upload an image [POST /api/upload-image] |
WIP | List emotes [GET /api/emotes] |
WIP | Add a new emote [POST /api/emotes] |
WIP | View an emote [GET /api/emotes/:shortcode] |
WIP | Delete an existing emote [DELETE /api/emotes/:shortcode] |
DONE | Fetch the current user’s sessions [GET /api/sessions] |
DONE | Login [POST /api/sessions] |
DONE | Fetch session details [GET /api/sessions/:id] |
DONE | Logout [DELETE /api/sessions/:id] |
DONE | Send a message [POST /api/messages] |
DONE | Retrieve a message [GET /api/messages/:id] |
WIP | Edit a message [PATCH /api/messages/:id] |
WIP | Delete a message [DELETE /api/messages/:id] |
DONE | Get list of channels [GET /api/channels] |
DONE | Create a channel [POST /api/channels] |
DONE | Retrieve a channel [GET /api/channels/:id] |
DONE | Rename a channel [PATCH /api/channels/:id] |
DONE | Delete a channel [DELETE /api/channels/:id] |
DONE | Mark a channel as read [POST /api/channels/:id/mark-read] |
DONE | Get messages in channel [GET /api/channels/:id/messages] |
DONE | Update channel-specific role permissions [PATCH /api/channels/:id/role-permissions] |
DONE | Get channel-specific role permissions [GET /api/channels/:id/role-permissions] |
WIP | Retrieve all pinned messages [GET /api/channels/:id/pins] |
WIP | Pin a message [POST /api/channels/:id/pins] |
WIP | Unpin a message [DELETE /api/channels/:channelID/pins/:messageID] |
DONE | Fetch users [GET /api/users] |
DONE | Register (create new user) [POST /api/users] |
DONE | Retrieve a user by ID [GET /api/users/:id] |
DONE | List mentions of a user [GET /api/users/:id/mentions] |
WIP | Get a user's permissions [GET /api/users/:id/permissions] |
WIP | Update user details [PATCH /api/users/:id] |
WIP | Delete a user [DELETE /api/users/:id] |
WIP | Check if a username is available [GET /api/username-available/:username] |
DONE | List roles [GET /api/roles] |
DONE | Add a new role [POST /api/roles] |
DONE | Update a role [PATCH /api/roles/:id] |
DONE | Delete a role [DELETE /api/emotes/:id] |
Status | Event |
---|---|
DONE | pingdata |
DONE | pongdata |
DONE | server-settings/update |
DONE | message/new |
WIP | message/edit |
WIP | message/delete |
WIP | channel/new |
PARTIAL | channel/update |
WIP | channel/pins/add |
WIP | channel/pins/remove |
WIP | channel/delete |
WIP | user/new |
WIP | user/delete |
DONE | user/online |
DONE | user/offline |
WIP | user/update |
DONE | user/mentions/add |
WIP | user/mentions/remove |
WIP | emote/new |
WIP | emote/delete |
DONE | role/new |
DONE | role/update |
DONE | role/delete |
Donate tendies