2.0 KiB
2.0 KiB
Local Runbook
Prerequisites
- JDK 8
- Maven
- Node.js 18+
- Docker Desktop, for MySQL, Redis, and MinIO
- WeChat DevTools, for native miniapp compile and preview
Start Dependencies
docker compose -f deploy/docker-compose.dev.yml up -d
Expected dependency URLs:
MySQL: localhost:3306
Redis: localhost:6379
MinIO API: http://localhost:9000
MinIO console: http://localhost:9001
Start Backend
cd backend
mvn spring-boot:run
Expected local URLs:
Backend API: http://localhost:8080
Knife4j docs: http://localhost:8080/doc.html
If Docker/MySQL are not available or port 8080 is already occupied, use the no-database demo profile:
cd backend
mvn spring-boot:run "-Dspring-boot.run.profiles=demo"
Demo profile URL:
Backend API: http://localhost:18080
The demo profile starts without MySQL and seeds product, notice, group-buy, a pending group-buy delivery order, secondhand, one goods delivery task, and one express pickup task in memory.
Demo accounts:
Admin: admin / admin123
Merchant: merchant / merchant123
Rider: rider / rider123
Resident: dev miniapp login
Start Admin Web
cd admin-web
npm install
npm run dev
URL:
http://localhost:5173
During local development, /api is proxied to http://localhost:8080 by default. If the backend uses another port:
$env:VITE_API_PROXY_TARGET="http://localhost:18080"
npm run dev
Start Rider H5
cd rider-h5
npm install
npm run dev
URL:
http://localhost:5174
Rider H5 uses the same /api dev proxy behavior as the admin web.
Open Miniapp
Use WeChat DevTools to open:
miniapp/project.config.json
The miniapp request base URL is configured in miniapp/miniprogram/utils/request.js.
Verification Commands
cd backend
mvn test
cd ..\admin-web
npm test
npm run build
cd ..\miniapp
npm test
cd ..\rider-h5
npm test
npm run build