yukong/GEMINI.md

63 lines
2.2 KiB
Markdown

# Gemini Context: DJI Cloud API Demo Platform
## Project Overview
This project is a comprehensive management platform for DJI Docks and industry drones, demonstrating the "Cloud API" integration. It is a full-stack application designed with a separation of concerns between the backend services and the frontend user interface.
* **Purpose:** To manage device access, control, and data visualization for DJI enterprise products.
* **Architecture:** Client-Server architecture using HTTP for management and MQTT for real-time device communication.
## Project Structure
* **Cloud-API (Backend):**
* **Language:** Java 11+
* **Framework:** Spring Boot 2.7.12
* **Key Components:**
* `cloud-sdk`: Core logic for DJI device interaction.
* `sample`: Business logic implementation.
* **Infrastructure:** MySQL 8.0+, Redis 6.2+, EMQX 4.4.0 (MQTT Broker).
* **Cloud-API-Web (Frontend):**
* **Language:** TypeScript, HTML, SCSS
* **Framework:** Vue 3 (Composition API)
* **Build Tool:** Vite
* **UI Library:** Ant Design Vue
* **Key Features:** Map visualization (AMap), Real-time video (Agora RTC).
## Building and Running
### Backend (Cloud-API)
Prerequisites: Java 11+, Maven, running MySQL/Redis/EMQX instances.
1. **Configuration:** Update `application.yml` (or properties) in `sample` module with database and MQTT credentials.
2. **Build:**
```bash
cd Cloud-API
mvn clean install
```
3. **Run:**
```bash
cd Cloud-API
mvn spring-boot:run -pl sample
```
### Frontend (Cloud-API-Web)
Prerequisites: Node.js v17.8+ (recommended).
1. **Install Dependencies:**
```bash
cd Cloud-API-Web
npm install
# or yarn install
```
2. **Development Server:**
```bash
npm run serve
```
3. **Production Build:**
```bash
npm run build
```
## Development Conventions
* **Backend:** Follows standard Spring Boot tiered architecture (Controller, Service, DAO). Uses `spring-integration-mqtt` for device messaging.
* **Frontend:** Uses Vue 3 Composition API. State management via Vuex.
* **Database:** Schema is located in `Cloud-API/sql/cloud_sample.sql`.