δΈζζζ‘£ | English
Terra EMS (Terra Energy Management System) is a modern energy management platform designed for industrial enterprises. Built with Spring Boot 3.4 and Spring Data JPA, it provides comprehensive features including energy monitoring, TOU (Time-of-Use) electricity analysis, cost accounting, carbon emission measurement, energy benchmarking, and smart alerting.
π¦ Frontend Repository: terra-ems-web
- URL: http://terra-ems.com
- Username:
admin - Password:
admin123
Tip
Key Innovations:
- High-Performance Edge Computing: Rust-based gateway supporting thousand-level point collection, with disk-level Local Cache to ensure zero data loss during network flips.
- Minute-Level Deployment: Support for YAML site configuration import, enabling one-click initialization of the entire site hierarchy (Site-Gateway-Meter-Point).
| Module | Description | Status |
|---|---|---|
| π Base Data | Energy types, Energy units (tree structure), Meters, Sampling points | β |
| π Fast Deploy | One-click YAML Site Import, Auto-initialization | β |
| π‘οΈ Edge Intel | Rust Collector, Local Cache, Transparent Transmission | β |
| π Statistics | Consumption stats, YoY/MoM analysis, Trend analysis, Ranking, Dashboards | β |
| β‘ Peak & Valley | TOU pricing policy configuration, peak/valley/flat usage analysis | β |
| π° Cost Mgmt | Price policy management, cost binding, cost records & variance analysis | β |
| π Carbon | Carbon emission calculation, trend analysis, ranking | β |
| π― Benchmarking | Energy benchmarking (National/Industry/Enterprise/Regional standards) | β |
| π± Energy Saving | Lifecycle tracking of energy-saving projects, policy & regulation mgmt | β |
| Limit types, pre-alarm configuration, alert records & processing | β | |
| π Knowledge | Energy-saving knowledge base (Markdown support) | β |
| π Production | Product information, production record management | β |
| π€ System Mgmt | Users, Roles, Depts, Posts, Menus, Permissions, Dicts, Configs | β |
| π Monitoring | Login logs, Operation logs, Online users, Cache management | β |
| Category | Technology | Version |
|---|---|---|
| Language | Java 21 / Rust 1.82+ | β |
| Message Bus | EMQX (MQTT 5.0) | 5.x |
| Business DB | PostgreSQL | 17 |
| TSDB | GreptimeDB | 0.9+ |
| Cache | Redis | 6+ |
| Backend | Spring Boot | 3.4.4 |
| Frontend | React + TypeScript + Ant Design Pro | β |
terra-ems-server/
βββ terra-ems-common/ # Common module: Result, ErrorCodes, Utilities
βββ terra-ems-framework/ # Framework module: Security, JPA Base, Controller Hierarchy
βββ terra-ems-system/ # Business module: Entity, Repository, Service (System + Business)
βββ terra-ems-admin/ # Admin module: Bootloader, Controllers, API definitions
βββ database/ # SQL scripts
βββ Dockerfile # Docker build file
### 3. All-in-One Start (Docker Compose)
If you have both `terra-ems-server` and `terra-ems-web` cloned in the same parent directory:
```bash
docker-compose up --build
This will spin up PostgreSQL, Redis, the Backend (8081), and the Frontend (80) automatically.
# Using combined init script (includes schema + demo data)
psql -U postgres -d terra_ems -f database/combined_init_postgres.sqlmvn clean install -DskipTests
cd terra-ems-admin
mvn spring-boot:runAccess Swagger UI: http://localhost:8081/api/swagger-ui.html
We welcome bug reports, feature suggestions, or usage inquiries via Issues.
Important
About Pull Requests (PR): To maintain project architectural consistency and ensure the stability of future commercial roadmap, we are not currently accepting external code contributions (Pull Requests). We appreciate your understanding and welcome discussions through Issues.
MIT License β Copyright Β© 2025-2026 Terra Technology (Guangzhou) Co., Ltd.





