Welcome, AI agent. This is your primary entry point. Read this file first, then follow the cascade below.
Build a portfolio-grade Spring Boot backend for DJ set planning and performance intelligence.
- Enterprise-style architecture, not a tutorial project.
- Every decision must be intentional and documented.
- No shortcuts, no framework magic.
| Priority | File | Purpose | When to Read |
|---|---|---|---|
| 1 | AGENTS.md (this file) |
Primary entry point, critical rules | Always first |
| 2 | docs/ai-context.md |
AI coding manifesto: stack, architecture, style | Before writing any code |
| 3 | docs/project-plan.md |
Roadmap, phases, current status | Before planning features |
| 4 | docs/architecture.md |
Deep architecture decisions | When designing new components |
| 5 | docs/conventions.md |
Naming conventions, package structure | When creating new files |
| 6 | README.md |
Human-readable setup & overview | When you need build/run commands |
All feature implementations must be split into small, reviewable increments.
- Each increment: ~200 lines of changed code max
- Each increment must be tested before proceeding
- Propose the plan, get approval, then code
- Update
docs/project-plan.mdafter each increment
Full details in docs/ai-context.md § Incremental Development Rule
Controller → Service → Repository
- No entity exposure in controllers (DTOs only)
- Repositories remain pure CRUD
- Services contain business logic + DTO mapping
- No dedicated mapper classes — manual mapping in services
| Layer | Technology |
|---|---|
| Language | Java 25 |
| Framework | Spring Boot 3.x |
| Database | PostgreSQL |
| Migrations | Flyway only (no ddl-auto) |
| Cache | Redis with RedisJSON module |
| AI | Spring AI + Ollama (local LLM) |
| Testing | Testcontainers (PostgreSQL + Redis), Rest Assured |
| Audio | JAudioTagger |
- Constructor injection only
- Explicit
Optionalhandling with guard clauses - No functional chaining (
.map().filter()pipelines) - Static factory methods for entity creation
Optional.isEmpty()/Optional.get()pattern (noorElseThrow)- No
@Data/ Lombok — explicit getters/setters
- AI is enhancement, not required for core functionality
- All AI endpoints must have rule-based fallback
@ConditionalOnProperty("ai.enabled")for toggling- Core API works 100% without AI
- Integration tests for all new endpoints (Rest Assured + Testcontainers)
- Unit tests for pure logic components (no Spring context)
- No mocking repositories in integration tests
- Real PostgreSQL + Redis via Testcontainers
- Schema validated via Flyway
- AI tests: mock Ollama responses, test fallback logic
Before writing any code:
- Read
docs/ai-context.md(5 min) - Read
docs/project-plan.md— current phase (3 min) - Check if a similar endpoint exists (read existing controller/service)
- Propose increment plan to user
- Wait for approval before coding
trackstack/
├── AGENTS.md ← You are here
├── docs/
│ ├── ai-context.md ← AI coding rules
│ ├── project-plan.md ← Roadmap & phases
│ ├── architecture.md ← Deep architecture
│ └── conventions.md ← Naming & structure
├── src/
│ ├── main/
│ │ └── java/com/jfontdev/trackstack/
│ │ ├── controller/ ← REST endpoints (DTOs in/out)
│ │ ├── service/ ← Business logic + interfaces
│ │ ├── service/impl/ ← Service implementations
│ │ ├── repository/ ← Pure CRUD JPA
│ │ ├── model/ ← JPA entities (factory methods)
│ │ ├── dto/ ← Request/Response DTOs
│ │ ├── config/ ← Spring config, serializers
│ │ └── exception/ ← Custom exceptions
│ └── test/
│ └── java/com/jfontdev/trackstack/
│ ├── *IntegrationTest.java ← Full-stack tests
│ └── service/ ← Unit tests
└── src/main/resources/
├── db/migration/ ← Flyway migrations
└── application*.yml ← Config per environment
| When you change... | Update this file |
|---|---|
| Technology stack | docs/ai-context.md |
| Phase status / roadmap | docs/project-plan.md |
| Architecture pattern | docs/architecture.md |
| Naming convention | docs/conventions.md |
| AI agent rules | AGENTS.md + docs/ai-context.md |
- No microservices
- No reactive stack
- No front-end (API-only)
- No Hibernate
ddl-auto - No code generation tools
- No vector database (RAG-lite via prompt context)
- No premature abstraction
- Rest Assured: Use
given().when().then()pattern for integration tests - Testcontainers: PostgreSQL + Redis containers auto-wire via
@ServiceConnection - RedisJSON: Use
RedisJSONSerializerfor clean JSON (no@classhack) - Camelot Wheel: Use
TransitionCompatibilityEnginefor key/BPM calculations - Flyway: All schema changes go in
db/migration/V{N}__description.sql
Phase 04 – Performance Journal
- Phase 03.5 COMPLETE: All 5 increments done.
- Next: Session recording, planned vs actual tracking, performance stats.
Next immediate action: Implement Phase 04 — session recording and performance journal.
This file is maintained for AI agents. Humans should read README.md.