Files
weather-data/CLAUDE.md
T
2026-06-26 17:39:57 +08:00

60 lines
3.5 KiB
Markdown

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Subdirectories have their own `CLAUDE.md` with module-specific details — see:
- `system-admin/CLAUDE.md` — backend build, patterns, conventions, weather domain
- `system-common/CLAUDE.md` — shared base classes, i18n
- `weather-data-ui/CLAUDE.md` — frontend stack, patterns, critical rules
---
## Project overview
**weather-data** is a full-stack meteorological data analysis platform: Java 17 / Spring Boot 3.5 multi-module backend + Vue 3 / Vite 5 / TypeScript frontend. Forked from [renren-security](https://gitee.com/renrenio/renren-security).
```
weather-data/
├── system-common/ → shared Java lib
├── system-admin/ → admin backend (port 8080, /system-admin)
├── system-dynamic-datasource → multi-DS routing via @DataSource annotation + AOP
├── renren-generator/ → code generator (commented out of build)
└── weather-data-ui/ → Vue 3 SPA frontend
```
**Database**: `weather_data_system` (MySQL). Init from `system-admin/db/weather_data_system.sql` (includes schema + seed data). Default admin: `admin` / `admin` (BCrypt-encoded). Key custom tables: `weather_daily_data`, `weather_station`, `weather_file_scan_record`. No Flyway/Liquibase — all schema changes are manual SQL.
### Port & context path reference
| Service | Port | Context Path | App Class |
|---|---|---|---|
| Admin | 8080 | `/system-admin` | `AdminApplication` |
| Frontend (dev) | 8001 | `/` | Vite dev server |
| Frontend (prod) | 80 | `/` | Nginx via gateway |
---
## Code Style
- **No emoji in UI strings.** Plain Chinese text for labels, buttons, status. Functional Unicode symbols are allowed and used: status dots `●`/`○`, checkmark `✓`, and box-drawing chars (`╔ ═ ╗ ━`) in log banners.
- **No emoji in code comments or docstrings.** Plain text only.
- **Keep CLAUDE.md current** — whenever code is modified, added, deleted, or any file change affects the project structure, build process, architecture, or conventions, update the relevant `CLAUDE.md` in the same commit to reflect the new state. This file and its children are the source of truth for both humans and Claude; stale documentation is a bug.
---
## Docker deployment
Five services in `docker-compose.yml`: mysql (8.0), redis (7 Alpine + AOF), admin JAR, UI (Nginx + built frontend), gateway (Nginx reverse proxy on port 80). The `api` service definition still references the deleted `system-api` module — remove it before deploying.
**Important**: The `deploy/` directory referenced by Docker Compose (`deploy/mysql/init/`, `deploy/nginx/`) **does not exist locally** — it must be created for deployment.
Environment variables from `.env` at project root. Two frontend Dockerfiles: standard multi-stage (`Dockerfile`) and pre-built (`Dockerfile.offline`).
## Repository notes
- `README.md` does not contain substantive guidance — this file is the primary operational reference.
- No CI configuration exists. Only pre-commit is frontend lint-staged via yarn git hooks.
- `renren-generator` module exists but is commented out of the root POM build.
- `system-dynamic-datasource` provides `@DataSource` annotation-driven multi-DS routing; the slave DS config in `application-dev.yml` is commented out.
- `.gitignore` excludes `.idea/` but `.idea/` is tracked (committed IDE config; `.idea/.gitignore` only excludes local files like `workspace.xml`).