Terra Platform is a production-grade web application that provides real-time analytics and monitoring for agricultural enterprises across Kazakhstan and Central Asia.
Farmers and agro-managers get a unified dashboard to track:
- π‘οΈ Soil temperature & moisture sensors
- π¦οΈ Live weather feeds per field zone
- π Yield prediction models (ML-based)
- πΊοΈ Interactive field map (Leaflet.js)
- π Historical trend charts (Recharts)
- Real-time data β WebSocket-powered live sensor feeds
- Role-based access β Farm owner / Field manager / Analyst tiers
- Multi-farm support β Manage hundreds of fields from one dashboard
- Mobile-first β Fully responsive, works on any device
- Export β CSV/PDF reports for any date range
- Internationalization β Russian, Kazakh, English (next-intl)
| Layer | Technology |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript 5 |
| Styling | TailwindCSS + shadcn/ui |
| State | Zustand + React Query |
| Database | PostgreSQL 16 |
| ORM | Prisma |
| Auth | NextAuth.js (JWT) |
| Charts | Recharts |
| Maps | Leaflet.js |
| Realtime | WebSockets (ws) |
| Deploy | Vercel + Supabase |
# Clone the repo
git clone https://github.com/wpalish/terra-platform.git
cd terra-platform
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Run database migrations
npx prisma migrate dev
# Start development server
npm run devOpen http://localhost:3000 in your browser.
DATABASE_URL=postgresql://...
NEXTAUTH_SECRET=your-secret
NEXTAUTH_URL=http://localhost:3000
WEATHER_API_KEY=your-keyterra-platform/
βββ app/ # Next.js App Router
β βββ (auth)/ # Auth routes
β βββ dashboard/ # Main dashboard
β βββ fields/ # Field management
β βββ api/ # API routes
βββ components/
β βββ charts/ # Recharts components
β βββ maps/ # Leaflet map components
β βββ ui/ # shadcn/ui primitives
βββ lib/
β βββ prisma.ts # DB client
β βββ auth.ts # NextAuth config
β βββ websocket.ts # WS client
βββ prisma/
β βββ schema.prisma # DB schema
βββ public/
model Farm {
id String @id @default(cuid())
name String
location String
fields Field[]
owner User @relation(fields: [ownerId], references: [id])
ownerId String
}
model Field {
id String @id @default(cuid())
name String
area Float // hectares
crop String
sensors Sensor[]
farm Farm @relation(fields: [farmId], references: [id])
farmId String
}
model SensorReading {
id String @id @default(cuid())
sensorId String
temperature Float
moisture Float
timestamp DateTime @default(now())
}MIT Β© ΠΠ»ΠΈΡΠ΅Ρ ΠΡΡΡΠ°ΠΈΠ½
Built with β€οΈ in Astana, Kazakhstan π°πΏ