A Nostr-based internet radio directory and player with full-text search capabilities.
- π΅ Radio Station Directory: Browse and discover internet radio stations on Nostr
- π Full-Text Search: Search stations by name and description (NIP-50)
- πΎ SQLite Storage: Persistent event storage (just files!)
- β‘ Fast Search: Powered by Bluge full-text search engine
- π Nostr Protocol: Built on the decentralized Nostr protocol
- βοΈ Modern Frontend: React + TypeScript + Tailwind CSS
- π No Dependencies: No Docker or external databases needed
wavefunc-rewrite/
βββ relay/ # Khatru-based Nostr relay with search
β βββ main.go # Relay implementation
β βββ setup.sh # Automated setup script
β βββ README.md # Relay documentation
βββ src/ # Frontend application
β βββ components/ # React components
β βββ lib/ # Utilities and hooks
βββ scripts/ # Seed and generation scripts
The relay provides the backend Nostr relay with SQLite storage and full-text search:
cd relay
./setup.sh
make devThis will:
- Install Go dependencies
- Create data directories
- Start the relay on port 3334
For more details, see relay/README.md
bun install# In one terminal: Start the relay
bun run relay
# In another terminal: Start the frontend
bun --hot src/index.tsxOr use the combined dev command:
bun devbun dev- Start relay, migrate 500 real stations, and run development serverbun dev:fake- Start relay with fake/test data instead of real stationsbun seed- Seed the relay with fake test databun start- Run in production modebun build- Build for production
bun run relay- Start the relaybun run relay:reset- Reset database and search indexcd relay && make dev- Run relay in development modecd relay && make reset-all- Reset all data
bun run tauri:dev- Start Tauri desktop developmentbun run tauri:build- Build Tauri desktop applicationbun run tauri:android- Initialize and run Android emulatorbun run tauri:android:build- Build Android APK
bun run migrate- Migrate 500 random stations from legacy database (default)bun run migrate 50- Migrate 50 random stationsbun run migrate 1000- Migrate 1000 random stations
Note: Duplicate stations (same name + country) are automatically merged into single events with multiple streams.
See legacy-db/README.md for details on the legacy database structure and migration process.
- Khatru - Nostr relay framework
- Bluge - Full-text search engine
- SQLite - Primary event storage (via eventstore/sqlite3)
- Go 1.23+ - Programming language
- Bun - Fast JavaScript runtime & bundler
- React 19 - UI framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- NDK - Nostr Development Kit
- shadcn/ui - UI component library
The relay can be configured via command-line flags:
cd relay
go run . \
--port 3334 \
--db-path ./data/events.db \
--search-path ./data/searchAll data is stored in local files - no external configuration needed!
To start fresh:
bun run relay:reset
bun run seedcd relay
# View SQLite database
sqlite3 data/events.db
# Check data directory
ls -la data/The app automatically detects when running on Android and uses the correct relay URL:
- Desktop/Web:
ws://localhost:3334 - Android Emulator:
ws://10.0.2.2:3334(Android's special IP to reach host machine)
To develop for Android:
-
Ensure the relay is running on your host machine:
bun run relay
-
Start the Android emulator:
bun run tauri:android
The app will automatically connect to the relay using the platform-appropriate URL. No additional configuration needed!
See SPEC.md for detailed specification.
- 31237 - Radio Station Events
- 30078 - Favorites Lists & Featured Station Lists
- 31990 - NIP-89 Handler Events
- 31989 - NIP-89 Recommendation Events
- 1311 - Live Chat Messages
- 1111 - Station Comments
The relay implements the following NIPs:
- NIP-01: Basic protocol flow
- NIP-09: Event deletion
- NIP-11: Relay information document
- NIP-12: Generic tag queries
- NIP-15: End of stored events notice
- NIP-16: Event treatment
- NIP-20: Command results
- NIP-22: Comment events
- NIP-33: Parameterized replaceable events
- NIP-40: Expiration timestamp
- NIP-50: Search capability
See LICENSE file for details.
Contributions are welcome! Please read the SPEC.md for the event structure specification.