Nostr to Gopher/Gemini/Finger Gateway
nophr is a personal gateway that serves your Nostr content via legacy internet protocols: Gopher (RFC 1436), Gemini, and Finger (RFC 742).
- Single-tenant by default - shows one operator's notes and articles from Nostr
- Config-first - everything configurable via file and env overrides
- Protocol servers - Gopher, Gemini, and Finger simultaneously
- Inbox/Outbox model - aggregates replies, reactions, and zaps from Nostr
- Smart relay discovery - uses NIP-65 (kind 10002) for dynamic relay hints
- Controlled sync scope - sync self/following/mutual/FOAF with caps and deny lists
- Embedded storage - uses Khatru relay with SQLite backend (LMDB planned; not yet implemented in this build)
- Protocol-specific rendering - gopher menus, gemini gemtext, finger responses
Current implementation status:
- ✅ Configuration system with YAML parsing, validation, and display customization
- ✅ Storage layer with Khatru integration and SQLite backend
- ✅ Custom tables for relay hints, social graph, sync state, and aggregates
- ✅ Nostr client with relay discovery and event synchronization
- ✅ Protocol servers: Gopher (RFC 1436), Gemini (with TLS), and Finger (RFC 742)
- ✅ Content rendering with markdown support for all protocols
- ✅ Aggregates system for interaction tracking (reactions, zaps, replies)
- ✅ Display customization with headers, footers, and content filtering
- ✅ Comprehensive caching layer (memory and Redis support)
The core functionality is implemented and working. Focus is now on polish, optimization, and additional features.
# Clone repository
git clone https://github.com/sandwichfarm/nophr.git
cd nophr
# Build
make build
# Run
./dist/nophr --version# Generate example configuration
./dist/nophr init > nophr.yaml
# Edit with your npub and seed relays
vim nophr.yaml
# Validate configuration
./dist/nophr --config nophr.yaml- Go 1.25 or later
- Make
- golangci-lint (for linting)
# Run all checks
make check
# Run tests
make test
# Run linters
make lint
# Build binary
make build
# Run locally
make devnophr/
├── cmd/nophr/ # Main application
├── internal/ # Private application code
├── pkg/ # Public libraries
├── configs/ # Example configurations
├── scripts/ # Build and CI scripts
├── memory/ # Design documentation
├── docs/ # User documentation
└── test/ # Integration tests
nophr follows a config-first philosophy with clear separation of concerns:
- Storage Layer - Khatru relay with SQLite (LMDB planned; not yet implemented in this build)
- Sync Engine - Discovers and syncs from Nostr relays
- Protocol Servers - Gopher (port 70), Gemini (port 1965), Finger (port 79)
- Rendering - Protocol-specific content transformation
- Caching - In-memory or Redis for performance
For detailed architecture, see memory/architecture.md.
memory/configuration.md- Configuration referencememory/architecture.md- System architecturememory/storage_model.md- Storage layer designAGENTS.md- Guidelines for contributors and AI agents
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
For AI agents working on this project, please read AGENTS.md first.
MIT License - see LICENSE for details.
- Issues: https://github.com/sandwichfarm/nophr/issues
- Discussions: https://github.com/sandwichfarm/nophr/discussions
Built with ❤️ for the Nostr and legacy internet communities.