- Add guides: quick-start, installation, configuration, grower, consumer, transport, vertical-farm - Add API references: REST, demand, vertical-farming - Add concepts: blockchain, seasonal-planning, carbon-footprint - Add architecture: data-flow, transport-tracking - Add vertical-farming: environmental-control, automation, integration - Add examples: seed-to-harvest, demand-driven-planting, vertical-farm-setup Completes Agent_5 documentation tasks from AGENT_REPORT.md
2.6 KiB
2.6 KiB
Quick Start Guide
Get LocalGreenChain up and running in under 5 minutes.
Prerequisites
- Bun 1.0+ - Fast JavaScript runtime (https://bun.sh)
Installing Bun
# macOS/Linux/WSL
curl -fsSL https://bun.sh/install | bash
# Or using npm
npm install -g bun
Installation
1. Clone the Repository
git clone https://github.com/yourusername/localgreenchain.git
cd localgreenchain
2. Install Dependencies
bun install
3. Start the Development Server
bun run dev
4. Open Your Browser
Navigate to 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
// 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:
# 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 - Detailed setup options
- Configuration Guide - Environment variables and settings
- Grower Guide - Complete workflow for growers
- Consumer Guide - How to use as a consumer
Common Issues
Port Already in Use
# Change port in .env
PORT=3002
Bun Not Found
Ensure Bun is in your PATH:
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Database Reset
To start fresh:
rm -rf data/plantchain.json
bun run dev
Time to complete: ~5 minutes
Support: Open an issue on GitHub or check Discussions