This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
evcc is an extensible EV Charge Controller and home energy management system written in Go with a Vue.js frontend. It manages electric vehicle charging, integrates with solar systems, and provides local energy management without cloud dependencies.
make- Build the full application (UI + Go binary)make build- Build Go binary onlymake ui- Build UI assets onlygo run ./...- Run without building binary./evcc- Run the built binary./evcc --demo- Run with demo configuration
make install- Install Go tools and dependenciesmake install-ui- Install Node.js dependencies (npm ci)
make test- Run Go testsmake test-ui- Run frontend tests (npm test)make lint- Run Go linting (golangci-lint)make lint-ui- Run frontend linting (Prettier, ESLint, TypeScript)
npm run dev- Start Vue dev server (http://127.0.0.1:7071)npm run storybook- Run Storybook (http://127.0.0.1:6006)npm run playwright- Run integration testsnpm run simulator- Run device simulator (http://localhost:7072)
evcc --template-type charger --template new-charger-template.yaml- Test device templatesmake docs- Generate template documentation
- main.go - Entry point, embeds web assets and i18n files
- cmd/ - CLI commands and application setup
- core/ - Core business logic:
- loadpoint.go - EV charging point management
- site.go - Site-wide energy management
- planner/ - Smart charging planning
- coordinator/ - Multi-loadpoint coordination
- api/ - API definitions and types
- server/ - HTTP server, WebSocket, MQTT, and database
- charger/, meter/, vehicle/ - Device integrations
- tariff/ - Tariff integrations
- plugin/ - Plugin system for device and tariff communication
- assets/ - Vue.js frontend application
- assets/js/ - TypeScript/Vue.js application
- assets/views/ - Vue components and pages
- i18n/ - Internationalization files
- dist/ - Built frontend assets (generated)
- Uses YAML configuration files
- Templates in
templates/definition/for device and tariff configurations - Database: SQLite (default:
evcc.db)
- Device types: chargers, meters, vehicles (and tariffs)
- Plugin system supports: Modbus, HTTP, MQTT, JavaScript, Go
- Templates define device capabilities and configuration
- Use
_blueprint.goas starting point for new Go implementations
- Go tests use standard
testingpackage - Frontend tests use Vitest
- Integration tests use Playwright
- Simulator available for testing without real devices
- Translations managed via Weblate
- Update both
i18n/de.jsonandi18n/en.jsonfor new strings - Use
$t()function in Vue components
- Configuration:
evcc.yaml(or specified with--config) - Database:
evcc.db(or specified with--database) - Device templates:
templates/definition/ - Web assets:
assets/(source),dist/(built) - Generated code: Files ending in
_enumer.go,*_decorators.go
- Create template in
templates/definition/[type]/ - If Go code needed, implement in respective package
- Test with
evcc --template-type [type] --template [file] - Run
make docsto update documentation
- Start backend:
make build && ./evcc - Start frontend dev server:
npm run dev - Access development UI at http://127.0.0.1:7071
- Build application:
make ui build - Run tests:
npm run playwright - Use simulator for device testing:
npm run simulator