Skip to content

Latest commit

Β 

History

History
90 lines (70 loc) Β· 2.49 KB

File metadata and controls

90 lines (70 loc) Β· 2.49 KB

🌾 HarvestForge Logistics Planner v3.0

Command center for custom harvesting fleet operations. Manages 97+ combines, support equipment, and crews across multi-state seasonal campaigns.

Quick Start

# 1. Clone and configure
cp .env.example .env
# Edit .env with your JD, Mapbox, and weather API keys

# 2. Start all services
docker compose up -d

# 3. Run database migrations
npm run db:migrate

# 4. Seed development data (97 combines, 65 crew, 70 fields)
npm run db:seed

# 5. Open the app
open http://localhost:5173

Services

Service Port Description
Web 5173 React frontend (Command Center)
API 3001 Fastify REST API + WebSockets
Solver 8001 Python optimization engine (OR-Tools)
PostgreSQL 5432 Database with PostGIS
Redis 6379 Caching + real-time pub/sub

Project Structure

harvestforge/
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ api/              # Fastify backend
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/   # Endpoint handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ services/ # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ models/   # DB + Redis clients
β”‚   β”‚   β”‚   β”œβ”€β”€ jobs/     # Cron jobs (sync, briefing)
β”‚   β”‚   β”‚   └── seeds/    # Dev data generators
β”‚   β”‚   └── migrations/   # SQL migrations
β”‚   β”œβ”€β”€ web/              # React frontend
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ pages/    # Route pages
β”‚   β”‚       β”œβ”€β”€ components/
β”‚   β”‚       β”œβ”€β”€ hooks/
β”‚   β”‚       β”œβ”€β”€ services/ # API client
β”‚   β”‚       └── store/    # Zustand state
β”‚   β”œβ”€β”€ solver/           # Python optimizer
β”‚   β”‚   └── harvestforge_solver/
β”‚   β”œβ”€β”€ shared/           # Types, constants, validation
β”‚   └── mobile/           # React Native (Phase 2)
└── docker/               # Dockerfiles

Development

# Run API + Web without Docker
npm run dev

# Run solver standalone
npm run dev:solver

# Run tests
npm test

# Create a new migration
npm run db:migrate:create -- my-migration-name

Key Docs

Tech Stack

  • Frontend: React 19, TypeScript, Tailwind, Mapbox GL, Zustand
  • API: Fastify 5, PostgreSQL 16 + PostGIS, Redis 7, Zod
  • Solver: Python, FastAPI, OR-Tools
  • Mobile: React Native (Phase 2)