Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [1.0.0] - 2026-08-23

### Added
- Real-time notification system with WebSocket and STOMP message broker (`/ws`), JWT channel handshake authentication, and private user destination queues (`/user/queue/notifications`).
- Persistent Notification Center REST API:
- `GET /api/v1/notifications`: Paginated list of notifications with unread filtering.
- `GET /api/v1/notifications/unread-count`: Fast badge counter for unread notifications.
- `PATCH /api/v1/notifications/{id}/read`: Mark single notification as read.
- `PATCH /api/v1/notifications/read-all`: Bulk mark all notifications as read for authenticated user.
- Event-driven notification listener translating domain events (`TaskAssignedEvent`, `TaskCommentCreatedEvent`, `TaskStatusChangedEvent`, `TeamMemberJoinedEvent`) into persistent and real-time push alerts.
- Database migration `V11__create_notifications_table.sql` with partial indexing on unread notifications and foreign keys.
- Universal OpenAI-Compatible Generative AI Assistant module (`/api/v1/ai`):
- Standard `POST /chat/completions` REST client compatible with Groq Cloud (`llama-3.3-70b-versatile`), Google Gemini (OpenAI endpoint), local Ollama (`llama3.2`), and enterprise AI Gateways with resilient context-aware heuristic fallback.
- `POST /api/v1/ai/generate-description`: Synthesize comprehensive Markdown task descriptions and checkbox acceptance criteria from brief user prompts.
- `POST /api/v1/ai/summarize-task/{taskId}`: Executive summary distilling task metadata and all threaded comments into key takeaways and action items.
- `POST /api/v1/ai/suggest-priority`: Intelligent priority recommendation (`LOW`, `MEDIUM`, `HIGH`, `URGENT`) with confidence score and reasoning.
- `POST /api/v1/ai/detect-duplicates`: Semantic duplicate task detection across workspace tasks.
- `POST /api/v1/ai/suggest-labels`: Smart technical categorization tag suggestions based on task context.
- Full test coverage for notification lifecycle and AI assistant workflows (total tests increased to 99 passing tests).

---

## [0.4.0] - 2026-08-22

### Added
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
[![Java Version](https://img.shields.io/badge/Java-25-orange.svg)]()
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.4.x-blue.svg)]()
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-4.x-blue.svg)]()
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-17-blue.svg)]()
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

Expand All @@ -17,7 +17,7 @@ A high-performance, modular-monolith collaborative task management backend engin
- **Robust Persistence**: PostgreSQL 17 datastore with Flyway migrations, JSONB attributes, and generated `tsvector` full-text search.
- **Event-Driven Messaging**: Broker-agnostic event pipeline using Spring Cloud Stream with RabbitMQ binder (swappable to Kafka).
- **Bidirectional Real-Time Updates**: WebSocket with STOMP protocol and SockJS fallback for live notifications.
- **Pluggable Generative AI**: Unified Spring AI engine supporting Google Gemini (free tier), Groq (free tier), and local Ollama inference.
- **Universal Generative AI**: Universal OpenAI-compatible engine supporting Groq Cloud, Google Gemini (OpenAI endpoint), Ollama, vLLM, and enterprise AI Gateways with resilient heuristic fallback.
- **Production Observability**: Health probes, Micrometer metrics, and RFC 7807 `ProblemDetail` error handling.

---
Expand All @@ -27,13 +27,13 @@ A high-performance, modular-monolith collaborative task management backend engin
| Layer | Technology |
|:---|:---|
| **Language** | Java 25 (LTS) |
| **Framework** | Spring Boot 3.4.x / 4.x + Spring Security 6.x |
| **Framework** | Spring Boot 4.x + Spring Security 6.x/7.x |
| **Database** | PostgreSQL 17 with Flyway Migrations |
| **Caching & Rate Limiting** | Redis 7 |
| **Messaging** | Spring Cloud Stream + RabbitMQ |
| **Real-time** | WebSocket + STOMP (SockJS) |
| **Object Storage** | MinIO (local S3-compatible) / AWS S3 |
| **AI Integration** | Spring AI (Gemini, Groq, Ollama) |
| **AI Integration** | Universal OpenAI-Compatible Client (Groq, Gemini, Ollama, AI Gateways) |
| **Testing** | JUnit 5, Testcontainers, ArchUnit, AssertJ |
| **API Documentation** | OpenAPI 3.1 & Swagger UI |

