Commit graph

40 commits

Author SHA1 Message Date
Vinnie Esposito
7e61cd1af7 Merge: Real-time updates with Socket.io (Agent 6) - resolved conflicts 2025-11-23 11:00:12 -06:00
Vinnie Esposito
b0dc9fca4d Merge: File Upload & Storage System (Agent 3) - resolved conflicts 2025-11-23 10:59:54 -06:00
Vinnie Esposito
20e33bea18 Merge: QA Agent type fixes 2025-11-23 10:59:28 -06:00
Vinnie Esposito
7ddad00f49 Merge: Testing and CI/CD infrastructure (Agent 5) - resolved conflicts 2025-11-23 10:59:14 -06:00
Vinnie Esposito
13f4daf477 Merge: Production deployment infrastructure (Agent 4) - resolved conflicts 2025-11-23 10:58:21 -06:00
Vinnie Esposito
9e046b1ae5 Merge: Comprehensive authentication system (Agent 1) - resolved conflicts 2025-11-23 10:58:00 -06:00
Claude
3d2ccdc29a
feat(db): implement PostgreSQL database integration with Prisma ORM
Agent 2 - Database Integration (P0 Critical):

- Add Prisma ORM with PostgreSQL for persistent data storage
- Create comprehensive database schema with 20+ models:
  - User & authentication models
  - Plant & lineage tracking
  - Transport events & supply chain
  - Vertical farming (farms, zones, batches, recipes)
  - Demand & market matching
  - Audit logging & blockchain storage

- Implement complete database service layer (lib/db/):
  - users.ts: User CRUD with search and stats
  - plants.ts: Plant operations with lineage tracking
  - transport.ts: Transport events and carbon tracking
  - farms.ts: Vertical farm and crop batch management
  - demand.ts: Consumer preferences and market matching
  - audit.ts: Audit logging and blockchain integrity

- Add PlantChainDB for database-backed blockchain
- Create development seed script with sample data
- Add database documentation (docs/DATABASE.md)
- Update package.json with Prisma dependencies and scripts

This provides the foundation for all other agents to build upon
with persistent, scalable data storage.
2025-11-23 03:56:40 +00:00
Claude
5ea8bab5c3
Add production deployment infrastructure (Agent 4)
- Docker: Multi-stage Dockerfile with security hardening, docker-compose
  for production and development environments
- Environment: Comprehensive .env.example with all config options,
  lib/config/env.ts for typed environment validation
- Logging: Structured JSON logging with request/response middleware
- Monitoring: Prometheus metrics endpoint, Grafana dashboard, health
  checks (liveness/readiness probes)
- Security: Security headers, rate limiting, CORS middleware
- CI/CD: GitHub Actions workflows for CI, production deploy, and
  preview deployments
- Error tracking: Sentry integration foundation

Files created:
- Docker: Dockerfile, docker-compose.yml, docker-compose.dev.yml, .dockerignore
- Config: lib/config/env.ts, lib/config/index.ts
- Logging: lib/logging/logger.ts, lib/logging/middleware.ts
- Monitoring: lib/monitoring/sentry.ts, lib/monitoring/metrics.ts,
  lib/monitoring/health.ts
- Security: lib/security/headers.ts, lib/security/rateLimit.ts,
  lib/security/cors.ts
