How avn2312/langbridge works
LangBridge is a language-exchange application whose main journey is onboarding a learner, finding practice partners, connecting socially, and practicing through chat and learning tools. The React app routes authenticated users to feature pages and uses a shared API layer; the Express modular monolith exposes REST endpoints and Socket.IO realtime services. MongoDB and Redis support persistence and runtime state, while Kafka workers are optional. The graph follows documented capabilities and visible wiring; some feature internals are represented by their exact module directories because their source was not sampled.
Main entry points: app.js Express application · router.jsx App routing · socket.js Socket.IO server · auth.service.js Authentication
Components 27
Web application
- App routing
frontend/src/app/router.jsx - Account and onboarding
frontend/src/features/auth - Partner discovery
frontend/src/features/users - Chat and calls
frontend/src/features/chat - Learning tools
frontend/src/features/learning - Moderation queue
frontend/src/features/moderation - API and auth hooks
frontend/src/lib/api.js - Socket client
frontend/src/hooks/useSocket.js
Exchange features
- Authentication
backend/src/modules/auth/auth.service.js - Profiles and users
backend/src/modules/users - Partner matching
backend/src/modules/matching - Friendships
backend/src/modules/friendships - Messaging
backend/src/modules/chat - Call signaling
backend/src/modules/calls - Learning services
backend/src/modules/learning/learning.service.js - Media uploads
backend/src/modules/media/media.service.js - Moderation actions
backend/src/modules/moderation - Presence
backend/src/modules/presence - Notifications
backend/src/modules/notifications
Backend application
- Express application
backend/src/app.js
Runtime services
- Socket.IO server
backend/src/infrastructure/realtime/socket.js - Event worker
backend/src/workers/eventWorker.js - MongoDB
backend/src/infrastructure/database/mongoose.js - Redis state
backend/src/infrastructure/redis/redis.clients.js
Other components
- Learner
- Kafka
- Cloud media storage
Connections 28
- Learner → App routing: uses
- App routing → Account and onboarding: routes to
frontend/src/app/router.jsx - App routing → Partner discovery: routes to
frontend/src/app/router.jsx - App routing → Chat and calls: routes to
frontend/src/app/router.jsx - App routing → Learning tools: routes to
frontend/src/app/router.jsx - App routing → Moderation queue: routes to
frontend/src/app/router.jsx - App routing → API and auth hooks: loads auth via
- Chat and calls → Socket client: uses realtime
- API and auth hooks → Express application: calls API
- Socket client → Socket.IO server: connects realtime
- Express application → Authentication: routes auth
backend/src/app.js - Express application → Profiles and users: routes users
backend/src/app.js - Express application → Messaging: routes messages
backend/src/app.js - Express application → Learning services: routes learning
backend/src/app.js - Express application → Moderation actions: routes moderation
backend/src/app.js - Express application → Partner matching: routes recommendations
- Express application → Friendships: routes friendship actions
- Messaging → Media uploads: routes attachment uploads
backend/src/modules/chat/chat.routes.js - Authentication → MongoDB: persists account
- Authentication → Kafka: publishes signup event
backend/src/modules/auth/auth.service.js - Event worker → Kafka: consumes events
- Messaging → Socket.IO server: supports realtime chat
- Call signaling → Socket.IO server: supports call signaling
- Presence → Redis state: stores presence
- Socket.IO server → Redis state: uses adapter
backend/server.js - Media uploads → Cloud media storage: stores uploads
- Learning services → MongoDB: stores learning activity
- Notifications → Event worker: handles background events