Expand Down Expand Up @@ -93,6 +93,8 @@ TaskMaster exposes a versioned, RESTful API secured by asymmetric RS256 JWTs wit
| **Team Workspaces** | `/api/v1/teams` | Workspace creation, member governance, secure invite code generation/joining, and role management | Yes (Bearer JWT) |
| **Task Comments** | `/api/v1/tasks/{taskId}/comments` | Hierarchical threaded task comments, nested replies, editing, and soft deletion | Yes (Bearer JWT) |
| **Task Attachments** | `/api/v1/tasks/{taskId}/attachments` | Multipart file upload (Max 10MB), S3/MinIO storage, pre-signed download URLs, and deletion | Yes (Bearer JWT) |
| **Notifications** | `/api/v1/notifications` | Real-time STOMP push (`/ws`), unread count badge, mark as read, and persistent notification center | Yes (Bearer JWT) |
| **AI Assistant** | `/api/v1/ai` | Pluggable Generative AI (Gemini/Groq/Ollama) for description synthesis, summarization, priority, and duplicate detection | Yes (Bearer JWT) |

---

Expand All @@ -118,7 +120,7 @@ Track implementation progress across release phases:
- ✅ **Phase 2: User Authentication & Authorization**
- ✅ **Phase 3: Task Management**
- ✅ **Phase 4: Team Collaboration**
- ⬜ **Phase 5: Real-time Notifications & AI Integration**
- ✅ **Phase 5: Real-time Notifications & AI Integration**
- ⬜ **Phase 6: Advanced Search & Analytics**
- ⬜ **Phase 7: Performance & Reliability**
- ⬜ **Phase 8: DevOps & Cloud Deployment**
Expand All @@ -134,6 +136,7 @@ For detailed milestone breakdowns, see [docs/ROADMAP.md](./docs/ROADMAP.md).
Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our branch naming conventions, conventional commit standards, and pull request process.

Architecture Decision Records are available in [docs/adr/](./docs/adr/).
For complete system design and C4 diagrams, see [docs/architecture.md](./docs/architecture.md).

---

Expand Down
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
java
id("org.springframework.boot") version "3.4.3"
id("org.springframework.boot") version "4.0.0"
id("io.spring.dependency-management") version "1.1.7"
checkstyle
}
Expand All @@ -20,7 +20,7 @@ repositories {
}

val springCloudVersion = "2024.0.0"
val springAiVersion = "1.0.0-M6"
val springAiVersion = "2.0.1"
val mapstructVersion = "1.6.3"
val springdocVersion = "2.8.5"
val archunitVersion = "1.4.1"
Expand All @@ -42,7 +42,7 @@ dependencies {
implementation("org.flywaydb:flyway-database-postgresql")

// AWS S3 / MinIO
implementation("software.amazon.awssdk:s3:2.30.36")
implementation("software.amazon.awssdk:s3:2.54.0")

// MapStruct
implementation("org.mapstruct:mapstruct:$mapstructVersion")
Expand All @@ -53,6 +53,7 @@ dependencies {

// Testing
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
Expand All @@ -62,9 +63,12 @@ dependencies {
testRuntimeOnly("com.h2database:h2")
}

val testcontainersVersion = "1.20.5"

dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion")
mavenBom("org.testcontainers:testcontainers-bom:$testcontainersVersion")
}
}

Expand Down
4 changes: 2 additions & 2 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ A trackable overview of delivery milestones and planned capabilities for the Tas
- Threaded hierarchical task comments
- Multipart file attachments with MinIO/S3 and pre-signed download URLs

- ⬜ **Phase 5: Real-time Notifications & AI Integration**
- Event-driven notifications pipeline via Spring Cloud Stream & RabbitMQ
- ✅ **Phase 5: Real-time Notifications & AI Integration**
- Event-driven notifications pipeline via domain event listeners
- Bidirectional real-time notification push using WebSocket & STOMP with JWT handshake
- Pluggable Generative AI engine (Google Gemini, Groq, local Ollama)
- Automated task description synthesis and executive comment summarization
Expand Down
4 changes: 3 additions & 1 deletion docs/adr/0001-modular-monolith.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ A microservices architecture introduces significant operational overhead early o
- Service discovery, distributed tracing, and configuration management overhead

## Decision
We will build TaskMaster as a **Modular Monolith** using Spring Boot and Java 25.
We will build TaskMaster as a **Modular Monolith** using **Spring Boot 4.x (Spring Framework 7.0)** and **Java 25 (LTS)**.

Key principles:
1. Modules correspond to bounded business contexts: `user`, `task`, `team`, `collaboration`, `notification`, and `ai`.
2. Cross-module communication is structured through well-defined service interfaces and domain events.
3. Code dependencies between modules are strictly enforced using ArchUnit tests to prevent tight coupling.
4. **Technology Baseline & BOM Management**: Built on Java 25 (Virtual Threads, Records) and Spring Boot 4.x using centralized Bill of Materials (`spring-boot-dependencies`) to guarantee zero starter version drift across all modular dependencies.

