How wajih1234/social-app works
This is a social networking application: users sign in, then browse and create posts, find profiles, manage account details, and exchange messages. The frontend routes authenticated experiences and sends requests through a shared API client; the Express backend mounts feature routes, authenticates requests, and persists domain data in MongoDB. Image upload and socket messaging are distinct capabilities. Backend route implementations and several frontend pages were not excerpted, so their internal behavior and some client-to-server wiring are not asserted beyond the indexed references.
Main entry points: App.jsx App routing · server.js HTTP and socket server · api.js API client · auth.js JWT middleware
Components 28
Web client
- App routing
frontend/src/App.jsx - API client
frontend/src/api.js - Image upload client
frontend/src/uploadImage.js
Identity
- Auth state
frontend/src/context/AuthContext.jsx - Sign in
frontend/src/pages/Login.jsx - Sign up
frontend/src/pages/Signup.jsx - Email verification
frontend/src/pages/VerifyEmail.jsx - Auth routes
back/routes/auth.js
Social features
- Home feed
frontend/src/pages/Home.jsx - Post creation
frontend/src/components/CreatePost.jsx - Post interactions
frontend/src/components/PostCard.jsx - Profiles
frontend/src/pages/Profile.jsx - People search
frontend/src/pages/Search.jsx - Account settings
frontend/src/pages/Settings.jsx - Messaging
frontend/src/pages/Messages.jsx - Socket client
frontend/src/context/SocketContext.jsx
Backend services
- HTTP and socket server
back/server.js - JWT middleware
back/middleware/auth.js - Post routes
back/routes/posts.js - User routes
back/routes/users.js - Message routes
back/routes/messages.js - Upload routes
back/routes/upload.js - Email sender
back/utils/sendEmail.js
Persistent data
- User records
back/models/User.js - Post records
back/models/Post.js - Message records
back/models/Message.js - Uploaded files
back/uploads
Other components
- Member
Connections 44
- Member → App routing: uses
frontend/src/App.jsx - App routing → Auth state: checks access
frontend/src/App.jsx - App routing → Sign in: routes to
frontend/src/App.jsx - App routing → Sign up: routes to
frontend/src/App.jsx - App routing → Email verification: routes to
frontend/src/App.jsx - App routing → Home feed: routes to
frontend/src/App.jsx - App routing → Profiles: routes to
frontend/src/App.jsx - App routing → People search: routes to
frontend/src/App.jsx - App routing → Account settings: routes to
frontend/src/App.jsx - App routing → Messaging: routes to
frontend/src/App.jsx - Sign in → Auth state: uses
frontend/src/pages/Login.jsx - Sign up → Auth state: uses
frontend/src/pages/Signup.jsx - Auth state → API client: requests identity
frontend/src/context/AuthContext.jsx - Home feed → API client: loads feed
frontend/src/pages/Home.jsx - Home feed → Post creation: renders
frontend/src/pages/Home.jsx - Home feed → Post interactions: renders
frontend/src/pages/Home.jsx - Post creation → API client: creates post
frontend/src/components/CreatePost.jsx - Post creation → Image upload client: uploads image
frontend/src/components/CreatePost.jsx - Post interactions → API client: updates post
frontend/src/components/PostCard.jsx - People search → API client: searches users
frontend/src/pages/Search.jsx - Profiles → API client: loads profile
frontend/src/pages/Profile.jsx - Account settings → API client: updates account
frontend/src/pages/Settings.jsx - Messaging → API client: loads messages
frontend/src/pages/Messages.jsx - Messaging → Socket client: uses socket
frontend/src/pages/Messages.jsx - API client → HTTP and socket server: HTTP requests
- Image upload client → HTTP and socket server: upload request
- HTTP and socket server → Auth routes: mounts
back/server.js - HTTP and socket server → Post routes: mounts
back/server.js - HTTP and socket server → User routes: mounts
back/server.js - HTTP and socket server → Message routes: mounts
back/server.js - HTTP and socket server → Upload routes: mounts
back/server.js - Auth routes → User records: queries
back/routes/auth.js - Auth routes → JWT middleware: protects profile
back/routes/auth.js - Post routes → Post records: queries
back/routes/posts.js - Post routes → User records: uses
back/routes/posts.js - Post routes → JWT middleware: authenticates
back/routes/posts.js - User routes → User records: queries
back/routes/users.js - User routes → JWT middleware: authenticates
back/routes/users.js - Message routes → Message records: queries
back/routes/messages.js - Message routes → User records: uses
back/routes/messages.js - Message routes → JWT middleware: authenticates
back/routes/messages.js - Upload routes → JWT middleware: authenticates
back/routes/upload.js - Socket client → HTTP and socket server: connects
- HTTP and socket server → Uploaded files: serves files
back/server.js