A revolutionary decentralized spreadsheet application that stores data on the Bitcoin SV blockchain, featuring HandCash wallet integration for authentication and data encryption. This project aims to create a fully decentralized, secure, and collaborative spreadsheet platform rivaling Google Sheets and Microsoft Excel.
To create the world's first truly decentralized spreadsheet application where:
- Data is owned by users, not corporations
- Every change is cryptographically secure and immutable
- Collaboration happens without central servers
- Privacy is guaranteed through encryption
- No single point of failure exists
- HandCash OAuth Authentication: Secure wallet-based login system
- Encrypted Data Storage: AES-256 encryption using wallet-derived keys
- Bitcoin SV Integration: Ready for on-chain data storage
- Responsive Spreadsheet Grid: Interactive 10x10 grid interface
- Formula Support: Basic formula calculations (SUM, etc.)
- User Session Management: Secure session handling with localStorage
- Dark Mode UI: Modern, sleek interface design
We're integrating battle-tested code from leading open-source projects:
- HyperFormula Integration: Full Excel compatibility
- Mathematical: SUM, AVERAGE, MIN, MAX, COUNT, ROUND
- Logical: IF, AND, OR, NOT, IFS, SWITCH, XLOOKUP
- Text: CONCAT, LEFT, RIGHT, MID, LEN, TRIM, REGEX
- Date/Time: TODAY, NOW, DATE, DATEDIF, NETWORKDAYS
- Lookup: VLOOKUP, HLOOKUP, INDEX, MATCH, XLOOKUP
- Financial: NPV, IRR, PMT, FV, PV, RATE
- Statistical: STDEV, VAR, MEDIAN, MODE, PERCENTILE
- Array Formulas: SUMPRODUCT, TRANSPOSE, FILTER, SORT
- Number formats: Currency, Percentage, Date, Scientific
- Cell styles: Bold, Italic, Underline, Strikethrough
- Alignment: Horizontal, Vertical, Text wrap, Rotation
- Borders: Style, Color, Width, Diagonal
- Fill: Colors, Gradients, Patterns
- Conditional Formatting: Color scales, Data bars, Icon sets
- Cell merge/unmerge
- Freeze panes
- Sort & Filter: Multi-column, Custom filters, AutoFilter
- Find & Replace: Regex support, Case sensitive, Whole word
- Data Validation: Dropdowns, Date ranges, Custom rules
- Pivot Tables: Drag-drop interface, Calculated fields
- Charts: Line, Bar, Pie, Scatter, Area, Sparklines
- Import/Export: Excel, CSV, PDF, JSON, HTML
- Real-time multi-user editing
- Cell-level locking
- Comments and notes
- Change tracking
- Version history with rollback
- Virtual scrolling for 1M+ rows
- Web Workers for formula calculation
- Lazy loading for large files
- 60fps smooth scrolling
- Luckysheet: Full-featured Excel-like spreadsheet (MIT License)
- HyperFormula: Advanced formula engine (GPL v3)
- SheetJS: File format support (Apache 2.0)
- RevoGrid: High-performance virtual grid (MIT)
- x-spreadsheet: Lightweight spreadsheet (MIT)
- Week 1: Basic grid + formulas working
- Week 2: Full formatting + import/export
- Week 3: Charts + pivot tables
- Week 4: Real-time collaboration
- Components: Modular React components for spreadsheet, cells, and toolbar
- Services: HandCash authentication and Bitcoin blockchain integration
- State Management: React hooks for local state management
- Styling: Custom CSS with dark mode support
- Responsive Design: Mobile-first approach
- HandCash OAuth: Server-side authentication flow
- Profile Management: User profile fetching and caching
- CORS Handling: Cross-origin resource sharing configuration
- Environment Config: Secure environment variable management
- Bitcoin SV: Data storage on immutable blockchain
- Encryption: AES-256 encryption with wallet-derived keys
- Smart Contracts: sCrypt contracts for data management (planned)
- HandCash Connect: Wallet integration and payment processing
npm install luckysheet
# Gets you 400+ formulas, charts, pivot tables immediately
npm install x-data-spreadsheet
# Minimal, fast, no dependencies
npm install hyperformula @revolist/revogrid xlsx
# Formula engine + Virtual grid + File I/O
See SPREADSHEET_FEATURES_SPEC.md for full implementation details.
- Node.js 16+ and npm
- HandCash wallet account (get one at https://handcash.io)
- HandCash App credentials (from https://dashboard.handcash.io)
git clone https://github.com/b0ase/bitcoin-spreadsheet.git
cd bitcoin-spreadsheet
# Install API dependencies
cd api
npm install
# Install frontend dependencies
cd ../frontend
npm install
Create .env
file in the api
directory:
HANDCASH_APP_ID=your_app_id
HANDCASH_APP_SECRET=your_app_secret
CLIENT_URL=http://localhost:3000
PORT=3001
Create .env
file in the frontend
directory:
REACT_APP_HANDCASH_APP_ID=your_app_id
REACT_APP_HANDCASH_REDIRECT_URL=http://localhost:3000/auth/handcash/callback
# Terminal 1: Start API server
cd api
PORT=3001 npm start
# Terminal 2: Start frontend
cd frontend
npm start
The application will be available at http://localhost:3000
bitcoin-spreadsheet/
βββ api/ # Backend API server
β βββ server.js # Express server with HandCash endpoints
β βββ package.json # API dependencies
β βββ .env # API environment variables
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/
β β β βββ Spreadsheet.tsx # Main spreadsheet grid component
β β β βββ Cell.tsx # Individual cell component
β β β βββ FormulaBar.tsx # Formula input bar
β β β βββ LoginPage.tsx # HandCash login interface
β β β βββ Navigation.tsx # Navigation component
β β βββ services/
β β β βββ BitcoinService.ts # Bitcoin/BSV integration
β β β βββ HandCashAuthService.ts # HandCash OAuth service
β β βββ styles/
β β β βββ Spreadsheet.css # Spreadsheet styling
β β β βββ LoginPage.css # Login page styling
β β βββ App.tsx # Main application component
β β βββ App.css # Global styles
β β βββ index.tsx # Application entry point
β βββ public/
β β βββ index.html # HTML template
β βββ package.json # Frontend dependencies
β βββ .env # Frontend environment variables
βββ docs/ # Documentation
β βββ PRD.md # Product Requirements Document
β βββ EPIC.md # EPIC documentation
β βββ ROADMAP.md # Implementation roadmap
βββ .gitignore # Git ignore rules
βββ README.md # This file
βββ LICENSE # ISC License
- Go to HandCash Dashboard
- Create a new application
- Set OAuth redirect URL to
http://localhost:3000/auth/handcash/callback
- Copy your App ID and App Secret
- Add them to your environment files
For production deployment on Vercel:
- Deploy frontend to Vercel
- Add environment variables in Vercel dashboard:
REACT_APP_HANDCASH_APP_ID
REACT_APP_HANDCASH_REDIRECT_URL
- Deploy API to Vercel Functions or separate server
- Update
CLIENT_URL
in API environment
- Encryption: AES-256 encryption is automatic
- Key Derivation: Keys are derived from HandCash public keys
- Session Management: Sessions expire after 24 hours
- CORS: Configure allowed origins in
api/server.js
- Sign In: Click "Sign in with HandCash" to authenticate
- Create Spreadsheet: Your spreadsheet is automatically created upon login
- Edit Cells: Click any cell to select, type to edit
- Use Formulas: Start with
=
for formulas (e.g.,=SUM(A1:A5)
) - Save Automatically: All changes are encrypted and prepared for blockchain storage
Enter
- Confirm cell edit and move downTab
- Confirm cell edit and move rightEscape
- Cancel cell editArrow Keys
- Navigate between cellsDelete
- Clear cell contentCtrl+C
- Copy cell (coming soon)Ctrl+V
- Paste cell (coming soon)Ctrl+Z
- Undo (coming soon)
Currently supported:
=SUM(range)
- Sum values- Basic arithmetic:
=A1+B1
,=A1*2
Coming soon:
=AVERAGE()
,=COUNT()
,=MAX()
,=MIN()
=IF()
,=VLOOKUP()
,=CONCATENATE()
- Date functions, text functions, and more
- Encryption: All spreadsheet data is encrypted with AES-256
- Key Management: Encryption keys derived from HandCash wallet
- No Central Storage: Data will be stored on blockchain, not servers
- User Ownership: Only you can decrypt your data
- OAuth 2.0: Industry-standard authentication via HandCash
- No Password Storage: Authentication via wallet, no passwords
- Session Security: Secure session tokens with expiration
- HTTPS Only: All production traffic encrypted
- Zero-Knowledge: Servers never see unencrypted data
- Pseudonymous: Only HandCash handle visible, no personal info
- Data Portability: Export your data anytime
- Right to Delete: Clear all data from blockchain (burn tokens)
# Frontend tests
cd frontend
npm test
# API tests
cd api
npm test
- Start both servers locally
- Test HandCash authentication flow
- Test spreadsheet operations
- Verify encryption/decryption
- Penetration testing planned
- Smart contract audits pending
- OWASP compliance review scheduled
π Live App: https://bitcoin-spreadsheet.vercel.app
The project is deployed on Vercel with the following setup:
-
GitHub Integration:
- Repository:
bitcoin-apps-suite/bitcoin-spreadsheet
- Branch:
main
(auto-deploys on push) - Organization: Bitcoin Apps Suite
- Repository:
-
Build Configuration (
vercel.json
):{ "buildCommand": "cd frontend && npm ci --legacy-peer-deps && CI=false npm run build", "outputDirectory": "frontend/build", "installCommand": "echo 'Skipping root install'", "framework": null }
-
Environment Variables: No environment variables required for frontend deployment.
-
Manual Deployment:
cd frontend npm run build vercel --prod
-
API (as Vercel Functions):
cd api vercel --prod
# Coming soon: Docker compose configuration
docker-compose up -d
- Build frontend:
npm run build
- Deploy
frontend/build
to any static host - Deploy API to Node.js server
- Configure environment variables
- Set up SSL certificates
connect(): Promise<void> // Connect to HandCash
createSpreadsheet(title): Promise<SpreadsheetData>
updateCell(id, row, col, value, type): Promise<void>
getCell(id, row, col): Promise<CellData>
calculateFormula(formula, cells): Promise<string>
getBalance(): Promise<string> // Get wallet balance
getAddress(): Promise<string> // Get wallet address
login(): Promise<void> // Start OAuth flow
handleCallback(url): Promise<HandCashUser> // Handle OAuth callback
logout(): void // Clear session
isAuthenticated(): boolean // Check auth status
getCurrentUser(): HandCashUser | null // Get user info
GET /api/health # Health check
GET /api/auth/handcash/url # Get OAuth URL
GET /api/auth/handcash/callback # OAuth callback
POST /api/handcash-profile # Get user profile
We welcome contributions! This is an open-source project aimed at revolutionizing spreadsheets.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open Pull Request: Describe your changes
- Write clean, documented code
- Add unit tests for new features
- Follow existing code style
- Update documentation
- Check security implications
- Formula engine enhancements
- Collaboration features
- Performance optimizations
- Mobile responsiveness
- Blockchain integration
- Security improvements
This project is licensed under the ISC License - see the LICENSE file for details.
- HandCash - Wallet and authentication
- Bitcoin SV - Blockchain platform
- sCrypt - Smart contract framework
- React team for the amazing framework
- All contributors and supporters
This is experimental software in active development. While we strive for security and reliability:
- Not yet audited for production use
- Blockchain integration is in development
- Data persistence is currently local
- Use at your own risk
- Not financial advice
IMPORTANT: This project is for educational and experimental purposes. Do not use for critical data until production release.
- GitHub Repository
- Live Demo (Coming Soon)
- Documentation
- Issue Tracker
Built with determination to revolutionize spreadsheets on Bitcoin SV
"Your data, your keys, your spreadsheet"