How yrpyash22/socila-media-plateform works
Piqosocial is a MERN social network: users register or sign in, then browse feeds, discover and follow people, manage profiles, publish and interact with posts, and chat. The React client calls the Express API; backend controllers handle domain operations against MongoDB models, while Socket.IO dispatches live chat events and Cloudinary stores uploaded media. The README also describes localized feed filtering. Sampled source confirms server mounting, registration persistence, uploads, and socket dispatch; other subsystem links reflect documented structure, with unsampled route wiring left general.
Main entry points: api API routes · User.js User records · server.js Express server · auth Auth and validation
Components 21
React client
- App routing
FrontEnd/src/component/App.jsx - Social views
FrontEnd/src/component - API client
FrontEnd/src/api/api-post.js - Session helpers
FrontEnd/src/auth/auth-help.js
API and domain
- Express server
server.js - API routes
Routes/api - Auth and validation
Controllers/auth - Post operations
Controllers/Posts - People and profiles
Controllers/users - Chat operations
Controllers/chat - Upload handler
Controllers/upload/uploadController.js - Request protection
middleware/auth.js
Persistence and media
- User records
Schema/User.js - Post records
Schema/Post.js - Chat records
Schema/Chat.js - Message records
Schema/message.js
Live messaging
- Socket.IO events
server.js - Chat state
FrontEnd/src/Context/ChatProvider.jsx
Other components
- Member
- MongoDB
- Cloudinary
Connections 25
- Member → App routing: uses
- App routing → Social views: routes to
- Social views → API client: requests
- API client → Express server: HTTP calls
- Express server → API routes: mounts
- API routes → Auth and validation: dispatches
- API routes → Post operations: dispatches
- API routes → People and profiles: dispatches
- API routes → Chat operations: dispatches
- API routes → Upload handler: dispatches
- Auth and validation → User records: creates user
- Auth and validation → User records: checks user
- Request protection → User records: loads user
- Post operations → Post records: post data
- People and profiles → User records: profile data
- Chat operations → Chat records: chat data
- Chat operations → Message records: message data
- User records → MongoDB: persists
- Post records → MongoDB: persists
- Chat records → MongoDB: persists
- Message records → MongoDB: persists
- Upload handler → Cloudinary: uploads media
- Express server → Socket.IO events: dispatches events
- Chat state → Socket.IO events: uses events
- Session helpers → Social views: checks session