|
|
|
|
@ -1,36 +1,53 @@
|
|
|
|
|
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
|
|
|
|
# AI-Native CRM Frontend |
|
|
|
|
|
|
|
|
|
## Getting Started |
|
|
|
|
🎨 **AI 原生客户关系管理系统 - 前端界面** |
|
|
|
|
|
|
|
|
|
First, run the development server: |
|
|
|
|
这是一个基于 [Next.js](https://nextjs.org/) 构建的现代化 CRM 界面,深度集成 AI 驱动的动态 UI 渲染引擎。 |
|
|
|
|
|
|
|
|
|
```bash |
|
|
|
|
npm run dev |
|
|
|
|
# or |
|
|
|
|
yarn dev |
|
|
|
|
# or |
|
|
|
|
pnpm dev |
|
|
|
|
# or |
|
|
|
|
bun dev |
|
|
|
|
``` |
|
|
|
|
## 🌟 核心特性 (Key Features) |
|
|
|
|
|
|
|
|
|
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
|
|
|
|
- **生成式 UI (Generative UI)**:集成 `UniversalModuleRenderer`,根据 AI 的指令实时绘制业务界面。 |
|
|
|
|
- **动态表单 (Dynamic Form)**:支持 JSON Schema 驱动的复杂表单,具备实体关联选择功能。 |
|
|
|
|
- **Copilot 深度集成**:内置 AI 助手,用户可通过对话直接创建页面、生成报表。 |
|
|
|
|
- **低代码/零代码**:业务模型和界面布局完全由后端 AI 元数据驱动。 |
|
|
|
|
|
|
|
|
|
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
|
|
|
|
## 🛠️ 技术栈 (Tech Stack) |
|
|
|
|
|
|
|
|
|
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
|
|
|
|
- **框架**: Next.js 15 (App Router) |
|
|
|
|
- **样式**: Tailwind CSS + Shadcn UI |
|
|
|
|
- **字体**: Geist (Vercel Typography) |
|
|
|
|
- **图标**: Lucide Icons |
|
|
|
|
- **交互**: CopilotKit React SDK |
|
|
|
|
|
|
|
|
|
## Learn More |
|
|
|
|
## 🚀 快速开始 (Quick Start) |
|
|
|
|
|
|
|
|
|
To learn more about Next.js, take a look at the following resources: |
|
|
|
|
### 前置条件 |
|
|
|
|
- Node.js 18+ |
|
|
|
|
- 已安装 npm 或 yarn |
|
|
|
|
|
|
|
|
|
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
|
|
|
|
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
|
|
|
|
### 运行应用 |
|
|
|
|
1. 安装依赖: |
|
|
|
|
```bash |
|
|
|
|
npm install |
|
|
|
|
``` |
|
|
|
|
2. 配置环境变量: |
|
|
|
|
在根目录创建 `.env.local`,配置 API 地址: |
|
|
|
|
```env |
|
|
|
|
NEXT_PUBLIC_API_URL=http://localhost:8080 |
|
|
|
|
``` |
|
|
|
|
3. 启动开发服务器: |
|
|
|
|
```bash |
|
|
|
|
npm run dev |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
|
|
|
|
## 📂 关键组件 |
|
|
|
|
|
|
|
|
|
## Deploy on Vercel |
|
|
|
|
- `src/components/UniversalModuleRenderer.tsx`: 万能渲染枢纽。 |
|
|
|
|
- `src/components/DynamicForm.tsx`: 基于模式定义的动态表单。 |
|
|
|
|
- `src/app/data/[entityCode]/page.tsx`: 动态列表展示页。 |
|
|
|
|
|
|
|
|
|
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
|
|
|
|
## 📈 当前进度与基准 |
|
|
|
|
详细的功能实现状况请参阅:[.antigravity/BASELINE.md](.antigravity/BASELINE.md) |
|
|
|
|
|
|
|
|
|
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
|
|
|
|
--- |
|
|
|
|
*Created by Antigravity* |
|
|
|
|
|