Discreetly is an anonymous, gated, chat application. Under the hood it uses a multiple zero-knowledge protocols such as RLN (Rate-Limiting Nullifier) to rate limit messages and Semaphore for identity management and group membership.



# 📖 Contents - [📖 Contents](#-contents) - [📚 Technologies](#-technologies) - [**Semaphore**](#semaphore) - [**RLNjs**](#rlnjs) - [**Bandada**](#bandada) - [**Express.js**](#expressjs) - [**MongoDB**](#mongodb) - [**Prisma**](#prisma) - [**SocketIO**](#socketio) - [📖 Getting started](#-getting-started) - [Install dependencies](#install-dependencies) - [Set environment variables given in the **.env.example**](#set-environment-variables-given-in-the-envexample) - [Initialize Prisma](#initialize-prisma) - [Run the server](#run-the-server) - [Running tests](#running-tests) - [🔩 Usage](#-usage) - [Style Guide](#style-guide)
# 📚 Technologies ### **Semaphore** Semaphore Identities are the core of Rate Limiting Nullifiers (RLN), CryptKeeper, and Bandada, providing support for anonymous signalling and experimental voting mechanisms within each chat room. ### **RLNjs** Rate Limiting Nullifier (RLN) is used to control the frequency of user interactions, thereby providing a robust mechanism to prevent spam. ### **Bandada** Bandada is employed for the management of user and group interactions within Semaphore Identity Commitments. ### **Express.js** ### **MongoDB** ### **Prisma** ### **SocketIO** --- # 📖 Getting started See the [frontend](https://github.com/Discreetly/frontend) to set that up as well ### Install dependencies ``` npm i ``` ### Set environment variables given in the **.env.example** ``` PASSWORD= //password for admin endpoints NODE_ENV= //development DATABASE_URL= //MongoDB Atlas URL DATABASE_URL_TEST= //MongoDB Atlas URL same as above or a seperate cluster for testing ``` ### Initialize Prisma ``` npx prisma db init && npx prisma db push ``` ### Run the server ``` npm run dev ``` Server information and endpoints will display in the console in development mode ### Running tests ``` npm run test ``` # 🔩 Usage
Endpoint Expected Response
[ '/', '/api' ]
Status: 200 OK
{ "id": "0", "name": "localhost", "version": "0.0.2" }
[ '/rooms/:idc', '/api/rooms/:idc' ]
Status: 200 OK
[ "" ]
[ '/room/:id', '/api/room/:id' ]
Status: 200 OK
{ "roomId": "", "name": "", "rateLimit": , "userMessageLimit": }
[ '/join', '/api/join' ]
Status: 200 OK
{ "status": "valid", "roomIds": [], }
#### Style Guide * Single Quotes