How shadab9335/connect-sphere works
Purpose and topology
ConnectSphere is a hobby/community platform split into a React UI and three independently deployable Java/Spring services: user/interest identity, social feed, and events. Each backend has its own Maven build, properties, and Dockerfile. No API gateway or orchestration layer is present in the tree.
Entry points
• React bootstraps at ConnectSphereUI/src/index.js, renders application composition from ConnectSphereUI/src/App.js, and selects authenticated versus unauthenticated navigation through ConnectSphereUI/src/navigation/AppNavigator.jsx and ConnectSphereUI/src/navigation/AuthNavigator.jsx.
• Spring Boot service processes start at:
- ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/UserAndInterestApplication.java
- ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/FeedServiceApplication.java
- ConnectSphereBackend/EventsService/src/main/java/com/hobbyconnect/eventsservice/EventsServiceApplication.java
Identity, profile, and lookup boundary
UserAndInterest is the authoritative identity/profile domain: registration/login, profiles, interests, and work-location configuration. Its controller → service → repository flow centers on controller/AuthController.java, service/UserService.java, and repository/UserRepository.java; adjacent bounded domains use InterestService and WorkLocationConfigService. Security is configured in config/SecurityConfig.java, while persistent entities include model/User.java and model/Interest.java.
Feed domain
FeedService owns social content and engagement: posts, replies, interactions, and notifications. HTTP requests enter controller/FeedController.java, business operations run through service/FeedService.java, and data is persisted through repositories such as repository/FeedPostRepository.java and repository/PostInteractionRepository.java. The domain model is represented by model/FeedPost.java, model/Reply.java, and model/Notification.java. config/MongoIndexConfig.java indicates database indexing is an intentional concern.
Events domain
EventsService owns event creation and retrieval, with model/Event.java as its aggregate and repository/EventRepository.java as persistence access. Its main request path is controller/EventsController.java → service/EventsService.java → repository. It has its own JWT utility and exception boundary, including util/JwtUtil.java and exception/GlobalExceptionHandler.java.
Cross-service and external boundaries
Feed and Events each contain service/UserServiceClient.java, indicating synchronous dependency on the user service for user-related validation or enrichment rather than shared user persistence. Both also contain local util/JwtUtil.java, so token handling is duplicated at service boundaries. Feed media is abstracted behind service/MediaStorageService.java, an external-storage integration point. Runtime connection/security settings reside per service in their respective src/main/resources/application.properties.
Client flow
The UI’s screen-level features map directly to backend domains: feed at screens/app/FeedScreen.jsx, events at screens/app/EventsScreen.jsx and MyEventsScreen.jsx, and profile/auth onboarding under screens/auth/. Service adapters—services/authService.js, services/feedService.js, services/eventsService.js, services/profileService.js, and services/lookupService.js—are the frontend’s API boundary. src/config.js is the likely central endpoint/runtime configuration boundary.
Infrastructure and operational shape
The backend is Java/Spring Boot packaged with Maven (pom.xml per service) and containerized independently (Dockerfile per service). The UI is a Node/React project defined by ConnectSphereUI/package.json. Database technology cannot be confirmed globally from the tree, but FeedService’s Mongo-specific index configuration materially indicates MongoDB usage there. Data seeders in each backend’s config package support bootstrap/development initialization.
Components 19
React UI
- React bootstrap
ConnectSphereUI/src/index.js - App composition
ConnectSphereUI/src/App.js - Auth and app navigation · Selects authenticated versus unauthenticated flows.
ConnectSphereUI/src/navigation/AppNavigator.jsx - API service adapters · Auth, profile, lookup, feed, and events clients.
- Feed, events, and profile screens
ConnectSphereUI/src/screens/app/FeedScreen.jsx
User & Interest Service
- User & Interest application · Authoritative identity, profile, interest, and work-location domain.
ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/UserAndInterestApplication.java - Auth API
ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/controller/AuthController.java - User and interest services · Includes user, interest, and work-location operations.
ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/service/UserService.java - User repository
ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/repository/UserRepository.java - Security configuration
ConnectSphereBackend/UserAndInterest/src/main/java/com/example/UserAndInterest/config/SecurityConfig.java
Feed Service
- Feed application · Owns posts, replies, interactions, and notifications.
ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/FeedServiceApplication.java - Feed API and service
ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/controller/FeedController.java - Feed repositories · Mongo indexes are explicitly configured.
ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/repository/FeedPostRepository.java - User service client
ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/service/UserServiceClient.java - Media storage adapter
ConnectSphereBackend/FeedService/src/main/java/com/hobbyconnect/feedservice/service/MediaStorageService.java
Events Service
- Events application · Owns event creation and retrieval.
ConnectSphereBackend/EventsService/src/main/java/com/hobbyconnect/eventsservice/EventsServiceApplication.java - Events API and service
ConnectSphereBackend/EventsService/src/main/java/com/hobbyconnect/eventsservice/controller/EventsController.java - Event repository
ConnectSphereBackend/EventsService/src/main/java/com/hobbyconnect/eventsservice/repository/EventRepository.java - User service client
ConnectSphereBackend/EventsService/src/main/java/com/hobbyconnect/eventsservice/service/UserServiceClient.java
Connections 20
- React bootstrap → App composition: renders
- App composition → Auth and app navigation: composes
- Auth and app navigation → Feed, events, and profile screens: routes to
- Feed, events, and profile screens → API service adapters: uses
- API service adapters → Auth API: auth, profile, lookup
- API service adapters → Feed API and service: feed API
- API service adapters → Events API and service: events API
- User & Interest application → Auth API: hosts
- Auth API → User and interest services: delegates
- User and interest services → User repository: persists users
- Security configuration → Auth API: secures
- Feed application → Feed API and service: hosts
- Feed API and service → Feed repositories: persists content
- Feed API and service → User service client: validates/enriches users
- User service client → Auth API: synchronous call
- Feed API and service → Media storage adapter: stores media
- Events application → Events API and service: hosts
- Events API and service → Event repository: persists events
- Events API and service → User service client: validates/enriches users
- User service client → Auth API: synchronous call