2024-07-22 19:33:54 +00:00
# GRAIN 🌾
2024-07-20 00:38:35 +00:00
2024-07-24 14:04:45 +00:00
## Go Relay Archetecture for Implementing Nostr
2024-07-19 22:07:04 +00:00
2024-07-22 19:33:54 +00:00
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.
2024-07-19 22:07:04 +00:00
## Features
2024-07-26 14:02:34 +00:00
- **NIP-01 Protocol Support**: GRAIN (nearly)fully supports NIP-01 for WebSocket communication.
- **Event Processing**: Handles all events by category and kind.
2024-07-19 23:06:38 +00:00
- **MongoDB 🍃**: Utilizes MongoDB to store and manage events efficiently.
2024-07-19 22:07:04 +00:00
- **Scalability**: Built with Go, ensuring high performance and scalability.
- **Open Source**: Licensed under the MIT License, making it free to use and modify.
2024-07-23 18:32:28 +00:00
## Configuration
2024-07-19 22:07:04 +00:00
2024-07-31 16:30:42 +00:00
Grain will automatically create the configurations and relay metadata files necessary if they do not already exist when you first run the program.
2024-07-19 22:07:04 +00:00
2024-07-31 16:30:42 +00:00
They are created in the root directory of Grain. Feel free to change any coinfigurations you want in these files.
2024-07-27 20:46:25 +00:00
2024-07-22 19:33:54 +00:00
### TODO
2024-07-26 14:02:34 +00:00
- configurable event purging
- by category
2024-07-25 00:54:50 +00:00
- by kind
- by time since latest
2024-07-22 19:33:54 +00:00
- create whitelist/blacklist functionality
for:
- valid nip05 domain
- pubkey
- npub
- kind int
- kind 1 wordlist
2024-07-19 22:07:04 +00:00
### Development
To contribute to GRAIN, follow these steps:
1. Fork the repository.
2024-07-22 19:33:54 +00:00
2. Make your changes.
3. Commit your changes:
2024-07-19 22:07:04 +00:00
2024-07-24 14:20:19 +00:00
```sh
git commit -m "Description of changes"
```
2024-07-19 22:07:04 +00:00
2024-07-22 19:33:54 +00:00
4. Push to the repo:
2024-07-19 22:07:04 +00:00
2024-07-24 14:20:19 +00:00
```sh
git push
```
2024-07-19 22:07:04 +00:00
2024-07-22 19:33:54 +00:00
5. Create a Pull Request.
2024-07-19 22:07:04 +00:00
### License
This project is Open Source and licensed under the MIT License. See the [LICENSE ](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. Happy coding!