This repository contains a full-stack social platform:
- Angular frontend application
- Node.js/Express backend API
- Socket.IO real-time layer
- MongoDB persistence
Angular Front end/ # Frontend app (Angular)
Back-Social/ # Backend app (Express + TypeScript + MongoDB + Socket.IO)
uploads/ # Uploaded avatars/posts served by backend
- Frontend docs:
Angular Front end/README.md - Backend docs:
Back-Social/README.md
cd Back-Social
npm install
npm startOpen a second terminal:
cd "Angular Front end"
npm install
npm starthttp://localhost:4200
PORT=3000
API_VERSION=v1
MONGODB_URI=mongodb://localhost:27017/socialapp
JWT_SECRET=replace_with_strong_secret
CLIENT_URL=http://localhost:4200Angular Front end/src/environments/environment.development.ts currently points to:
apiBaseUrl: 'http://localhost:5000/api/v1'If backend runs on 3000 (default), update frontend to:
apiBaseUrl: 'http://localhost:3000/api/v1'- Backend CORS and socket origin are controlled by
CLIENT_URL. - Frontend auth stores token in local storage and uses it for HTTP + socket auth.
- Notification system includes real-time toasts, unread tracking, and audible notification cues.
cd "Angular Front end"
npm run build
npm testcd Back-Social
npm startBackend currently has no dedicated test script.
- JWT authentication (register/login/profile)
- Post feed with likes/comments and media uploads
- Friend requests and friend list management
- Direct/group chats and messaging
- Presence/status updates and real-time notifications
- Start MongoDB first.
- Start backend and verify health endpoint.
- Start frontend.
- Register two users for chat/friend testing.
- Validate socket events and notification flow.
When backend runs with default settings:
GET http://localhost:3000/api/v1/health- Check API base URL in frontend environment.
- Check backend running port and API version.
- Check token exists after login.
- Check backend
CLIENT_URLallows frontend origin.
- Browser may block sound until user interaction.
- Click once in app and trigger a new notification.