By TAYLOR.WTF
A modern, real-time chat interface for interacting with blockchain data using ThirdWeb's Nebula API. Built with Next.js 14, TypeScript, and Tailwind CSS.
Experience real-time blockchain interactions with a beautiful, responsive interface:
- 🌐 Real-time blockchain data interaction
- 💬 Streaming chat responses with markdown support
- 🎨 Responsive UI with dark mode
- 🔒 Secure wallet connection via ThirdWeb
- ⚡ Real-time response streaming
- 📝 Multi-line message input support
- ⏱️ Response time tracking
- 🎯 Support for blockchain transactions and actions
- 📱 Collapsible sidebar for better mobile experience
- 💼 Enhanced transaction handling:
- Contract deployment support
- Smart contract interaction
- Token transfers with USD value estimation
- Gas fee estimation in ETH and USD
- ENS name resolution
- Network switching support
- 💾 Persistent chat history with localStorage
- 🔄 Real-time price updates for transactions
- 📊 Transaction status tracking
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Web3: ThirdWeb SDK
- Markdown: React-Markdown with GFM support
- State Management: Zustand
- Animations: Framer Motion
- API Integration: Server-Sent Events (SSE)
- Node.js 18+
- npm/yarn
- A ThirdWeb account and API key
- Clone the repository:
git clone https://github.com/taylorwtf/nebula.git
cd nebula- Install dependencies:
npm install- Create a
.env.localfile in the root directory:
NEBULA_API_KEY=your_nebula_api_key
NEXT_PUBLIC_NEBULA_CLIENT_ID=your_nebula_client_id (thirdweb client id)- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
Required environment variables:
NEBULA_API_KEY: Your ThirdWeb Nebula API key for chat functionalityNEXT_PUBLIC_NEBULA_CLIENT_ID: Your ThirdWeb Nebula Client ID
You can obtain these from the ThirdWeb Dashboard
src/
├── app/ # Next.js app router files
├── components/ # React components
│ ├── chat/ # Chat-related components
│ ├── navbar/ # Navigation components
│ └── sidebar/ # Sidebar components
├── lib/ # Utility functions and API clients
│ └── store/ # Zustand store configurations
└── types/ # TypeScript type definitions
ChatContainer: Main chat interface containerMessageList: Handles message display and thinking indicatorsMessageInput: Multi-line input with Shift+Enter supportMessageBubble: Renders messages with markdown supportTransactionHandler: Manages blockchain transactionsSidebar: Collapsible chat history managementWalletButton: ThirdWeb wallet connection
- Server-Sent Events (SSE) for real-time updates
- Live typing indicators with timing
- Response time tracking
- Auto-scroll with user scroll position preservation
- Support for multiple transaction types:
- Token transfers
- Contract deployments
- Contract interactions
- Real-time gas estimation
- USD value conversion for amounts and gas fees
- Network detection and switching
- ENS name resolution for addresses
- Transaction status tracking
- Beautiful transaction UI with animations
- Local storage for chat persistence
- Chat management (create, delete, clear all)
- Timestamp tracking for conversations
- Responsive sidebar with collapse support
- Code blocks with syntax highlighting
- Lists (ordered and unordered)
- Links with custom styling
- Headers and formatting
- Secure wallet connection via ThirdWeb
- Support for multiple wallet providers
- Transaction signing capabilities
- Network switching support
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ThirdWeb for the Nebula API
- Tailwind CSS for the styling system
- Next.js for the React framework
- Framer Motion for animations
- Zustand for state management


