尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证FarmRisk gives Indian farmers a 15-day weather forecast bias-corrected against IMD observations, root-zone soil moisture from a calibrated water-balance model, and crop risk advisories for their location, in five languages.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Welcome to the FarmRisk frontend repository. This project is a Next.js application designed to provide high-resolution remote sensing, satellite field mapping, and localized climate data backed by predictive AI insights.
This README serves as a guide for team members to understand the architecture, routing mechanics, and code organization.
We use a standard, single Next.js repository to keep our landing page, dashboard console, components, and API routes completely unified.
Below is a breakdown of our current directory tree:
├── app/ # Next.js App Router (Routing & Pages)
│ ├── api/ # Secure serverless API routes
│ │ ├── ai/ # Secure proxy endpoints for LLM insights & chat
│ │ └── weather/ # Secure proxy endpoints for weather API data
│ ├── constants/ # Centralized copy, titles, and layout configurations
│ │ └── content.ts # Dynamic content JSON arrays (Sidebar navigation, headers)
│ ├── dashboard/ # The main, authenticated application console
│ │ ├── layout.tsx # Persistent shell containing the global Sidebar + Top Nav
│ │ ├── page.tsx # Overview sub-page (at /dashboard)
│ │ ├── map/ # Satellite map sub-page (at /dashboard/map)
│ │ ├── profile/ # User profile settings (at /dashboard/profile)
│ │ ├── settings/ # Extended console settings
│ │ └── weather/ # Weather analytics tab
│ ├── globals.css # Global Tailwind CSS configurations
│ ├── layout.tsx # Global HTML root layout wrapper
│ └── page.tsx # Root public-facing Landing Page
├── components/ # Reusable React components
│ ├── app-sidebar.tsx # Our main sidebar wrapper (dynamically built via JSON config)
│ └── ui/ # Low-level shadcn/ui structural primitives
├── hooks/ # Custom global React hooks
├── lib/ # Helper frameworks and utilities (e.g., clsx styling helpers)
└── types/ # Global TypeScript definitions and type guards
Everything inside the app/ directory automatically maps to a URL route.
app/page.tsx (the root /).app/dashboard/. Sub-folders like map/ or profile/ instantly resolve to /dashboard/map and /dashboard/profilelayout.tsxWe utilize Next.js layouts to prevent expensive, jarring UI re-renders:
app/dashboard/layout.tsx serves as the permanent frame for our internal tools.<AppSidebar /> component.{children} prop.To ensure long-term maintainability and prevent copy text or routes from cluttering up layout styles, all content is strictly data-driven.
app/constants/content.tsThis file holds our global string constants (titles, descriptions) as well as the layout configurations for our navigation links.
Instead of hardcoding layout links inside the TSX files, components/app-sidebar.tsx imports configuration JSON arrays directly from content.ts. It iterates over them dynamically using a .map() loop, passing corresponding key routes and matching icon names.
content.ts. You do not need to rewrite any layout markup.app/globals.css). shadcn/ui components (stored locally inside components/ui/ so we can customize them fully).bun.lock).If you are adding a feature:
app/dashboard/<feature-name>/page.tsx folder.app/constants/content.ts to reveal it automatically on the UI console