2.9 KiB
2.9 KiB
Repository Guidelines
Project Structure & Module Organization
pom.xmldefines 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.propertiesorapplication.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:runstarts the application locally../mvnw testruns the JUnit test suite../mvnw packagebuilds the runnable JAR intarget/../mvnw cleanremoves 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 uselowerCamelCase, and constants useUPPER_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.propertiesorapplication.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.