# CloudTestDrive **Repository Path**: su27ubkk/CloudTestDrive ## Basic Information - **Project Name**: CloudTestDrive - **Description**: 云试驾 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-20 - **Last Updated**: 2026-04-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CloudTestDrive - Enterprise Cloud Test Drive Platform > **MVP Version**: 0.1.0 > **Build**: JDK 21 + Spring Boot 3.2 + Spring Cloud Alibaba > **Status**: Week 1 Infrastructure Setup Complete ## Overview CloudTestDrive is an enterprise-grade cloud test drive platform that provides immersive 3D interactive vehicle experiences. The MVP focuses on the core business loop: user login → browse vehicles → start test drive → real-time control → view results. ## Architecture ``` ┌─────────────────────────────────────────────────────────────┐ │ Client Tier │ │ Web Browser / Mini Program / Mobile App / VR Headset │ └──────────────────────────┬──────────────────────────────────┘ │ HTTP/WebSocket ┌──────────────────────────▼──────────────────────────────────┐ │ API Gateway (8080) │ │ Spring Cloud Gateway + JWT Auth + Sentinel Rate Limiting │ └──────┬──────────┬──────────┬──────────┬─────────────────────┘ │ │ │ │ ┌──────▼───┐ ┌───▼────┐ ┌──▼─────┐ ┌──▼──────────┐ │ Auth │ │ User │ │Vehicle │ │ TestDrive │ │ (8081) │ │ (8082) │ │(8083) │ │ (8084) │ └──────────┘ └────────┘ └────────┘ └──────┬──────┘ │ gRPC ┌──────▼──────┐ │ Simulation │ │ (50051) │ └─────────────┘ ``` ## Tech Stack | Layer | Technology | |-------|------------| | Backend | JDK 21, Spring Boot 3.2.4, Spring Cloud 2023.0.1 | | Microservices | Nacos 2.3, Sentinel 1.8.7 | | Data | MySQL 8.0, Redis 7.2, MyBatis-Plus 3.5.5 | | RPC | gRPC 1.62, Protobuf 3.25 | | Frontend | Vue 3, Three.js, Vite | | DevOps | Docker, Docker Compose, Kubernetes | ## Quick Start ### Prerequisites - JDK 21+ - Maven 3.9+ - Docker & Docker Compose - Node.js 18+ (for frontend) ### Start Infrastructure (Week 1) ```bash # 1. Clone repository git clone cd CloudTestDrive # 2. Start infrastructure (MySQL, Redis, Nacos) cd deploy docker-compose up -d mysql redis nacos # Wait for infrastructure to be ready (about 30 seconds) docker-compose logs -f nacos # Check Nacos is ready # 3. Build all services cd .. mvn clean package -DskipTests # 4. Start all services cd deploy docker-compose up -d # 5. Verify services curl http://localhost:8080/actuator/health ``` ### Local Development ```bash # Start only infrastructure cd deploy docker-compose up -d mysql redis nacos # Run services locally (in separate terminals) cd ../cloud-testdrive-gateway && mvn spring-boot:run cd ../cloud-testdrive-auth && mvn spring-boot:run cd ../cloud-testdrive-user && mvn spring-boot:run cd ../cloud-testdrive-vehicle && mvn spring-boot:run cd ../cloud-testdrive-testdrive && mvn spring-boot:run cd ../cloud-testdrive-simulation && mvn spring-boot:run ``` ### API Testing ```bash # 1. Send SMS code (simulated, check logs for code) curl -X POST http://localhost:8080/api/v1/auth/sms/send?phone=13800138000 # 2. Login (use code from logs, default: random 6 digits) curl -X POST http://localhost:8080/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"phone":"13800138000","code":"123456"}' # 3. Get vehicle list curl http://localhost:8080/api/v1/vehicles # 4. Get vehicle detail curl http://localhost:8080/api/v1/vehicles/1 ``` ### Nacos Console - URL: http://localhost:8848/nacos - Username: nacos - Password: nacos ## Project Structure ``` CloudTestDrive/ ├── pom.xml # Parent POM ├── cloud-testdrive-common/ # Common utilities ├── cloud-testdrive-api/ # gRPC definitions ├── cloud-testdrive-gateway/ # API Gateway ├── cloud-testdrive-auth/ # Auth Service ├── cloud-testdrive-user/ # User Service ├── cloud-testdrive-vehicle/ # Vehicle Service ├── cloud-testdrive-testdrive/ # Test Drive Service ├── cloud-testdrive-simulation/ # Simulation Service ├── cloud-testdrive-frontend/ # Frontend (Week 4) ├── deploy/ # Deployment configs │ ├── docker-compose.yml # Docker Compose │ └── scripts/ │ └── init-db.sql # DB initialization ├── docs/ # Documentation └── plans/ # Architecture plans ``` ## Development Roadmap | Week | Tasks | Deliverables | |------|-------|--------------| | **Week 1** | Infrastructure setup, Gateway, Auth | Gateway + Auth running | | **Week 2** | User Service, Vehicle Service | Login + Browse vehicles | | **Week 3** | Test Drive Service, Simulation | Complete test drive flow | | **Week 4** | Frontend, Integration | End-to-end MVP | ## Configuration ### Environment Variables | Variable | Description | Default | |----------|-------------|---------| | `NACOS_SERVER_ADDR` | Nacos server address | `127.0.0.1:8848` | | `MYSQL_HOST` | MySQL host | `127.0.0.1` | | `MYSQL_PORT` | MySQL port | `3306` | | `MYSQL_USERNAME` | MySQL username | `root` | | `MYSQL_PASSWORD` | MySQL password | `root123` | | `REDIS_HOST` | Redis host | `127.0.0.1` | | `REDIS_PORT` | Redis port | `6379` | | `JWT_SECRET` | JWT signing secret | (see application.yml) | ## License Internal Use Only - CloudTestDrive Team