A React-based community request management system that uses OpenBunker for Nostr authentication.
- OpenBunker Authentication: Secure Nostr key management through OAuth providers
- Nostr Integration: All requests are stored and managed through Nostr relays
- Request Form: Comprehensive form for submitting community requests
- Embeddable: Can be embedded in other websites via iframe
- Dashboard: User dashboard to manage requests and profile
- Node.js 18+
- pnpm (recommended) or npm
-
Clone the repository
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open http://localhost:5173 in your browser
The app supports two authentication methods:
- Uses Discord OAuth to generate new Nostr keys
- Secure remote signing through bunker servers
- No need to manage private keys locally
- Use existing Nostr secret keys
- Direct connection to relays
- Full control over your keys
- Login: Visit
/login
and choose your authentication method - Dashboard: After authentication, access your dashboard at
/dashboard
- Submit Requests: Use the "Create New Request" button to submit new requests
- Manage Profile: Update your Nostr profile information
The request form can be embedded in other websites:
<iframe
src="http://localhost:5173/embed?showHeader=false&requestType=technical"
width="100%"
height="600px"
frameborder="0"
>
</iframe>
showHeader
: Show/hide the header (default: true)requestType
: Pre-select request typepriority
: Pre-select priority leveltitle
: Pre-fill titledescription
: Pre-fill descriptionredirectUrl
: URL to redirect after submissioncancelUrl
: URL to redirect on cancellation
The embedded form communicates with the parent window:
window.addEventListener('message', event => {
if (event.data.type === 'REQUEST_CREATED') {
console.log('Request submitted:', event.data.data);
} else if (event.data.type === 'REQUEST_ERROR') {
console.error('Request error:', event.data.error);
} else if (event.data.type === 'REQUEST_CANCELLED') {
console.log('Request cancelled');
}
});
- NostrContext: Manages Nostr connection and authentication state
- RequestForm: Reusable form component for submitting requests
- LoginOptions: Authentication method selection
- DashboardPage: User dashboard and navigation
- User authenticates via OpenBunker or direct key
- Nostr connection established to relays
- Requests submitted as Nostr events (kind 30023)
- Events published to multiple relays for redundancy
- Dashboard displays user's requests from relays
Requests are stored as NIP-23 long-form content events:
{
"kind": 30023,
"content": "{\"title\":\"...\",\"description\":\"...\",...}",
"tags": [
["d", "request-1234567890"],
["title", "Request Title"],
["requestType", "technical"],
["priority", "high"],
["status", "pending"],
["t", "community-request"]
]
}
- Create new components in
src/components/
- Add new pages in
src/pages/
- Update routing in
src/App.tsx
- Add new types in
src/types/
The app uses Tailwind CSS for styling. Custom styles can be added to src/index.css
.
# Run tests
pnpm test
# Run linting
pnpm lint
pnpm build
No environment variables are required for basic functionality. For production:
- Set up proper OpenBunker server endpoints
- Configure relay URLs
- Set up proper CORS policies for embedding
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Open an issue on GitHub
- Check the Nostr documentation
- Review OpenBunker documentation