# Quick Start Guide Get LocalGreenChain up and running in under 5 minutes. ## Prerequisites - **Bun 1.0+** - Fast JavaScript runtime ([https://bun.sh](https://bun.sh)) ### Installing Bun ```bash # macOS/Linux/WSL curl -fsSL https://bun.sh/install | bash # Or using npm npm install -g bun ``` ## Installation ### 1. Clone the Repository ```bash git clone https://github.com/yourusername/localgreenchain.git cd localgreenchain ``` ### 2. Install Dependencies ```bash bun install ``` ### 3. Start the Development Server ```bash bun run dev ``` ### 4. Open Your Browser Navigate to [http://localhost:3001](http://localhost:3001) ## Your First Plant Registration ### Step 1: Navigate to Register Page Click "Register Plant" in the navigation menu or go directly to `/plants/register`. ### Step 2: Enter Plant Details ```typescript // Example plant data { commonName: "Tomato", scientificName: "Solanum lycopersicum", location: { latitude: 40.7128, longitude: -74.0060, city: "New York", country: "USA" } } ``` ### Step 3: Submit and View Your Plant After registration, you'll receive: - A unique plant ID - A blockchain transaction hash - A QR code for tracking ## View Your Plant on the Network ### Check the Explorer Navigate to `/plants/explore` to see: - Your registered plants - Network statistics - Nearby plants from other growers ### View Plant Details Click on any plant to see: - Complete lineage history - Transport events - Environmental data - QR code for scanning ## Quick API Test Test the API directly: ```bash # Register a plant curl -X POST http://localhost:3001/api/plants/register \ -H "Content-Type: application/json" \ -d '{ "commonName": "Basil", "scientificName": "Ocimum basilicum", "location": { "latitude": 40.7128, "longitude": -74.0060 } }' # Get network stats curl http://localhost:3001/api/plants/network ``` ## Next Steps - [Installation Guide](./installation.md) - Detailed setup options - [Configuration Guide](./configuration.md) - Environment variables and settings - [Grower Guide](./grower-guide.md) - Complete workflow for growers - [Consumer Guide](./consumer-guide.md) - How to use as a consumer ## Common Issues ### Port Already in Use ```bash # Change port in .env PORT=3002 ``` ### Bun Not Found Ensure Bun is in your PATH: ```bash export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH" ``` ### Database Reset To start fresh: ```bash rm -rf data/plantchain.json bun run dev ``` --- **Time to complete**: ~5 minutes **Support**: Open an issue on GitHub or check [Discussions](https://github.com/yourusername/localgreenchain/discussions)