This project is a minimalistic social connection platform designed to enable users to discover and build meaningful connections. The platform prioritizes:
- User security
- Clean interaction flows
- Efficient management of connection requests
Built with Node.js, Express, and MongoDB, it ensures secure and scalable backend operations.
- User Sign-Up/Login: Secure registration and login using email and password.
- Password Hashing: User passwords are hashed using bcrypt for enhanced security.
- JWT Authentication: JSON Web Tokens are used for session management and stored in cookies.
- Route Protection: Ensures only authenticated users can access protected routes.
- Request Validation: Validates incoming data to ensure compliance with security and logical constraints.
- Profile Editing: Users can update their personal information (e.g., name, bio, and profile picture).
- Password Updates: Allows users to securely change their password, with hashing applied before saving.
- Send Connection Requests: Users can send connection requests with defined statuses:
interestedignored
- Request Review: Recipients can accept or reject connection requests.
- Validation: Prevents duplicate or self-directed requests.
- Dynamic User Feed: Displays profiles of users not connected to the current user, excluding:
- Users who have ignored or rejected requests
- Already connected users or those with pending requests
- Pagination: Handles large datasets efficiently by paginating the feed.
- MongoDB:
- User schema stores personal details and connection statuses.
- Connection request schema tracks:
- Sender (
fromUserId) - Recipient (
toUserId) - Statuses (e.g., pending, accepted).
- Sender (
- Logical constraints ensure no duplicate or self-referencing requests.