62 lines
2.0 KiB
Markdown
62 lines
2.0 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Technology Stack
|
|
|
|
- **Java 21**
|
|
- **Vaadin 25.0.3** (server-side Java UI framework with Lumo theme)
|
|
- **Spring Boot 4.0.1**
|
|
- **Maven build system**
|
|
|
|
## Development Commands
|
|
|
|
```bash
|
|
./mvnw # Start in development mode (default goal)
|
|
./mvnw spring-boot:run # Explicit development mode
|
|
./mvnw test # Run all tests
|
|
./mvnw test -Dtest=MyTest # Run a single test class
|
|
./mvnw test -Dtest=MyTest#method # Run a single test method
|
|
./mvnw -Pproduction package # Build production JAR
|
|
```
|
|
|
|
Application runs at http://localhost:8080 (auto-launches browser in dev mode).
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
de.assecutor.aimailassistant/
|
|
├── Application.java # Entry point with @SpringBootApplication
|
|
└── [feature packages] # Add feature packages here
|
|
```
|
|
|
|
This project uses **feature-based packaging**: each feature is self-contained with its own entities, repositories, services, and UI views.
|
|
|
|
## Architecture Guidelines
|
|
|
|
### Adding Features
|
|
|
|
Create new packages under `de.assecutor.aimailassistant` (e.g., `de.assecutor.aimailassistant.mail`). Each feature package should contain:
|
|
- JPA entities
|
|
- Spring Data repositories
|
|
- Service classes with `@Transactional`
|
|
- Vaadin UI views
|
|
|
|
### Vaadin Patterns
|
|
|
|
- **Server-side rendering**: UI components are Java classes
|
|
- **Routing**: Use `@Route("path")` annotation on view classes
|
|
- **Navigation**: Use `@Menu` annotation to add views to automatic navigation
|
|
- **Lazy loading**: Use `VaadinSpringDataHelpers.toSpringPageRequest(query)` for Grid pagination
|
|
- **Styling**: Custom styles in `src/main/resources/META-INF/resources/styles.css`
|
|
|
|
### Spring Patterns
|
|
|
|
- Constructor injection (no `@Autowired` on fields)
|
|
- `@Transactional` for write operations
|
|
- `@Transactional(readOnly = true)` for read operations
|
|
|
|
## Database
|
|
|
|
No database configured yet. To add persistence, include Spring Data JPA and a database driver in pom.xml.
|