The Complete Framework for Building Nostr Clients with AI
MKStack is an AI-powered framework for building Nostr applications with React 18.x, TailwindCSS 3.x, Vite, shadcn/ui, and Nostrify. Build powerful Nostr applications with AI-first development - from social feeds to private messaging, MKStack provides everything you need to create decentralized apps on the Nostr protocol.
Build your Nostr app in 3 simple steps:
npm install -g @getstacks/stacks
stacks mkstackstacks agent
# Tell Dork AI what you want: "Build a group chat application"npm run deploy
# β
App deployed to NostrDeploy.com!- π€ AI-First Development: Build complete Nostr apps with just one prompt using Dork AI agent
- β‘ 8 Minutes Average: From idea to deployed application in minutes, not months
- π 50+ NIPs Supported: Comprehensive Nostr protocol implementation
- π¨ Beautiful UI: 48+ shadcn/ui components with light/dark theme support
- π Built-in Security: NIP-07 browser signing, NIP-44 encryption, event validation
- π° Payments Ready: Lightning zaps (NIP-57), Cashu wallets (NIP-60), Wallet Connect (NIP-47)
- π± Production Ready: TypeScript, testing, deployment, and responsive design included
- React 18.x: Stable version with hooks, concurrent rendering, and improved performance
- TailwindCSS 3.x: Utility-first CSS framework for styling
- Vite: Fast build tool and development server
- shadcn/ui: 48+ unstyled, accessible UI components built with Radix UI
- Nostrify: Nostr protocol framework for Deno and web
- React Router: Client-side routing with BrowserRouter
- TanStack Query: Data fetching, caching, and state management
- TypeScript: Type-safe JavaScript development
Each of these applications was created with just a single prompt to Dork AI:
-
Group Chat Application:
"Build me a group chat application" -
Decentralized Goodreads:
"Build a decentralized goodreads alternative. Use OpenLibrary API for book data." -
Chess Game:
"Build a chess game with NIP 64"
Real Nostr applications built using MKStack:
- Chorus: Facebook-style groups on Nostr with built-in eCash wallet
- Blobbi: Digital pet companions that live forever on the decentralized web
- Treasures: Decentralized geocaching adventure powered by Nostr
Browse more apps made with MKStack β
LoginAreacomponent with account switchinguseCurrentUserhook for authentication stateuseAuthorhook for fetching user profiles- NIP-07 browser signing support
- Multi-account management
- Social Features: User profiles (NIP-01), follow lists (NIP-02), reactions (NIP-25), reposts (NIP-18)
- Messaging: Private DMs (NIP-17), public chat (NIP-28), group chat (NIP-29), encryption (NIP-44)
- Payments: Lightning zaps (NIP-57), Cashu wallets (NIP-60), Nutzaps (NIP-61), Wallet Connect (NIP-47)
- Content: Long-form articles (NIP-23), file metadata (NIP-94), live events (NIP-53), calendars (NIP-52)
useNostrhook for querying and publishinguseNostrPublishhook with automatic client tagging- Event validation and filtering
- Infinite scroll with TanStack Query
- Multi-relay support
- 48+ shadcn/ui components (buttons, forms, dialogs, etc.)
NoteContentcomponent for rich text renderingEditProfileFormfor profile managementRelaySelectorfor relay switchingCommentsSectionfor threaded discussions- Light/dark theme system
useUploadFilehook with Blossom server integration- NIP-94 compatible file metadata
- Image and video support
- File attachment to events
- NIP-19 identifier routing (
npub1,note1,nevent1,naddr1) - Cryptographic operations (encryption/decryption)
- Lightning payments and zaps
- Real-time event subscriptions
- Responsive design with mobile support
MKStack includes Dork, a built-in AI agent that understands your codebase and Nostr protocols:
Configure your AI provider with stacks configure:
- OpenRouter (openrouter.ai): Enter your API key from settings
- Routstr (routstr.com): Use Cashu tokens for payment
- PayPerQ (ppq.ai): OpenAI-compatible API
- Context-Aware: Understands your entire codebase and project structure
- Nostr Expert: Built-in knowledge of 50+ NIPs and best practices
- Instant Implementation: Makes changes directly to your code following React/TypeScript best practices
Example prompts:
"Add user profiles with avatars and bio"
"Implement NIP-17 private messaging"
"Add a dark mode toggle"
"Create a marketplace with NIP-15"src/
βββ components/ # UI components
β βββ ui/ # shadcn/ui components (48+ available)
β βββ auth/ # Authentication components
β βββ comments/ # Comment system components
βββ hooks/ # Custom React hooks
β βββ useNostr # Core Nostr integration
β βββ useAuthor # User profile data
β βββ useCurrentUser # Authentication state
β βββ useNostrPublish # Event publishing
β βββ useUploadFile # File uploads
β βββ useZaps # Lightning payments
βββ pages/ # Page components
βββ lib/ # Utility functions
βββ contexts/ # React context providers
βββ test/ # Testing utilities
MKStack includes 48+ shadcn/ui components:
Layout: Card, Separator, Sheet, Sidebar, ScrollArea, Resizable Navigation: Breadcrumb, NavigationMenu, Menubar, Tabs, Pagination Forms: Button, Input, Textarea, Select, Checkbox, RadioGroup, Switch, Slider Feedback: Alert, AlertDialog, Toast, Progress, Skeleton Overlay: Dialog, Popover, HoverCard, Tooltip, ContextMenu, DropdownMenu Data Display: Table, Avatar, Badge, Calendar, Chart, Carousel **And many more...
- Never use
anytype: Always use proper TypeScript types - Event validation: Filter events through validator functions for custom kinds
- Efficient queries: Minimize separate queries to avoid rate limiting
- Proper error handling: Graceful handling of invalid NIP-19 identifiers
- Secure authentication: Use signer interface, never request private keys directly
- Mobile-first approach with Tailwind breakpoints
useIsMobilehook for responsive behavior- Touch-friendly interactions
- Optimized for all screen sizes
- Vitest with jsdom environment
- React Testing Library with jest-dom matchers
TestAppcomponent provides all necessary context providers- Mocked browser APIs (matchMedia, scrollTo, IntersectionObserver, ResizeObserver)
Built-in deployment to NostrDeploy.com:
npm run deployYour app goes live instantly with:
- Automatic builds
- CDN distribution
- HTTPS support
- Custom domains available
For detailed documentation on building Nostr applications with MKStack:
MKStack is open source and welcomes contributions. The framework is designed to be:
- Extensible: Easy to add new NIPs and features
- Maintainable: Clean architecture with TypeScript
- Testable: Comprehensive testing setup included
- Documented: Clear patterns and examples
Open source - build amazing Nostr applications and help grow the decentralized web!
"Vibed with MKStack" - Learn more about MKStack
Build your Nostr app in minutes, not months. Start with AI, deploy instantly.