A complete Next.js template for building Bitcoin SV applications with exchange functionality, smart contracts, and seamless ecosystem integration.
- ποΈ Exchange Framework - Built-in trading functionality with order books, market data, and transaction management
- π Smart Contracts - Deploy and manage Bitcoin Script smart contracts with an intuitive interface
- πͺ Token Management - Create, distribute, and manage application tokens with built-in economics
- π§ Developer Tools - Comprehensive developer sidebar with tasks, documentation, and GitHub integration
- π₯οΈ Bitcoin OS Compatible - Seamless integration with the Bitcoin OS ecosystem
- π¨ Modern UI/UX - Clean, responsive design with Bitcoin-themed styling
- π Ecosystem Integration - Pre-configured links to Bitcoin Apps suite and dock integration
- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/your-github/bitcoin-app.git cd bitcoin-app -
Install dependencies
npm install
-
Set up environment variables (optional)
cp .env.example .env.local # Edit .env.local with your configuration -
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
bitcoin-app/
βββ components/ # Shared components
β βββ Dock.tsx # Bitcoin OS dock integration
β βββ Taskbar.tsx # macOS-style menu bar
β βββ DevSidebar.tsx # Developer tools sidebar
β βββ PocBar.tsx # Proof of concept banner
β βββ ...
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ exchange/ # Trading interface
β β βββ contracts/ # Smart contract management
β β βββ token/ # Token information & actions
β β βββ docs/ # Documentation
β β βββ ...
β βββ components/ # App-specific components
β βββ lib/ # Utility functions & hooks
β β βββ utils/
β β βββ useBitcoinOS.ts # Bitcoin OS integration hook
β βββ ...
βββ public/ # Static assets
βββ ...
The built-in exchange provides:
- Trading Pairs Management - Support for multiple BSV and token pairs
- Order Book Display - Real-time buy/sell orders visualization
- Trade History - Complete transaction records
- Market Data - Live price feeds and 24h statistics
- Order Placement - Buy/sell order interface (template)
Location: /src/app/exchange/page.tsx
Comprehensive contract management system:
- Contract Templates - Pre-built templates for common use cases
- Contract IDE - In-browser editor with syntax highlighting
- Deployment Tools - One-click deployment to testnet/mainnet
- Contract Browser - View and interact with deployed contracts
Location: /src/app/contracts/page.tsx
Complete token lifecycle management:
- Token Statistics - Supply, holders, market cap tracking
- Distribution Visualization - Pie charts and allocation breakdown
- Utility Documentation - Token use cases and benefits
- Token Actions - Transfer, stake, and reward claiming interfaces
Location: /src/app/token/page.tsx
Integrated development environment:
- Task Management - GitHub issue integration
- Documentation Hub - Centralized docs and guides
- Quick Actions - Common development shortcuts
- Status Monitoring - Real-time app health indicators
Component: DevSidebar.tsx
Update your app name and metadata in /src/app/layout.tsx:
export const metadata: Metadata = {
title: "Your App Name",
description: "Your app description",
// ... other metadata
};Modify token details in /src/app/token/page.tsx:
const tokenStats = {
name: '$YOURTOKEN',
symbol: 'YOURTOKEN',
totalSupply: '1,000,000,000',
// ... other properties
};Configure available trading pairs in /src/app/exchange/page.tsx:
const tradingPairs = [
{ pair: 'YOUR_TOKEN/BSV', price: '0.001', change: '+2.4%', volume: '1.2M' },
// ... add your pairs
];Update the color scheme in /src/app/globals.css:
:root {
--color-primary: #your-primary-color;
--color-accent: #your-accent-color;
/* ... other variables */
}Update repository links throughout the codebase:
- Replace
https://github.com/your-github/bitcoin-appwith your repository URL - Update issue tracking links in
DevSidebar.tsx - Modify external documentation links
- Connect your repository to Vercel
- Configure build settings:
- Build Command:
npm run build - Output Directory:
.next
- Build Command:
- Set environment variables in Vercel dashboard
- Deploy - automatic deployments on git push
The app is compatible with any platform supporting Next.js:
- Netlify - Static export support
- Railway - Full-stack deployment
- AWS - Using AWS Amplify
- Self-hosted - Docker support available
# Development
npm run dev
# Production build
npm run build
# Start production server
npm start
# Lint code
npm run lintThis boilerplate includes seamless Bitcoin OS integration:
- Auto-detection - Automatically adapts UI when running in Bitcoin OS
- Theme synchronization - Matches Bitcoin OS theme preferences
- Message passing - Communication with OS for notifications and navigation
- App lifecycle - Proper initialization and cleanup
The integration is handled by the useBitcoinOS hook in /src/lib/utils/useBitcoinOS.ts.
Your app automatically appears in the Bitcoin Apps ecosystem dock with:
- App icon and branding
- Current app indicator when active
- Quick navigation to other Bitcoin apps
- Status indicators for connectivity and health
The taskbar provides:
- Bitcoin Suite access - Quick links to all ecosystem apps
- Menu system - Organized feature navigation
- User status - Authentication and connection indicators
- Mobile responsiveness - Adaptive mobile menu
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting
- Conventional Commits for commit messages
- Getting Started Guide - Complete setup instructions
- API Reference - Detailed API documentation
- Component Guide - Reusable component library
- Deployment Guide - Production deployment instructions
- GitHub Issues - Bug reports and feature requests
- Discussions - Community support and questions
- Documentation - Comprehensive guides and tutorials
This project is licensed under the Open BSV License Version 5.
See the LICENSE file for details.
- Bitcoin SV - The blockchain powering this application
- Next.js - The React framework used
- HandCash - Wallet integration capabilities
- Bitcoin Apps Suite - Ecosystem integration
Ready to build your Bitcoin app? π
Fork this repository and start building the future of Bitcoin applications!
β Star this repository β’ π΄ Fork this repository β’ π Report issues