https://github.com/dalda-iitj/libr
A Moderated, Censorship-Resilient Digital Forum
https://github.com/dalda-iitj/libr
cryptography distributed-hash-tables forum golang postgresql
Last synced: 10 months ago
JSON representation
A Moderated, Censorship-Resilient Digital Forum
- Host: GitHub
- URL: https://github.com/dalda-iitj/libr
- Owner: DALDA-IITJ
- License: mit
- Created: 2025-03-31T09:47:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-04T08:25:24.000Z (about 1 year ago)
- Last Synced: 2025-08-01T00:30:41.283Z (11 months ago)
- Topics: cryptography, distributed-hash-tables, forum, golang, postgresql
- Language: Go
- Homepage:
- Size: 16.6 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LIBR
[
](https://golang.org)
[](https://vscode.dev/)
[](https://github.com/DALDA-IITJ/libr/graphs/contributors)
[](https://github.com/DALDA-IITJ/libr/network/members)
[](https://github.com/DALDA-IITJ/libr/stargazers)
[](https://github.com/DALDA-IITJ/libr/blob/main/LICENSE)
[](https://golang.org/)
*A Moderated, Censorship-Resilient Digital Forum* 📢🚫
[Key Features](#key-features) • [Installation](#installation) • [Documentation](#api-endpoints) • [Contributing](#contributing)
## 🔄 Overview
LIBR is a decentralized messaging platform that combines blockchain principles with content moderation to create a secure, distributed communication system. Built with Go for backend services and React for the user interface, LIBR provides a robust framework for verified message exchange with cryptographic proof of moderation and authenticity.
## 🔐 Key Features
- **Decentralized Messaging** 🌐: Exchange messages across a distributed network with cryptographic verification.
- **Content Moderation** 🪖: Multi-level content moderation with configurable thresholds for different categories of inappropriate content.
- **Signature Verification** ✅: Messages are cryptographically signed by both users and moderators, ensuring authenticity and approval.
- **Distributed Architecture** 🧰: Multiple moderator nodes validate content independently to prevent censorship and single points of failure.
- **Cryptographic Security** 🔒: RSA-based cryptography for message signing and verification.
- **Time-Based Message Bucketing** ⏰: Messages are grouped into time buckets for efficient retrieval and organization.
> 🚀 **Note**: LIBR is designed for environments where content moderation is necessary while maintaining the benefits of decentralization. It's ideal for educational institutions, private organizations, and communities seeking a balance between free expression and responsible content management.
## ⚙️ Prerequisites
- **Go** (v1.16 or higher)
- **Node.js** (v14 or higher)
- **Google Cloud Platform API key** (for content moderation services)
- **npm** or **yarn** package manager
## 🚀 Running the System
1. Start moderator nodes:
```bash
cd modules/mod
./mod
# Default port is 4000, can be configured in .env
```
2. Start client application:
```bash
cd modules/client
go run .
```
3. Start UI application:
```bash
cd modules/UI
npm start
```
## 📂 API Endpoints
### 🔧 Moderator Service
#### 🔒 Content Moderation
Send a message for moderation approval.
```bash
curl -X POST http://localhost:4000/moderate \
-H "Content-Type: application/json" \
-d '{
"message": "Your message content here",
"timestamp": "1681234567"
}'
```
#### 📊 Response Format
```json
{
"public_key": "moderator_public_key",
"sign": "digital_signature_of_approved_content"
}
```
### 📲 Client Service
#### 📢 Send Message
Submit a new message to the network.
```bash
# Endpoint implementation details in client module
```
#### 📃 Retrieve Messages
Get messages from a specific time bucket.
```bash
# Endpoint implementation details in client module
```
## 🚧 System Architecture
LIBR consists of several interconnected modules:
1. **Moderator Nodes** 🔧: Analyze message content for inappropriate material using Google Cloud Natural Language API.
2. **Client Module** 📡: Handles message creation, interaction with moderators, and storage operations.
3. **Core Module** 🔄: Provides cryptographic functions, configuration management, and blockchain interfaces.
4. **UI Module** 🎨: User interface for interacting with the messaging platform.
5. **Storage Layer** 📂: Distributed storage system for persisting signed messages.
## 🕵️ Content Moderation
LIBR supports customizable content moderation:
- Currently implemented using Google Cloud Natural Language API
- User-dependent moderation that can be customized based on needs
- Multiple moderation categories supported (toxic content, insults, profanity, etc.)
- Users can implement their own moderation services or use the provided API
To modify moderation settings, users can edit the configuration in the file:
```
modules/mod/config.go
```
## 📚 Contributing
1. Fork the repository to start working on your changes.
2. Create a feature branch.
3. Commit your changes.
4. Push to the branch.
5. Create a Pull Request to merge your changes.
## 🌐 License
This project is licensed under the terms of the MIT license. See [LICENSE](LICENSE) for more details.
## 👨💼 Team
LIBR is developed by the DALDA team at IIT Jodhpur. 🎓🌟