How nl-codes/lms---event-media-sharing-website works
LMS lets hosts create and tier events, invite participants, and collect media in shared galleries; participants then interact through likes, comments, chat, and notifications. The Next.js clients call an Express/MongoDB backend, while Socket.IO provides live updates and queued workers handle slower media and lifecycle work. Admins review reports and appeals. The graph follows documented capabilities and the sampled controller, server, sync, and client flows; unsampled subsystem wiring is shown only where the README establishes it.
Main entry points: server.js Server and sockets · mediaController.js Media controller · eventController.js Event controller · paymentController.js Payment controller
Components 28
Web application
- Event creation
frontend/src/app/home/events/create/CreateEventClient.tsx - Event API client
frontend/src/lib/eventApi.ts - Gallery and media UI
frontend/src/app/home/events/[id]/gallery/HostGalleryClient.tsx - Media detail UI
frontend/src/app/media/[id]/MediaDetailClient.tsx - Chat socket hook
frontend/src/hooks/useChatSocket.ts
Events and membership
- Event routes
backend/routes/eventRoute.js - Event controller
backend/controllers/eventController.js - Event service
backend/services/eventService.js - Membership service
backend/services/eventMembershipService.js - Payment controller
backend/controllers/paymentController.js - Stripe service
backend/services/stripeService.js
Media and interaction
- Media controller
backend/controllers/mediaController.js - Media service
backend/services/mediaService.js - Interaction service
backend/services/interactionService.js - Chat service
backend/services/chatService.js
Moderation and operations
- Appeal review UI
frontend/src/app/admin/appeals/AdminAppealsClient.tsx - Report review UI
frontend/src/app/admin/reports/AdminReportsClient.tsx - Report service
backend/services/reportService.js - Appeal service
backend/services/appealService.js
Persistence and integrations
- Server and sockets
backend/server.js - Startup sync
backend/services/syncManager.js - Event and membership data
backend/models/eventModel.js - Media and interaction data
backend/models/mediaModel.js - Video queue
backend/queues/videoQueue.js
Other components
- Host or participant
- MongoDB
- Cloudinary
- Stripe
Connections 29
- Host or participant → Event creation: creates events
- Event creation → Event API client: submits event
- Event API client → Event routes: HTTP requests
- Event routes → Event controller: dispatches
- Event controller → Event service: creates and reads
- Event service → Event and membership data: persists events
- Event and membership data → MongoDB: stores records
- Event controller → Payment controller: starts paid checkout
- Payment controller → Stripe service: creates sessions
- Stripe service → Stripe: checkout and webhooks
- Payment controller → Event service: finalizes paid event
- Host or participant → Gallery and media UI: uploads and reviews
- Gallery and media UI → Media controller: media requests
- Media controller → Media service: manages media
- Media controller → Server and sockets: emits gallery updates
- Media service → Media and interaction data: reads and writes
- Media and interaction data → MongoDB: stores media data
- Media service → Cloudinary: stores assets
- Media controller → Video queue: queues video work
- Media detail UI → Interaction service: likes and comments
- Interaction service → Media and interaction data: records interactions
- Chat socket hook → Server and sockets: connects by socket
- Server and sockets → Chat service: saves and reads chat
- Server and sockets → Membership service: marks chat read
- Server and sockets → MongoDB: connects on startup
- Server and sockets → Startup sync: runs startup sync
- Startup sync → Event and membership data: updates event state
- Report review UI → Report service: reviews reports
- Appeal review UI → Appeal service: reviews appeals