How anang-programmer/prima works
PRIMA is a mobile-first shrimp-farming management app. Farmers manage ponds and grow-out cycles, record feed, probiotic, sampling and Anco observations, then use recommendations, monitoring and harvest projections to guide operations. Separate branches provide AI consultation, farmer-community features, and reminders with push notifications. The sampled pond page directly uses calculation helpers and Supabase; notification routes document their database and FCM work. Community and several other feature paths are present in the tree but their implementation was not sampled, so their internal wiring is left unspecified.
Main entry points: page.tsx Pond And Cycle · kirim/route.ts Timer Push Route · sosial/route.ts Social Push Route · ai-konsultasi/route.ts AI Consultation API
Components 27
Pond Operations
- Pond Dashboard
src/app/dashboard/page.tsx - Pond And Cycle
src/app/kolam/[id]/page.tsx - Pond Entry Forms
src/app/dashboard/_components - Feed Calculator
src/lib/feed-calculator.ts - Farm Logbook
src/app/kolam/[id]/_components/LogBookTab.tsx - Anco Records
src/app/kolam/[id]/_components/AncoModal.tsx
Cycle Insights
- Growth Monitoring
src/app/kolam/[id]/_components/MonitoringTab.tsx - Harvest Projection
src/app/kolam/[id]/_components/ProjectionTab.tsx - Cycle History
src/app/riwayat-panen/page.tsx - Cycle Data Derivation
src/app/kolam/[id]/_lib/derive.ts
Farmer Community
- Community Feed
src/app/komunitas/page.tsx - Community Post
src/app/komunitas/[id]/page.tsx
AI Assistance
- AI Consultation UI
src/app/kolam/[id]/_components/ConsultAISheet.tsx - AI Consultation API
src/app/api/ai-konsultasi/route.ts
Data And Alerts
- Sign In And Registration
src/app/masuk/page.tsx - Supabase Clients
src/lib/supabase/client.ts - Timer Context
src/context/TimerContext.tsx - Timer Push Route
src/app/api/notifikasi/kirim/route.ts - Social Push Route
src/app/api/notifikasi/sosial/route.ts - Notifications UI
src/app/notifikasi/page.tsx - FCM Token Manager
src/components/FcmTokenManager.tsx
Other components
- Farmer
- AI Providers
- Supabase
- Android WebView Bridge
- Firebase Cloud Messaging
- Scheduled Cron
Connections 31
- Farmer → Sign In And Registration: signs in
- Farmer → Pond Dashboard: manages ponds
- Pond Dashboard → Pond And Cycle: opens pond
- Farmer → Pond Entry Forms: enters farm data
- Pond And Cycle → Feed Calculator: calculates feed
- Pond And Cycle → Supabase Clients: reads and writes
- Pond And Cycle → AI Consultation API: requests consultation
- AI Consultation API → AI Providers: sends chat
- AI Consultation API → Pond And Cycle: returns reply
- Pond And Cycle → Cycle Data Derivation: derives cycle data
- Pond And Cycle → Growth Monitoring: displays monitoring
- Pond And Cycle → Harvest Projection: displays projections
- Farmer → Cycle History: reviews harvests
- Farmer → Community Feed: shares insights
- Community Feed → Community Post: opens post
- Community Post → Social Push Route: requests social alert
- Farmer → Farm Logbook: records farm activity
- Farmer → Anco Records: records Anco result
- Scheduled Cron → Timer Push Route: triggers due checks
- Timer Push Route → Supabase: queries and updates timers
- Timer Push Route → Supabase: loads ponds and tokens
- Timer Push Route → Firebase Cloud Messaging: sends push alerts
- Timer Push Route → Firebase Cloud Messaging: gets OAuth token
- Social Push Route → Supabase: loads post and tokens
- Social Push Route → Firebase Cloud Messaging: sends social push
- Social Push Route → Firebase Cloud Messaging: gets OAuth token
- Timer Context → Notifications UI: supports reminders
- FCM Token Manager → Android WebView Bridge: requests device token
- FCM Token Manager → Supabase: upserts device token
- Sign In And Registration → Supabase Clients: authenticates
- Pond And Cycle → Growth Monitoring: shows cycle measures