## Consequences
### Positive
- Rapid development velocity with zero cross-network service calls during core workflows.
- Single deployment artifact with simplified CI/CD and operational monitoring.
- Clear module boundaries allow decomposing specific modules into independent microservices in the future if scaling requirements demand it.
- Synchronized starter dependencies managed automatically via the root Spring Boot BOM.

### Negative
- All modules share the same runtime process and memory space in the initial phases.
Expand Down
47 changes: 28 additions & 19 deletions docs/adr/0005-ai-provider-strategy.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
# ADR 0005: Pluggable AI Provider Strategy via Spring AI Profiles
# ADR 0005: Universal OpenAI-Compatible AI Provider & Gateway Strategy

## Status
Accepted

## Context
Generative AI capabilities (task description synthesis, comment summarization, smart priority detection) should be flexible, cost-effective, and functional across diverse developer environments without locking into a single proprietary paid vendor.
Generative AI capabilities (task description synthesis, comment thread summarization, priority recommendation, semantic duplicate detection, and label tagging) must be flexible, vendor-agnostic, and cost-effective across diverse local, cloud, and enterprise environments without locking into proprietary vendor SDKs.

Developers and deployment environments require:
- Free tier cloud options (Google Gemini via AI Studio, Groq free tier)
- Completely offline local inference (Ollama running models such as Llama 3.2)
- Extensibility to paid cloud providers (OpenAI, Anthropic) if configured
In modern enterprise architectures (2026 standard):
- LLM providers (Groq Cloud, Google Gemini, Ollama, OpenAI, vLLM, DeepSeek, Together AI) natively implement the **OpenAI Chat Completions REST Specification** (`POST /v1/chat/completions`).
- Production systems route AI requests through **AI Gateways** (e.g., LiteLLM, Portkey, Cloudflare AI Gateway) for centralized rate limiting, semantic caching, token budgeting, and automatic multi-provider failover.
- Vendor-specific property files and hardcoded vendor branch logic create technical debt and operational fragility.

## Decision
We leverage **Spring AI**'s unified `ChatClient` abstraction and support multi-provider activation using Spring profiles:

- `ai-gemini` (Default / Free Cloud): Google GenAI starter connecting to Gemini 2.5 Flash via free Google AI Studio API keys.
- `ai-groq` (Alternative / Free Cloud): OpenAI-compatible starter pointing to Groq's high-speed inference endpoints.
- `ai-ollama` (Local / Offline): Local inference without external network calls.
- `ai-openai` (Enterprise / Paid): Standard OpenAI starter.

The application services inject `ChatClient` and remain completely agnostic of the active LLM backend.
We implement a **Universal OpenAI-Compatible AI Client** backed by a clean Hexagonal domain port (`AiProvider`):

1. **Universal Protocol Standard**: The outbound adapter issues standardized `POST /chat/completions` requests compatible with any OpenAI-compliant provider, local engine, or enterprise AI Gateway.
2. **Unified Configuration**: All AI settings are consolidated into a single configuration block in `application.yml`:
```yaml
app:
ai:
enabled: ${AI_ENABLED:true}
base-url: ${AI_BASE_URL:https://api.groq.com/openai/v1}
api-key: ${AI_API_KEY:}
model: ${AI_MODEL:llama-3.3-70b-versatile}
temperature: ${AI_TEMPERATURE:0.2}
fallback-enabled: ${AI_FALLBACK_ENABLED:true}
```
3. **Hexagonal Domain Purity**: Application services (`AiAssistantService`) interact solely with `AiProvider` domain ports with zero awareness of underlying AI vendors, models, or network topologies.
4. **Resilient Heuristic Fallback**: If the remote AI endpoint times out, encounters HTTP 429/500 errors, or if API keys are unconfigured (e.g., CI/CD or offline unit testing), the adapter automatically engages an internal rule-based heuristic synthesizer to guarantee 100% uptime.

## Consequences
### Positive
- Zero mandatory API costs for development and local testing.
- Provider switching accomplished via a single command line argument or environment variable (`--spring.profiles.active=dev,ai-gemini`).
- Consistent prompt template execution and structured JSON output mapping.
- **Zero Vendor Lock-In**: Switching providers from Groq to Gemini to self-hosted Ollama or an internal enterprise AI Gateway requires only updating `AI_BASE_URL` and `AI_MODEL` environment variables with zero code changes.
- **Zero Fragmented Property Files**: Eliminates vendor-specific YAML sprawl (`application-ai-*.yml`).
- **High Availability**: Heuristic fallback guarantees seamless graceful degradation during third-party AI outages or rate limiting.
- **Gateway-Ready**: Drop-in compatible with enterprise AI proxies and caching gateways.

### Negative
- Model behavior and latency characteristics vary across providers, requiring robust error handling and timeout fallbacks.
### Considerations
- Token length limits and temperature parameters should be tuned per target model family.
Loading
Loading