-
pnpm add react-leaflet leafletβ
"use client";
import dynamic from "next/dynamic";
import { useEffect, useState } from "react";
const FieldMap = dynamic(() => import("./parts/FieldMap"), { ssr: false });
export default function FieldMapsPage() {
const [fields, setFields] = useState<any[]>([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetch("/api/proxy/api/v1/datasets/fields")
.then(r => r.json())
.then(d => setFields(d))
.finally(() => setLoading(false));
}, []);
return (
<div>
<h1 className="text-2xl font-semibold mb-4">Field Maps</h1>
{loading ? (
<div className="rounded-xl border p-6 text-sm text-gray-500">Loading field boundariesβ¦</div>
) : (
<div className="rounded-xl border overflow-hidden">
<FieldMap fields={fields} />
</div>
)}
</div>
);
}
"use client";
import "leaflet/dist/leaflet.css";
import { MapContainer, TileLayer, Polygon, Tooltip, ImageOverlay } from "react-leaflet";
import L β¦ -
# Agrosynth OS β Monorepo (MVP Code + Security-First Scaffold)β
> Production-ready scaffold for an AI-driven ag platform with AR/VR, satellite+drone data fusion, blockchain-backed certification, and zero-trust security. Includes: FastAPI backend, AI microservice, Next.js frontend, Solidity contracts, Unity XR stubs, data-provider adapters, and DevSecOps (Docker/K8s/OPA/mTLS).
---
## Repository Layout
```
agrosynth/
ββ README.md
ββ docker-compose.yml
ββ .env.example
ββ package.json
ββ pnpm-workspace.yaml
ββ k8s/
β ββ base/
β β ββ namespace.yaml
β β ββ gateway.yaml
β β ββ opa-gatekeeper.yaml
β β ββ cert-manager.yaml
β ββ overlays/prod/
β ββ backend.yaml
β ββ ai-service.yaml
β ββ frontend.yaml
β ββ ingress.yaml
β ββ networkpolicies.yaml
ββ security/
β ββ THREAT_MODEL.md
β ββ OPA_POLICIES.rego
β ββ mtls/
β β ββ generate.sh
β β ββ openssl.cnf
β ββ sops.yaml
ββ backend/ # FastAPI + Postgres + Redis + OPA sidecar
β ββ pyproject.toml
β ββ agrosynth/
β β ββ __init__.py
β β ββ main.py
β β ββ conβ¦ -
initial commit