How y9ndra/sotrix works
Sotrix is a full-stack social network: users authenticate, publish and discover posts, interact through follows/comments/likes, and chat with live presence and notifications. The web client presents these workflows through routed pages and API/socket services; the Express gateway dispatches domain routes to backend services and persistence, while BullMQ workers handle asynchronous media, notifications, and maintenance. README documents the broader feed, search, caching, and media capabilities; unsampled implementation details are represented at their existing directory paths. Edges are limited to calls or wiring shown in excerpts or explicit README statements.
Main entry points: models MongoDB · App.tsx Routed application · pages Social pages · app.ts Express app
Components 25
Web client
- Routed application
web/src/App.tsx - Social pages
web/src/pages - API and socket clients
web/src/services - Query state cache
web/src/lib/queryCache.ts
API gateway
- Express app
server/src/app.ts - Auth routes
server/src/routes/auth.routes.ts - Post routes
server/src/routes/post.routes.ts - Post controller
server/src/controllers/post.controller.ts - Auth controller
server/src/controllers/auth.controller.ts
Social domains
- Auth and sessions
server/src/services/auth.service.ts - Posts and feeds
server/src/services/post.service.ts - Explore and search
server/src/services/explore.service.ts - Comments likes follows
server/src/services/comment.service.ts - Profiles and users
server/src/services/user.service.ts
Realtime and jobs
- Conversations and messages
server/src/services/message.service.ts - Conversation controller
server/src/controllers/conversation.controller.ts - Socket events and presence
server/src/socket - Notifications
server/src/services/notification.service.ts - Background workers
server/src/workers - Media processing
server/src/services/media-processing.service.ts
Data and integrations
- MongoDB
server/src/models - Redis queues and cache
server/src/config/redis.ts - Cloudinary assets
Other components
- Member
- Socket.IO transport
Connections 27
- Member → Routed application: uses
- Routed application → Social pages: routes to
web/src/App.tsx - Social pages → API and socket clients: requests data
web/src/pages/Search.tsx - Social pages → Query state cache: updates cache
web/src/lib/queryCache.ts - API and socket clients → Express app: calls HTTP API
- Routed application → Socket.IO transport: connects
web/src/App.tsx - Socket.IO transport → Socket events and presence: exchanges events
- Express app → Auth routes: mounts
server/src/app.ts - Express app → Post routes: mounts
server/src/app.ts - Auth routes → Auth controller: dispatches
server/src/routes/auth.routes.ts - Post routes → Post controller: dispatches
server/src/routes/post.routes.ts - Auth controller → Auth and sessions: calls
server/src/controllers/auth.controller.ts - Post controller → Posts and feeds: calls
server/src/controllers/post.controller.ts - Post controller → Cloudinary assets: uploads assets
server/src/controllers/post.controller.ts - Auth and sessions → MongoDB: persists sessions
server/src/services/auth.service.ts - Posts and feeds → MongoDB: reads and writes
- Explore and search → MongoDB: searches content
- Comments likes follows → MongoDB: stores interactions
- Profiles and users → MongoDB: stores profiles
- Conversation controller → Conversations and messages: calls
server/src/controllers/conversation.controller.ts - Conversations and messages → MongoDB: persists history
- Conversation controller → Socket events and presence: broadcasts events
server/src/controllers/conversation.controller.ts - Socket events and presence → Socket.IO transport: emits live events
- Notifications → Redis queues and cache: queues work
- Background workers → Redis queues and cache: consumes jobs
- Background workers → Media processing: runs processing
- Media processing → Cloudinary assets: stores assets