- API: pages/api/health/*, pages/api/metrics.ts
- Infra: infra/prometheus/prometheus.yml, infra/grafana/*
2025-11-23 03:54:03 +00:00
Claude
39b6081baa
Implement comprehensive authentication system (Agent 1)
Add complete user authentication with NextAuth.js supporting:
- Email/password credentials authentication
- OAuth providers (GitHub, Google) with optional configuration
- JWT-based session management with 30-day expiry
- Role-based access control (USER, GROWER, FARM_MANAGER, ADMIN)
- Permission system with granular access control
- Secure password hashing with bcrypt (12 rounds)
- Rate limiting on auth endpoints
- Password reset flow with secure tokens
- Email verification system

Files added:
- lib/auth/: Core auth library (types, permissions, context, hooks, middleware)
- pages/api/auth/: Auth API routes (NextAuth, register, forgot-password, verify-email)
- pages/auth/: Auth pages (signin, signup, forgot-password, reset-password, verify-email)
- components/auth/: Reusable auth components (LoginForm, RegisterForm, AuthGuard, etc.)

Updated _app.tsx to include SessionProvider for auth state management.
2025-11-23 03:52:09 +00:00
Claude
7098335ce7
Add real-time updates system with Socket.io
Implement Agent 6: Real-Time Updates feature for LocalGreenChain:

- Add Socket.io server with room-based subscriptions
- Create client-side hooks (useSocket, useLiveFeed, usePlantUpdates)
- Add SocketProvider context for application-wide state
- Implement UI components:
  - ConnectionStatus: Shows WebSocket connection state
  - LiveFeed: Real-time event feed display
  - NotificationToast: Toast notifications with auto-dismiss
  - LiveChart: Real-time data visualization
- Add event type definitions and formatting utilities
- Create socket API endpoint for WebSocket initialization
- Add socket stats endpoint for monitoring
- Extend tailwind with fadeIn/slideIn animations

Integrates with existing EventStream SSE system for fallback.
2025-11-23 03:51:51 +00:00
Claude
d74128d3cd
Add Agent 3: File Upload & Storage System
Implements cloud-based file storage for plant photos, documents, and certificates:

Storage Layer:
- Multi-provider support (AWS S3, Cloudflare R2, MinIO, local filesystem)
- S3-compatible provider with presigned URL generation
- Local storage provider for development with signed URL verification
- Configurable via environment variables

Image Processing:
- Automatic thumbnail generation (150x150, 300x300, 600x600, 1200x1200)
- WebP conversion for optimized file sizes
- EXIF data extraction for image metadata
- Image optimization with Sharp

API Endpoints:
- POST /api/upload/image - Upload images with automatic processing
- POST /api/upload/document - Upload documents (PDF, DOC, DOCX)
- POST /api/upload/presigned - Get presigned URLs for direct uploads
- GET/DELETE /api/upload/[fileId] - File management

UI Components:
- ImageUploader - Drag & drop image upload with preview
- PhotoGallery - Grid gallery with lightbox view
- DocumentUploader - Document upload with file type icons
- ProgressBar - Animated upload progress indicator

Database:
- FileStore service with in-memory storage (Prisma schema ready for Agent 2)
- File metadata tracking with soft delete support
- Category-based file organization
2025-11-23 03:51:31 +00:00
Claude
78b208b42a
feat: add comprehensive testing and CI/CD infrastructure (agent 5)
- Add GitHub Actions CI workflow with lint, type-check, test, build, and e2e jobs
- Configure Jest for unit and integration tests with coverage reporting
- Create unit tests for BaseAgent, PlantLineageAgent, and AgentOrchestrator
- Add blockchain PlantChain unit tests
- Create API integration tests for plants endpoints
- Configure Cypress for E2E testing with support files and custom commands
- Add E2E tests for home, plant registration, transparency, and vertical farm pages
- Set up Prettier for code formatting with configuration
- Configure Husky pre-commit hooks with lint-staged
- Add commitlint for conventional commit message enforcement
- Update package.json with new scripts and dev dependencies

This implements Agent 5 (Testing & CI/CD) from the deployment plan.
2025-11-23 03:50:36 +00:00
Vinnie Esposito
705105d9b6
Merge pull request #10 from vespo92/claude/create-agents-markdown-01MEFJVvJqSKf4Byp1TmTS6f
Create 10 agents for next steps
2025-11-22 21:41:49 -06:00
Claude
6d8a23b467
Add 10-agent deployment plan for worktree development
Create comprehensive AGENTS.md with 10 specialized agents covering:
- P0 Critical: Authentication (NextAuth.js) and Database (Prisma/PostgreSQL)
- P1 High: File Storage, Production Deployment, Testing/CI/CD
- P2 Medium: Real-Time Updates, Analytics Dashboard, Notifications
- P3 Enhancement: Marketplace Foundation, Mobile/PWA Optimization

Each agent includes detailed tasks, file structure, dependencies, and success criteria.
2025-11-23 03:40:00 +00:00
Vinnie Esposito
7a8dfba36a
Merge pull request #9 from vespo92/claude/enhance-features-01Ju7XzfWXNBKgTzP6z97RMb
Enhance application features and functionality
2025-11-22 21:33:38 -06:00
Claude
0fcc2763fe
Add comprehensive transparency system for LocalGreenChain
This commit introduces a complete transparency infrastructure including:

Core Transparency Modules:
- AuditLog: Immutable, cryptographically-linked audit trail for all actions
- EventStream: Real-time SSE streaming and webhook support
- TransparencyDashboard: Aggregated metrics and system health monitoring
- DigitalSignatures: Cryptographic verification for handoffs and certificates

API Endpoints:
- /api/transparency/dashboard - Full platform metrics
- /api/transparency/audit - Query and log audit entries
- /api/transparency/events - SSE stream and event history
- /api/transparency/webhooks - Webhook management
- /api/transparency/signatures - Digital signature operations
- /api/transparency/certificate/[plantId] - Plant authenticity certificates
- /api/transparency/export - Multi-format data export
- /api/transparency/report - Compliance reporting
- /api/transparency/health - System health checks

Features:
- Immutable audit logging with chain integrity verification
- Real-time event streaming via Server-Sent Events
- Webhook support with HMAC signature verification
- Digital signatures for transport handoffs and ownership transfers
- Certificate of Authenticity generation for plants
- Multi-format data export (JSON, CSV, summary)
- Public transparency portal at /transparency
- System health monitoring for all components

Documentation:
- Comprehensive TRANSPARENCY.md guide with API examples
2025-11-23 03:29:56 +00:00
Claude
88244a4276
Fix QualityAssuranceAgent type errors and deploy Agent 9
- Fix PlantBlock import to use correct module path (PlantBlock.ts)
- Update crypto import to use namespace import pattern
- Fix blockchain.getChain() to use blockchain.chain property
- Add 'critical' severity to QualityReport type for consistency
2025-11-23 00:28:39 +00:00
Vinnie Esposito
e76550e73a
Merge pull request #8 from vespo92/claude/analyze-and-create-agents-012L1dk7wmxHhmZPBu3Wmc8P
Analyze project and create 10 deployment agents
2025-11-22 18:20:43 -06:00
Claude
4235e17f60
Add comprehensive 10-agent autonomous system for LocalGreenChain
Agents created:
1. PlantLineageAgent - Monitors plant ancestry and lineage integrity
2. TransportTrackerAgent - Tracks transport events and carbon footprint
3. DemandForecastAgent - Predicts consumer demand and market trends
4. VerticalFarmAgent - Manages vertical farm operations and optimization
5. EnvironmentAnalysisAgent - Analyzes growing conditions and recommendations
6. MarketMatchingAgent - Connects grower supply with consumer demand
7. SustainabilityAgent - Monitors environmental impact and sustainability
8. NetworkDiscoveryAgent - Maps geographic distribution and network analysis
9. QualityAssuranceAgent - Verifies blockchain integrity and data quality
10. GrowerAdvisoryAgent - Provides personalized growing recommendations

Also includes:
- BaseAgent abstract class for common functionality
- AgentOrchestrator for centralized agent management
- Comprehensive type definitions
- Full documentation in docs/AGENTS.md
2025-11-22 21:24:40 +00:00
Vinnie Esposito
f8824781ff
Merge pull request #7 from vespo92/claude/complete-agent-15-tasks-01KKVPGN2dbGFsMSWvt1jHBK
Complete Agent 15 tasks from report
2025-11-22 12:52:58 -06:00
Vinnie Esposito
29f276dff0
Merge pull request #6 from vespo92/claude/complete-agent-1-tasks-01L8WoAAyH71WNAYtfK3pbaY
Complete Agent 1 tasks from report
2025-11-22 12:52:27 -06:00
Claude
4111c3acf1
Add complete documentation suite for LocalGreenChain
- 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
2025-11-22 18:48:42 +00:00
Claude
b8d2d5be5f
Add comprehensive testing suite for transport, demand, and vertical farming systems
- Set up Jest testing framework with TypeScript support
- Add unit tests for TransportChain blockchain (tracker, carbon, types)
- Add unit tests for DemandForecaster (forecaster, aggregation, recommendations)
- Add unit tests for VerticalFarmController (controller, recipes, environment)
- Add API tests for transport, demand, and vertical-farm endpoints
- Add integration tests for full lifecycle workflows:
  - Seed-to-seed lifecycle
  - Demand-to-harvest flow
  - VF batch lifecycle
2025-11-22 18:47:04 +00:00
Vinnie Esposito
56956005d9
Merge pull request #5 from vespo92/claude/complete-agent-1-tasks-01Mua4Y3mZ6bVyQtLEHRBHTn
Complete Agent 1 tasks from report
2025-11-22 12:45:57 -06:00
Vinnie Esposito
86bcf54279
Merge pull request #4 from vespo92/claude/complete-agent-1-tasks-01KZ35GuzCXvU6275R4aGGdB
Complete Agent 1 tasks from report
2025-11-22 12:45:39 -06:00
Vinnie Esposito
d76b079e49
Merge pull request #3 from vespo92/claude/complete-agent-tasks-01Rj86JxKG7JWx1X8UgZFFPg
Complete tasks from Agent Report
2025-11-22 12:45:22 -06:00
Claude
2f7f22ca22
Add vertical farming UI components and pages
Components:
- FarmCard: Farm summary display with status and metrics
- ZoneGrid: Multi-level zone layout visualization
- ZoneDetailCard: Individual zone details with environment readings
- EnvironmentGauge: Real-time environmental parameter display
- BatchProgress: Crop batch progress tracking with health scores
- RecipeSelector: Growing recipe browser and selector
- AlertPanel: Environment alerts display and management
- GrowthStageIndicator: Visual growth stage progress tracker
- ResourceUsageChart: Energy/water usage analytics visualization

Pages:
- /vertical-farm: Dashboard with farm listing and stats
- /vertical-farm/register: Multi-step farm registration form
- /vertical-farm/[farmId]: Farm detail view with zones and alerts
- /vertical-farm/[farmId]/zones: Zone management with batch starting
- /vertical-farm/[farmId]/batches: Batch management and harvesting
- /vertical-farm/[farmId]/analytics: Farm analytics and performance metrics
2025-11-22 18:35:57 +00:00
Claude
0cce5e2345
Add UI components for transport tracking, demand visualization, and analytics
Transport components:
- TransportTimeline: Visual timeline of transport events with status badges
- JourneyMap: SVG-based map visualization of plant journey locations
- CarbonFootprintCard: Carbon metrics display with comparison charts
- QRCodeDisplay: QR code generation for traceability verification
- TransportEventForm: Form for recording transport events

Demand components:
- DemandSignalCard: Regional demand signal with supply status indicators
- PreferencesForm: Multi-section consumer preference input form
- RecommendationList: Planting recommendations with risk assessment
- SupplyGapChart: Supply vs demand visualization with gap indicators
- SeasonalCalendar: Seasonal produce availability calendar view

Analytics components:
- EnvironmentalImpact: Comprehensive carbon and food miles analysis
- FoodMilesTracker: Food miles tracking with daily charts and targets
- SavingsCalculator: Environmental savings vs conventional agriculture

All components follow existing patterns, use Tailwind CSS, and are fully typed.
2025-11-22 18:34:51 +00:00
Claude
71a9dc323f
Add tsconfig.tsbuildinfo to gitignore
Build artifacts should not be tracked in version control.
2025-11-22 18:32:48 +00:00
Claude
2502308bcb
Add complete API routes for transport, demand, and vertical farming systems
Transport API (11 endpoints):
- POST /api/transport/seed-acquisition - Record seed acquisition events
- POST /api/transport/planting - Record planting events
- POST /api/transport/growing - Record growing transport events
- POST /api/transport/harvest - Record harvest events
- POST /api/transport/distribution - Record distribution events
- POST /api/transport/seed-saving - Record seed saving events
- POST /api/transport/seed-sharing - Record seed sharing events
- GET /api/transport/journey/[plantId] - Get plant journey
- GET /api/transport/footprint/[userId] - Get environmental impact
- GET /api/transport/verify/[blockHash] - Verify block integrity
- GET /api/transport/qr/[id] - Generate QR code data

Demand API (6 endpoints):
- POST/GET /api/demand/preferences - Consumer preferences
- POST /api/demand/signal - Generate demand signal
- GET /api/demand/recommendations - Get planting recommendations
- GET /api/demand/forecast - Get demand forecast
- POST /api/demand/supply - Register supply commitment
- POST /api/demand/match - Create market match

Vertical Farm API (9 endpoints):
- POST /api/vertical-farm/register - Register new farm
- GET /api/vertical-farm/[farmId] - Get farm details
- GET/POST /api/vertical-farm/[farmId]/zones - Manage zones
- GET /api/vertical-farm/[farmId]/analytics - Get farm analytics
- POST /api/vertical-farm/batch/start - Start crop batch
- GET /api/vertical-farm/batch/[batchId] - Get batch details
- PUT /api/vertical-farm/batch/[batchId]/environment - Record environment
- POST /api/vertical-farm/batch/[batchId]/harvest - Complete harvest
- GET /api/vertical-farm/recipes - List growing recipes
2025-11-22 18:31:21 +00:00
Vinnie Esposito
b8a3ebb823
Merge pull request #2 from vespo92/claude/document-seed-transport-01TryFGuw6ViiwJfk1z9GWvR
Document seed-to-seed app transport system
2025-11-22 12:25:37 -06:00
Claude
ac93368e9a
Add seed-to-seed transport tracking, demand forecasting, and vertical farming systems
This comprehensive update implements:

Transport Tracking System:
- Complete seed-to-seed lifecycle tracking with 9 event types
- TransportChain blockchain for immutable transport records
- Carbon footprint calculation per transport method
- Food miles tracking with Haversine distance calculation
- QR code generation for full traceability

Demand Forecasting System:
- Consumer preference registration and aggregation
- Regional demand signal generation
- Supply gap identification and market matching
- Grower planting recommendations with risk assessment
- Seasonal planning integration

Vertical Farming Module:
- Multi-zone facility management
- Environmental control systems (HVAC, CO2, humidity, lighting)
- Growing recipes with stage-based environment targets
- Crop batch tracking with health scoring
- Farm analytics generation

Documentation:
- Complete docs/ folder structure for Turborepo
- Seed-to-seed transport concept documentation
- Demand forecasting and seasonal planning guides
- System architecture and user blockchain design
- Transport API reference
- Vertical farming integration guide

Agent Report:
- AGENT_REPORT.md with 5 parallel agent tasks for continued development
- API routes implementation task
- UI components task
- Vertical farming pages task
- Testing suite task
- Documentation completion task
2025-11-22 18:23:08 +00:00
Vinnie Esposito
24569757f2
Merge pull request #1 from vespo92/claude/plant-cloning-blockchain-0183C7S2LExNj47z9yiV98NR
Blockchain system for plant cloning
2025-11-16 18:32:55 -06:00
Claude
8b06ccb7d0
Add environmental tracking UI components and integrations
Implemented comprehensive UI for displaying and managing environmental
data, with smart recommendations and health scoring.

Components Created:
- EnvironmentalForm.tsx - Multi-section form for all environmental data
  * Tabbed interface for 8 environmental categories
  * Soil composition (type, pH, texture, drainage, amendments)
  * Nutrients (NPK, micronutrients, EC/TDS)
  * Lighting (natural/artificial with detailed metrics)
  * Climate (temperature, humidity, airflow, zones)
  * Location (indoor/outdoor, growing type)
  * Container (type, size, drainage warnings)
  * Watering (method, source, quality)
  * Surroundings (ecosystem, wind, companions)
  * Real-time validation and helpful tips

- EnvironmentalDisplay.tsx - Beautiful display of environmental data
  * Environmental health score with color coding (0-100)
  * Priority-based recommendations (critical → low)
  * Organized sections for soil, climate, lighting, etc.
  * Data points with smart formatting
  * Warning highlights for critical issues
  * Integration with recommendations API

Plant Detail Page Integration:
- Added Environment tab to plant detail page
- Shows full environmental data when available
- Displays recommendations with health score
- Empty state with educational content when no data
- Link to Environmental Tracking Guide
- Call-to-action to add environmental data

Features:
- Health Score: 0-100 rating with color-coded progress bar
- Smart Recommendations: Auto-fetched, priority-sorted advice
- Critical Warnings: Red highlights for no drainage, extreme values
- Helpful Tips: Inline guidance for each section
- Responsive Design: Works on mobile and desktop
- Real-time Validation: pH ranges, temperature warnings

Environmental Health Scoring:
- 90-100: Excellent conditions
- 75-89: Good conditions
- 60-74: Adequate conditions
- 40-59: Suboptimal conditions
- 0-39: Poor conditions

Recommendation Priorities:
- 🚨 Critical: No drainage, extreme conditions
- ⚠️ High: pH problems, insufficient light
- 💡 Medium: Humidity, organic matter
- ℹ️ Low: Water quality tweaks

User Experience Improvements:
- "Add" badge on Environment tab when no data
- Educational empty states explaining benefits
- Smart formatting (snake_case → Title Case)
- Color-coded health indicators
- Expandable sections to prevent overwhelming UI
- Context-aware tips and recommendations

This enables users to:
- Easily input environmental data
- See personalized recommendations
- Monitor environmental health
- Learn best practices inline
- Track improvements over time
2025-11-16 16:58:53 +00:00
Claude
372fd0a015
Add comprehensive environmental tracking documentation
Created detailed guide explaining all environmental tracking features
and updated README with environmental tracking section.

Documentation (ENVIRONMENTAL_TRACKING.md):
- Complete overview of all trackable environmental factors
- Detailed explanations of soil, nutrients, climate, lighting
- API endpoint documentation with examples
- How recommendations system works
- Environmental health scoring explained
- Best practices for accurate tracking
- Use cases for different types of growers
- Privacy considerations for environmental data
- Troubleshooting guide
- Future enhancement roadmap

Features Documented:
- Soil composition (pH, texture, drainage, amendments)
- Nutrient profiles (NPK, micronutrients, EC/TDS)
- Lighting conditions (natural/artificial with metrics)
- Climate tracking (temp, humidity, airflow, zones)
- Growing locations (indoor/outdoor/greenhouse)
- Container information (type, size, drainage)
- Watering schedules and water quality
- Surrounding environment (companions, pests, ecosystem)
- Growth metrics and health scores

API Documentation:
- /api/environment/recommendations - Personalized advice
- /api/environment/similar - Find similar conditions
- /api/environment/compare - Compare two plants
- /api/environment/analysis - Network-wide insights

Updated README.md:
- Added environmental tracking features section
- Link to comprehensive ENVIRONMENTAL_TRACKING.md guide
- Listed all major tracking capabilities

This documentation helps users:
- Understand what environmental data to collect
- Learn how to use the tracking features
- Interpret recommendations and scores
- Optimize their growing conditions
- Contribute to collective knowledge
2025-11-16 16:27:12 +00:00
Claude
85591fc348
Add comprehensive environmental tracking for plants
Implements detailed tracking of soil composition, nutrients, climate,
lighting, and surrounding environment to help understand plant success
and optimize growing conditions.

Environmental Data Types (lib/environment/types.ts):
- Soil composition (type, pH, texture, drainage, organic matter)
- Soil amendments (compost, perlite, amendments tracking)
- Nutrient profiles (NPK, secondary nutrients, micronutrients, EC, TDS)
- Fertilizer applications (type, schedule, NPK values)
- Lighting conditions (natural/artificial, hours, spectrum, PPFD/DLI)
- Climate tracking (temperature, humidity, airflow, CO2, USDA zones)
- Growing location (indoor/outdoor/greenhouse with details)
- Container information (type, material, size, drainage)
- Watering schedule (method, frequency, water quality/pH)
- Surrounding environment (companion plants, pests, diseases, ecosystem)
- Growth metrics (measurements, health scores, vigor tracking)

Environmental Analysis (lib/environment/analysis.ts):
- Compare environments with similarity scoring (0-100)
- Generate personalized growing recommendations
- Calculate environmental health scores
- Find plants with similar conditions
- Analyze growth correlations across network
- Identify optimal growing conditions

API Endpoints:
- /api/environment/recommendations - Get plant-specific advice
- /api/environment/similar - Find plants with similar conditions
- /api/environment/compare - Compare two plants environments
- /api/environment/analysis - Network-wide growth correlation

Features:
- Comprehensive soil tracking (pH, texture, drainage, amendments)
- Full NPK and micronutrient monitoring
- Sunlight exposure and artificial light tracking
- Temperature and humidity ranges
- Water quality monitoring (pH, TDS, chlorine)
- Pest and disease tracking
- Companion planting recommendations
- Environmental health scoring with priority-based recommendations
- Growth success analysis across similar environments

Integration:
- Updated PlantData type to include environment and growthMetrics
- Compatible with existing blockchain structure
- Optional environmental data (backward compatible)

Use Cases:
- Track what works for your plants
- Learn from successful growers with similar conditions
- Get personalized recommendations based on your setup
- Compare your environment with thriving plants
- Optimize conditions for better yield/health
- Share growing knowledge with the community
- Research optimal conditions by species

This enables growers to:
- Understand why plants thrive or struggle
- Replicate successful growing conditions
- Make data-driven decisions
- Learn from the collective experience
- Improve propagation success rates
2025-11-16 16:24:38 +00:00
Claude
ccea9535d4
Add Tor integration and privacy features for anonymous plant sharing
Implements comprehensive privacy and anonymity features including Tor
hidden service support, location obfuscation, and anonymous registration.

Privacy Features:
- Anonymous plant registration with zero personal information
- Location privacy levels: exact, fuzzy, city, country, hidden
- Pseudonymous identities and wallet addresses
- Privacy settings component with real-time Tor status
- Encrypted anonymous contact generation

Tor Integration:
- SOCKS proxy support for Tor connections
- Hidden service (.onion) configuration
- Tor connection detection and status API
- Docker Compose setup for easy Tor deployment
- Automatic privacy warnings when not using Tor

Location Obfuscation:
- Fuzzy location: ±1-5km random offset
- City level: ~10km grid
- Country level: ~100km grid
- Hidden: complete location privacy
- Haversine-based distance calculations preserved

Anonymous Registration:
- /plants/register-anonymous endpoint
- Privacy-first UI with Tor status banner
- Anonymous IDs and wallet addresses
- Optional pseudonym support
- Encryption key support for enhanced security

Infrastructure:
- Tor service integration (lib/services/tor.ts)
- Privacy utilities (lib/privacy/anonymity.ts)
- PrivacySettings React component
- Tor status API endpoint
- Docker and docker-compose configurations
- Example Tor configuration (torrc.example)

Documentation:
- Comprehensive TOR_SETUP.md guide
- Installation instructions for Linux/macOS/Windows
- Privacy best practices
- Troubleshooting guide
- Security considerations
- Updated README with Tor features

Dependencies:
- Added socks-proxy-agent for Tor proxy support

This enables:
- Privacy-conscious growers to share anonymously
- Protection of exact home locations
- Censorship-resistant plant sharing
- Community building without identity disclosure
- Compliance with privacy regulations

All privacy features are optional and configurable.
Users can choose their desired privacy level.
2025-11-16 12:32:59 +00:00
Claude
5a93b3e680
Switch to Bun runtime for faster performance
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)
2025-11-16 12:19:56 +00:00
Claude
1e14a700c7
Implement LocalGreenChain: Plant Cloning Blockchain System
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
2025-11-16 05:11:55 +00:00
vespo92
0721b7dc8f Initial commit
Created from https://vercel.com/new
2023-08-09 21:34:23 +00:00