A distributed microservices-based release management platform with event-driven architecture, real-time collaboration, and comprehensive monitoring.
The system consists of the following services:
- API Gateway (Port 8085) - Single entry point with API versioning (
/api/v1/) - Auth Service (Port 8082) - Authentication and user management
- Release Service (Port 8081) - Release and task workflow management
- Notification Service (Port 8083) - Event-driven notifications
- Discussion Service (Port 8086) - Threaded discussions and comments for releases/tasks
- Chatbot Service (Port 8084) - AI-powered assistant using Ollama (llama3.2:1b)
- Ollama (Port 11434) - Local LLM inference server
- MongoDB (Port 27017) - Primary database
- Kafka (Port 9094) - Event streaming backbone
- Kafka UI (Port 8080) - Kafka management interface
- Prometheus (Port 9090) - Metrics collection
- Grafana (Port 3000) - Monitoring dashboards
- Mongo Express (Port 8888) - Web interface to interact with the Mongo DB
Before running the application, ensure you have the following installed:
- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- Git (for cloning the repository)
Check your installations:
docker --version
docker compose versiongit clone <repository-url>
cd OpsFlowCreate a .env file in the root directory for environment-specific configurations:
cp .env.example .envUpdate any necessary environment variables. This file is used by the docker compose.
Build all Docker images:
docker compose buildThis will:
- Build Docker images for all microservices
- Download required base images (Java 21, MongoDB, Kafka, etc.)
- Compile and package Spring Boot applications
Note: First build may take 5-10 minutes depending on your internet connection.
Start all services in detached mode:
docker compose up -dTo view logs while starting:
docker compose upCheck the status of all services:
docker compose psAll services should show as "healthy" or "running". Services with health checks may take 30-60 seconds to become healthy.
View logs for a specific service:
docker compose logs -f <service-name>
# Examples:
docker compose logs -f api-gateway
docker compose logs -f auth-service
docker compose logs -f release-serviceOnce all services are running, you can access them at:
- API Gateway: http://localhost:8085
- All API requests should go through this endpoint
- Example:
http://localhost:8085/api/v1/auth/login
Check service health:
# API Gateway
curl http://localhost:8085/actuator/health
# Auth Service
curl http://localhost:8082/actuator/health
# Release Service
curl http://localhost:8081/actuator/health
# Notification Service
curl http://localhost:8083/actuator/health
# Discussion Service
curl http://localhost:8086/actuator/health
# Chatbot Service
curl http://localhost:8084/actuator/healthdocker compose downdocker compose down -vWarning: This will delete all database data!
docker compose build <service-name>
docker compose up -d <service-name>
# Example:
docker compose build api-gateway
docker compose up -d api-gateway# Follow logs for all services
docker compose logs -f
# Follow logs for specific service
docker compose logs -f api-gateway
# View last 100 lines
docker compose logs --tail=100 release-servicedocker compose restart <service-name>
# Example:
docker compose restart auth-serviceAll API requests should use the API Gateway:
http://localhost:8085/api/v1
# Register a new user
POST http://localhost:8085/api/v1/auth/register
# Login
POST http://localhost:8085/api/v1/auth/login# Get all releases
GET http://localhost:8085/api/v1/releases
# Create a release
POST http://localhost:8085/api/v1/releases
# Get release by ID
GET http://localhost:8085/api/v1/releases/{id}# Get all discussions (without comments, includes commentCount)
GET http://localhost:8085/api/v1/discussions
# Create a new discussion
POST http://localhost:8085/api/v1/discussions
Body: {
"title": "Discussion title",
"content": "Discussion content",
"releaseId": "release-123",
"authorId": "user-456",
"authorName": "John Doe"
}
# Get discussion by ID
GET http://localhost:8085/api/v1/discussions/{discussionId}
# Get discussions by release
GET http://localhost:8085/api/v1/discussions/release/{releaseId}
# Get discussions by task
GET http://localhost:8085/api/v1/discussions/task/{taskId}
# Resolve a discussion
POST http://localhost:8085/api/v1/discussions/{discussionId}/resolve
Header: X-User-Id: user-123
# Add a top-level comment to a discussion
POST http://localhost:8085/api/v1/discussions/{discussionId}/comments
Body: {
"content": "Comment text",
"authorId": "user-789",
"authorName": "Jane Doe"
}
# Reply to an existing comment (nested/threaded - like Reddit)
POST http://localhost:8085/api/v1/discussions/{discussionId}/comments
Body: {
"content": "Reply text",
"authorId": "user-789",
"authorName": "Jane Doe",
"parentId": "parent-comment-id"
}
# Alternative: Reply to a comment using path parameter
POST http://localhost:8085/api/v1/discussions/{discussionId}/comments/{commentId}/replies
Body: {
"content": "Reply text",
"authorId": "user-789",
"authorName": "Jane Doe"
}
# Get all comments (threaded view with nested replies)
GET http://localhost:8085/api/v1/discussions/{discussionId}/comments
# Get comments in flat list (no nesting)
GET http://localhost:8085/api/v1/discussions/{discussionId}/comments/flat
# Get replies for a specific comment
GET http://localhost:8085/api/v1/discussions/{discussionId}/comments/{commentId}/replies
# Get a specific comment
GET http://localhost:8085/api/v1/discussions/{discussionId}/comments/{commentId}
# Delete a comment (soft-delete if has replies, hard-delete otherwise)
DELETE http://localhost:8085/api/v1/discussions/{discussionId}/comments/{commentId}
Header: X-User-Id: user-123Nested Comments Behavior:
- Comments support unlimited nesting depth (up to 10 levels)
- Deleting a comment with replies performs a soft-delete (content becomes
[deleted]) - Deleting a comment without replies removes it completely
- Each comment includes a
depthfield (0 for top-level) - Each comment includes a
repliesarray containing nested responses
# Create a new chat session
POST http://localhost:8085/api/v1/chat/session
Body: {
"userId": "user-123",
"releaseId": "release-456" # Optional
}
# Send a message to the chatbot
POST http://localhost:8085/api/v1/chat/{sessionId}/message
Body: {
"message": "What are the pending tasks?"
}
# Get chat history
GET http://localhost:8085/api/v1/chat/{sessionId}/history
# Get all user chat sessions
GET http://localhost:8085/api/v1/chat/sessions?userId={userId}# Connect to MongoDB container
docker exec -it mongodb mongosh
# Inside mongosh:
show dbs
use flow_ops_db
show collections

