# Repository Guidelines ## Project Structure & Module Organization - `pom.xml` defines the Maven build, dependencies, and Java 17 target. - `src/main/java/de/tamse/primfeedliker/` holds Spring Boot application code. - `src/main/resources/` is for configuration (`application.properties` or `application.yml`) and any static assets. - `src/test/java/de/tamse/primfeedliker/` contains JUnit tests. - `target/` is the build output directory (generated by Maven). ## Build, Test, and Development Commands - `./mvnw spring-boot:run` starts the application locally. - `./mvnw test` runs the JUnit test suite. - `./mvnw package` builds the runnable JAR in `target/`. - `./mvnw clean` removes generated build artifacts. ## Coding Style & Naming Conventions - Use Java 17 language features only when supported by the project’s target level. - Indentation is 4 spaces; follow standard Java and Spring Boot formatting. - Classes use `PascalCase`, methods/fields use `lowerCamelCase`, and constants use `UPPER_SNAKE_CASE`. - Keep package names lowercase and aligned with `de.tamse.primfeedliker`. - No formatter or linter is configured; rely on IDE formatting and consistent manual style. ## Testing Guidelines - Tests use JUnit 5 via `spring-boot-starter-test`. - Place tests under `src/test/java/de/tamse/primfeedliker/` and name them `*Tests.java`. - Keep tests fast and isolated; avoid external dependencies in unit tests. ## Commit & Pull Request Guidelines - No commit history exists yet; use short, imperative summaries (e.g., “Add feed service”). - Include context in the body when behavior changes or configuration is added. - Pull requests should describe the change, list test commands run, and link relevant issues. - Add screenshots or logs when changes affect runtime output or API responses. ## Configuration & Secrets - Store runtime configuration in `src/main/resources/application.properties` or `application.yml`. - Do not commit secrets; use environment variables or local overrides instead. ## Automation Notes - `PrimfeedDoomscrollScript` (`de.tamse.primfeedliker.automation`) is the Selenium entrypoint; run via `./mvnw spring-boot:run -Dspring-boot.run.main-class=de.tamse.primfeedliker.automation.PrimfeedDoomscrollScript`. - Required selectors live in `src/main/resources/application.properties` (`primfeed.feed-item-selector`, `primfeed.profile-name-selector`, `primfeed.like-button-selector`, `primfeed.target-profile`). - Login persistence uses browser profile settings (`primfeed.chrome-user-data-dir`, `primfeed.chrome-profile-dir`, `primfeed.firefox-profile-dir`). - Doomscroll tuning: `primfeed.like-delay-*`, `primfeed.scroll-*`, `primfeed.long-pause-*`, `primfeed.max-scrolls`, `primfeed.max-items`. - Stop/skip controls: `primfeed.max-consecutive-liked`, `primfeed.skip-profiles` (case-insensitive). - Cache controls: `primfeed.cache-path`, `primfeed.cache-max-entries` (default 50k), `primfeed.rescan-window-size`, `primfeed.max-linked-items`.