readme updated

This commit is contained in:
0ceanSlim 2024-08-01 15:20:24 -04:00
parent 78ab44a11f
commit f68cf27bb6

View File

@ -2,35 +2,34 @@
## Go Relay Archetecture for Implementing Nostr
GRAIN is an open-source Nostr relay implementation written in Go. This project aims to provide a robust and efficient Nostr relay that currently supports the NIP-01 of the nostr protocol.
GRAIN is an open-source Nostr relay implementation written in Go. This project aims to provide an efficient and configurable Nostr relay.
## Features
- **NIP-01 Protocol Support**: GRAIN (nearly)fully supports NIP-01 for WebSocket communication.
- **Event Processing**: Handles all events by category and kind.
- **MongoDB 🍃**: Utilizes MongoDB to store and manage events efficiently.
- **Scalability**: Built with Go, ensuring high performance and scalability.
- **Dynamic Event Handling**: Capable of processing a wide range of events, categorized by type and kind, including support for event deletion as per NIP-09.
- **Configurable and Extensible**: Easily customizable through configuration files, with plans for future GUI-based configuration management to streamline server adjustments.
- **Efficient Rate Limiting**: Implements sophisticated rate limiting strategies to manage WebSocket messages, - events, and requests, ensuring fair resource allocation and protection against abuse.
- **Flexible Event Size Management**: Configurable size limits for events, with optional constraints based on - event kind, to maintain performance and prevent oversized data handling.
- **MongoDB Integration 🍃**: Utilizes MongoDB for high-performance storage and management of events, ensuring data integrity and efficient query capabilities.
- **Scalable Architecture**: Built with Go, leveraging its concurrency model to provide high throughput and scalability, suitable for handling large volumes of data and connections.
- **Relay Metadata Support (NIP-11)**: Provides relay metadata in compliance with NIP-11, allowing clients to retrieve server capabilities and administrative contact information.
- **User-Friendly Front-End**: Includes a web interface that displays recent events and supports potential future enhancements like configuration management.
- **Open Source**: Licensed under the MIT License, making it free to use and modify.
## Prerequisites
**MongoDB Server 🍃**
GRAIN 🌾 leverages MongoDB for efficient storage and management of events. MongoDB, known for its high performance and scalability, is an ideal choice for handling large volumes of real-time data. GRAIN 🌾 uses MongoDB collections to store events categorized by kind and ensures quick retrieval and manipulation of these events through its robust querying capabilities.
You can get the free Community Server edition of MongoDB from the official MongoDB website:
[MongoDB Community Server](https://www.mongodb.com/try/download/community)
MongoDB provides extensive documentation and support to help you get started with installation and configuration, ensuring a smooth integration with GRAIN.
## Configuration
Grain will automatically create the configurations and relay metadata files necessary if they do not already exist when you first run the program.
They are created in the root directory of Grain. Feel free to change any coinfigurations you want in these files.
### TODO
- configurable event purging
- by category
- by kind
- by time since latest
- create whitelist/blacklist functionality
for:
- valid nip05 domain
- pubkey
- npub
- kind int
- kind 1 wordlist
They are created in the root directory of Grain. You can change configurations and relay_metadata here. The relay must be restarted for new configurations to take effect.
### Development
@ -60,4 +59,6 @@ This project is Open Source and licensed under the MIT License. See the [LICENSE
Special thanks to the Nostr community for their continuous support and contributions.
Feel free to reach out with any questions or issues you encounter while using GRAIN. Happy coding!
Feel free to reach out with any questions or issues you encounter while using GRAIN.
Open Source and made with 💜 by [OceanSlim](https://njump.me/npub1zmc6qyqdfnllhnzzxr5wpepfpnzcf8q6m3jdveflmgruqvd3qa9sjv7f60)