How abhaywangwad/social-connect works
Social Connect is a MERN social-media application. Users register or log in, then access protected feeds, profiles, search, saved posts, notifications, and messaging; they can also create and interact with content and manage social connections. Admins have a separate moderation workflow. The client entry point and selected server routes/controllers are visible in the excerpts; other capabilities are represented from the repository tree and README, so uncertain service-to-model wiring is omitted.
Main entry points: App.jsx App routing · app.js Express API · userRoutes.js User routes · authService.js Auth and sessions
Components 32
Web client
- App routing
client/src/App.jsx - Login and registration
client/src/components/auth/LoginForm.jsx - Feed
client/src/components/feed/FeedView.jsx - Profiles
client/src/components/profile/ProfileView.jsx - Search
client/src/components/search/SearchView.jsx - Post creation and cards
client/src/components/posts/CreatePostModal.jsx - Saved posts
client/src/components/saved/SavedPostsView.jsx - Notifications
client/src/components/notifications/NotificationsView.jsx - Admin dashboard
client/src/components/admin/AdminDashboard.jsx
Identity and access
- Authentication state
client/src/context/AuthContext.jsx - Auth client
client/src/services/authService.js - Auth controller
server/src/controllers/authController.js - Auth and sessions
server/src/services/authService.js - Session management
server/src/services/sessionService.js
Social product
- Feed and posts
server/src/services/feedService.js - Social interactions
server/src/services/followService.js - Comment controller
server/src/controllers/commentController.js - Admin moderation
server/src/controllers/adminModerationController.js
Realtime messaging
- Messages
client/src/components/messages/MessagesView.jsx - Socket client
client/src/socket/socketManager.js - Socket handlers
server/src/socket/socketHandlers.js - Typing state
server/src/socket/typingManager.js
API and persistence
- Express API
server/src/app.js - User routes
server/src/routes/userRoutes.js - Admin routes
server/src/routes/adminRoutes.js - User controller
server/src/controllers/userController.js - Search controller
server/src/controllers/searchController.js - Post controller
server/src/controllers/postController.js - Comment service
server/src/services/commentService.js - Domain models
server/src/models
Other components
- User
- MongoDB
Connections 26
- User → App routing: uses
- App routing → Login and registration: renders
- App routing → Feed: routes to
- App routing → Profiles: routes to
- App routing → Search: routes to
- App routing → Saved posts: routes to
- App routing → Notifications: routes to
- App routing → Admin dashboard: routes to
- App routing → Messages: routes to
- App routing → Authentication state: provides
- Auth client → Express API: requests
- Express API → Auth controller: dispatches
- Auth controller → Auth and sessions: calls
- Auth and sessions → Session management: calls
- Express API → User routes: mounts
- User routes → User controller: dispatches
- User routes → Search controller: dispatches
- User routes → Post controller: dispatches
- Express API → Admin routes: mounts
- Admin routes → Admin moderation: dispatches
- Comment controller → Comment service: calls
- Socket client → Socket handlers: emits events
- Socket handlers → Typing state: tracks typing
- Auth and sessions → Domain models: uses
- Session management → Domain models: uses
- Domain models → MongoDB: persists