Updated the entire project to use Bun instead of npm/yarn for:
- Faster package installation (3x faster than npm)
- Native TypeScript support
- Better runtime performance
- Built-in bundler
Changes:
- Updated package.json to use bun in all scripts
- Renamed project from example-marketing to localgreenchain
- Added bunfig.toml for bun configuration
- Updated README with Bun installation instructions
- Added "Why Bun?" section explaining benefits
- Updated .gitignore for bun-specific debug logs
- Changed all npm/yarn references to bun commands
All commands now use:
- bun install (instead of npm install)
- bun run dev (instead of npm run dev)
- bun test (instead of npm test)
This commit implements a complete blockchain-based plant tracking system
that preserves lineage across clones, seeds, and all plant offspring while
connecting growers through geographic proximity.
Features implemented:
- Custom blockchain with proof-of-work consensus
- Plant registration and cloning with lineage tracking
- Geographic discovery to find nearby plants and growers
- Integration with plants.net API for plant identification
- Comprehensive web UI for plant management
- RESTful API endpoints for all operations
- Network statistics and visualization
Core Components:
- lib/blockchain/: PlantBlock, PlantChain, and blockchain manager
- lib/services/: plants.net API and geolocation services
- pages/api/plants/: REST API endpoints for all operations
- pages/: Frontend UI pages for registration, exploration, and lineage
Technical Details:
- TypeScript for type safety
- Next.js for server-side rendering
- Tailwind CSS for responsive design
- JSON file-based blockchain storage
- Haversine distance calculations for geolocation
- OpenStreetMap integration for geocoding
This system enables large-scale adoption by:
- Making plant lineage tracking accessible to everyone
- Connecting local communities through plant sharing
- Providing immutable proof of plant provenance
- Supporting unlimited generations of plant propagation
- Scaling from individual growers to global networks
Documentation includes comprehensive README with:
- Quick start guide
- API reference
- Architecture details
- Scaling recommendations
- Use cases for various audiences
- Roadmap for future enhancements