Home

Awesome

GRAIN 🌾

Go Relay Architecture for Implementing Nostr

GRAIN is an open-source Nostr relay implementation written in Go. This project aims to provide an efficient and configurable Nostr relay.

Features

Prerequisites

MongoDB Server 🍃

I plan to add multiple other database types in the future (postgress, sqlite) 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
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. You can change configurations and relay_metadata here and the server will automatically restart and use the new configurations. The relay must be restarted manually for new blacklist configurations to take effect.

Development

To contribute to GRAIN, follow these steps:

  1. Fork the repository.

  2. Make your changes.

  3. Commit your changes:

    git commit -m "Description of changes"
    
  4. Push to the repo:

    git push
    
  5. Create a Pull Request.

License

This project is Open Source and licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

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.

Open Source and made with 💜 by OceanSlim