How omarbadawy/audiocomms-podcast-api works
This is a Node/Express API for audio rooms and podcast publishing, with JWT-authenticated HTTP endpoints and Socket.IO room communication. The main workflow is a client request through app.js and feature routes to controllers, which validate or transform domain data and read or write MongoDB-backed models; clients can also join the real-time room workflow. The README’s user/follow, podcast, event, category, room, and chat capabilities are represented. Some controller and route source was not sampled, so uncertain internal links are omitted.
Main entry points: app.js HTTP app · server.js HTTP and sockets · userRoutes.js User routes · podcastRoutes.js Podcast routes
Components 23
API entry
- HTTP app
app.js - HTTP and sockets
server.js - User routes
routes/userRoutes.js - Podcast routes
routes/podcastRoutes.js - Category routes
routes/categoryRoutes.js - Event routes
routes/eventRoute.js - Room routes
routes/roomRoutes.js - Chat routes
routes/roomChatRoute.js
Identity and users
- JWT authentication
controllers/authController.js - User and follow management
controllers/userController.js - Follow actions
controllers/followController.js
Podcast and events
- Podcast management
controllers/podcastController.js - Event management
controllers/eventsController.js - Category management
controllers/categoryController.js - Podcast likes
controllers/likesController.js
Audio rooms
- Room queries
controllers/roomController.js - Room socket handling
controllers/socketIOController.js - Chat queries
controllers/roomChatController.js
Persistence and integrations
- MongoDB
- Cloudinary
- Email provider
- RTC token utility
utils/generateRTC.js
Other components
- API client
Connections 36
- API client → HTTP app: sends HTTP
- HTTP app → User routes: mounts routes
- HTTP app → Podcast routes: mounts routes
- HTTP app → Category routes: mounts routes
- HTTP app → Event routes: mounts routes
- HTTP app → Room routes: mounts routes
- HTTP app → Chat routes: mounts routes
- User routes → JWT authentication: dispatches auth
- User routes → User and follow management: dispatches users
- User routes → Follow actions: dispatches follows
- Podcast routes → JWT authentication: guards access
- Podcast routes → Podcast management: dispatches podcasts
- Podcast routes → Podcast likes: mounts likes
- Category routes → Category management: dispatches categories
- Event routes → Event management: dispatches events
- Room routes → Room queries: dispatches rooms
- Room routes → Chat routes: mounts chat
- Chat routes → Chat queries: dispatches chat
- HTTP and sockets → HTTP app: serves HTTP
- API client → HTTP and sockets: opens socket
- HTTP and sockets → Room socket handling: dispatches connections
- HTTP and sockets → MongoDB: connects database
- HTTP and sockets → Cloudinary: configures media
- JWT authentication → MongoDB: reads and writes users
- JWT authentication → Email provider: sends reset email
- User and follow management → MongoDB: reads and writes users
- Follow actions → MongoDB: reads and writes follows
- Podcast management → MongoDB: reads and writes content
- Podcast management → Cloudinary: manages media
- Podcast management → RTC token utility: generates signature
- Category management → MongoDB: reads and writes categories
- Event management → MongoDB: reads and writes events
- Podcast likes → MongoDB: reads and writes likes
- Room queries → MongoDB: reads rooms
- Chat queries → MongoDB: reads and writes messages
- Room socket handling → MongoDB: reads and writes room data