How shanmukha5269/collabhub works
Purpose and Runtime
CollabHub is a Java/Spring Boot backend for collaborative workspaces combining member management, project planning (projects, sprints, issues), channels/messages, and administrator controls. The application entry point is backend/collabHub/src/main/java/com/collabHub/CollabHubApplication.java; Maven build/runtime dependencies are defined in backend/collabHub/pom.xml.
API and Layering Boundary
Each domain follows controller → service interface/implementation → JPA repository → entity, with DTOs separating HTTP/WebSocket contracts from persistence models. Representative boundaries are backend/collabHub/src/main/java/com/collabHub/workspace/controller/WorkspaceController.java, backend/collabHub/src/main/java/com/collabHub/workspace/service/WorkspaceServiceImpl.java, and backend/collabHub/src/main/java/com/collabHub/workspace/repository/WorkspaceRepository.java.
Identity, Authentication, and Authorization
Users have roles and status, while authentication exposes login-related APIs and issues/validates JWTs. Requests traverse the JWT filter and Spring security configuration before protected controllers; services can obtain the authenticated identity through shared security utilities. Core paths: backend/collabHub/src/main/java/com/collabHub/auth/security/JwtAuthenticationFilter.java, backend/collabHub/src/main/java/com/collabHub/auth/security/JwtTokenProvider.java, backend/collabHub/src/main/java/com/collabHub/config/SecurityConfig.java.
Workspace as the Tenancy/Membership Root
A workspace is the primary collaboration boundary, with a separate membership association and workspace-scoped roles. Workspace APIs cover creation, member changes, and ownership transfer; suspended-workspace handling is represented as a domain exception and administrator operation. Core paths: backend/collabHub/src/main/java/com/collabHub/workspace/entity/Workspace.java, backend/collabHub/src/main/java/com/collabHub/workspace/entity/WorkspaceMember.java, backend/collabHub/src/main/java/com/collabHub/workspace/service/WorkspaceMemberServiceImpl.java.
Planning Domain
Projects, sprints, and issues form the work-management flow. Projects provide the planning container; sprints have lifecycle status and expose board-oriented responses; issues carry type, priority, and status and support status-specific updates. These services enforce domain lookup/access before repository persistence. Core paths: backend/collabHub/src/main/java/com/collabHub/project/service/ProjectServiceImpl.java, backend/collabHub/src/main/java/com/collabHub/sprint/service/SprintServiceImpl.java, backend/collabHub/src/main/java/com/collabHub/issue/service/IssueServiceImpl.java.
Collaboration and Realtime Messaging
Channels and channel membership model conversation access. Messages are persisted via the message service/repository and exposed by a message controller. STOMP WebSocket configuration and a connection listener provide the realtime transport boundary, alongside the HTTP APIs. Core paths: backend/collabHub/src/main/java/com/collabHub/config/StompWebSocketConfig.java, backend/collabHub/src/main/java/com/collabHub/listener/WebSocketConnectListener.java, backend/collabHub/src/main/java/com/collabHub/message/service/MessageServiceImpl.java.
Administration, Persistence, and Failure Semantics
Administrative APIs aggregate platform/workspace statistics and suspend workspaces. Persistence is Spring Data-style repository-backed, with concrete database and runtime settings expected in backend/collabHub/src/main/resources/application.properties and environment inputs documented by backend/collabHub/.env.example. Domain failures are normalized at the HTTP boundary through backend/collabHub/src/main/java/com/collabHub/common/exception/GlobalExceptionHandler.java; specific exceptions encode access denial, bans, missing resources, and suspended workspaces.
Main entry points: WorkspaceServiceImpl.java Workspace services · ProjectServiceImpl.java Planning services · SecurityConfig.java Security configuration · StompWebSocketConfig.java STOMP transport
Components 21
Runtime
- HTTP clients
- Spring Boot application
backend/collabHub/src/main/java/com/collabHub/CollabHubApplication.java - Maven build
backend/collabHub/pom.xml
Identity & access
- Security configuration · Secures protected controller routes.
backend/collabHub/src/main/java/com/collabHub/config/SecurityConfig.java - JWT authentication filter
backend/collabHub/src/main/java/com/collabHub/auth/security/JwtAuthenticationFilter.java - JWT token provider · Issues and validates JWTs.
backend/collabHub/src/main/java/com/collabHub/auth/security/JwtTokenProvider.java
Workspace tenancy
- Workspace APIs · Creates workspaces and manages members and ownership.
backend/collabHub/src/main/java/com/collabHub/workspace/controller/WorkspaceController.java - Workspace services · Enforces tenancy and membership rules.
backend/collabHub/src/main/java/com/collabHub/workspace/service/WorkspaceServiceImpl.java - Membership service · Manages workspace-scoped roles.
backend/collabHub/src/main/java/com/collabHub/workspace/service/WorkspaceMemberServiceImpl.java - Workspace repository
backend/collabHub/src/main/java/com/collabHub/workspace/repository/WorkspaceRepository.java - Workspace & membership · Tenancy root and member association.
backend/collabHub/src/main/java/com/collabHub/workspace/entity/Workspace.java
Planning
- Planning services · Projects, sprints, and issues enforce scoped access before persistence.
backend/collabHub/src/main/java/com/collabHub/project/service/ProjectServiceImpl.java - Sprint service · Manages sprint lifecycle and board responses.
backend/collabHub/src/main/java/com/collabHub/sprint/service/SprintServiceImpl.java - Issue service · Manages typed, prioritized issue status updates.
backend/collabHub/src/main/java/com/collabHub/issue/service/IssueServiceImpl.java
Collaboration
- STOMP clients
- STOMP transport
backend/collabHub/src/main/java/com/collabHub/config/StompWebSocketConfig.java - Connection listener
backend/collabHub/src/main/java/com/collabHub/listener/WebSocketConnectListener.java - Message service · Persists channel messages and exposes messaging operations.
backend/collabHub/src/main/java/com/collabHub/message/service/MessageServiceImpl.java
Platform
- Database · Spring Data repositories persist domain entities.
backend/collabHub/src/main/resources/application.properties - Administration APIs · Aggregates statistics and suspends workspaces.
- Global exception handler · Normalizes domain failures into HTTP responses.
backend/collabHub/src/main/java/com/collabHub/common/exception/GlobalExceptionHandler.java
Connections 24
- Maven build → Spring Boot application: builds
- HTTP clients → Security configuration: requests
- Security configuration → JWT authentication filter: installs
- JWT authentication filter → JWT token provider: validates token
- Security configuration → Workspace APIs: authorizes
- Workspace APIs → Workspace services: delegates
- Workspace services → Membership service: manages members
- Workspace services → Workspace repository: persists
- Membership service → Workspace & membership: updates roles
- Workspace repository → Workspace & membership: maps
- Workspace repository → Database: stores
- Workspace services → Planning services: provides workspace access
- Planning services → Sprint service: coordinates
- Planning services → Issue service: coordinates
- Planning services → Database: persists planning data
- STOMP clients → STOMP transport: connects
- STOMP transport → Connection listener: emits connect events
- STOMP transport → Message service: routes messages
- Message service → Database: persists messages
- Administration APIs → Workspace services: suspends workspaces
- Administration APIs → Database: reads statistics
- Workspace APIs → Global exception handler: domain failures
- Spring Boot application → Security configuration: boots
- Spring Boot application → STOMP transport: boots