How welikewatermelon/therapist_community_be works
MelonMe is a Spring Boot backend for a therapist-verified community. The main workflow is a user authenticating, creating or discovering posts, and interacting through comments, reactions, follows, and messages; post creation also triggers asynchronous embedding, AI-comment, and analytics work. Separate workflows cover therapist verification, knowledge ingestion, and real-time notifications. The README documents these connections and capabilities; sampled source confirms selected service-level interactions, but many subsystem internals were not excerpted, so those links rely on README evidence.
Main entry points: PostService.java Posts and feeds · service AI comment review · auth Authentication · KnowledgeIngestionService.java Knowledge ingestion
Components 23
Identity and access
- Authentication
src/main/java/com/therapyCommunity_Vol1/backend/auth - Profiles and roles
src/main/java/com/therapyCommunity_Vol1/backend/user/service/UserService.java - Therapist verification
src/main/java/com/therapyCommunity_Vol1/backend/therapist
Community interactions
- Comments
src/main/java/com/therapyCommunity_Vol1/backend/comment/service/CommentService.java - Post and comment reactions
src/main/java/com/therapyCommunity_Vol1/backend/reaction/service - Follows and scraps
src/main/java/com/therapyCommunity_Vol1/backend/follow/service/FollowService.java - Direct messages
src/main/java/com/therapyCommunity_Vol1/backend/message/service/MessageService.java - Job listings
src/main/java/com/therapyCommunity_Vol1/backend/jobpost/service
Content and discovery
- Posts and feeds
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostService.java - Visibility policy
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostVisibilityAccessPolicy.java - Post search
src/main/java/com/therapyCommunity_Vol1/backend/post/service/search - Media uploads
src/main/java/com/therapyCommunity_Vol1/backend/post/service/upload - File storage
src/main/java/com/therapyCommunity_Vol1/backend/file/service/FileStorageService.java
AI and knowledge
- Knowledge ingestion
src/main/java/com/therapyCommunity_Vol1/backend/knowledge/service/KnowledgeIngestionService.java - AI comment review
src/main/java/com/therapyCommunity_Vol1/backend/autocomment/service - Post embeddings
src/main/java/com/therapyCommunity_Vol1/backend/post/service/search/EmbeddingService.java - Gemini services
Notifications and analytics
- SSE notifications
src/main/java/com/therapyCommunity_Vol1/backend/notification - Event analytics
src/main/java/com/therapyCommunity_Vol1/backend/analytics/event/UserEventPublisher.java - PostgreSQL and pgvector
- Redis cache
- S3 or local files
Other components
- Members
Connections 32
- Members → Authentication: sign in
- Authentication → Profiles and roles: identifies
src/main/java/com/therapyCommunity_Vol1/backend/user/service/UserService.java - Authentication → Redis cache: checks login limits
- Members → Posts and feeds: publish or browse
- Posts and feeds → Visibility policy: checks access
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostService.java - Visibility policy → Follows and scraps: checks follower access
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostVisibilityAccessPolicy.java - Posts and feeds → PostgreSQL and pgvector: persists posts
- Members → Post search: search posts
- Post search → PostgreSQL and pgvector: queries GIN or vectors
- Posts and feeds → Post embeddings: emits embedding work
- Post embeddings → PostgreSQL and pgvector: writes vectors
- Members → Media uploads: upload media
- Media uploads → File storage: stores media
src/main/java/com/therapyCommunity_Vol1/backend/post/service/upload/UploadConfirmService.java - File storage → S3 or local files: stores objects
- Members → Comments: comment
- Members → Post and comment reactions: react
- Members → Follows and scraps: follow or save
- Members → Direct messages: send messages
- Members → Job listings: browse listings
- Members → Therapist verification: apply for verification
- Therapist verification → Profiles and roles: updates role
src/main/java/com/therapyCommunity_Vol1/backend/therapist/service/TherapistVerificationService.java - Posts and feeds → AI comment review: requests AI comment
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostService.java - AI comment review → Knowledge ingestion: retrieves context
- Knowledge ingestion → Gemini services: embeds chunks
- Knowledge ingestion → PostgreSQL and pgvector: stores chunks
- AI comment review → Gemini services: generates draft
- AI comment review → Comments: registers approved reply
src/main/java/com/therapyCommunity_Vol1/backend/autocomment/service/AiCommentReviewService.java - Members → SSE notifications: subscribe to SSE
- Comments → SSE notifications: publishes alert event
src/main/java/com/therapyCommunity_Vol1/backend/comment/service/CommentService.java - Follows and scraps → SSE notifications: publishes follow event
src/main/java/com/therapyCommunity_Vol1/backend/follow/service/FollowService.java - Posts and feeds → Event analytics: publishes activity
src/main/java/com/therapyCommunity_Vol1/backend/post/service/PostService.java - Event analytics → PostgreSQL and pgvector: stores and aggregates events