DevTinder Project Development (LLD HLD)
Development Approach
The DevTinder app is being built by following a structured development cycle similar to how projects are managed in a company. The process includes gathering requirements, high-level design (HLD), and low-level design (LLD).
1. Requirements Gathering
-
Understanding the Project:
- Project Name: DevTinder
- Concept: A platform similar to Tinder, but specifically designed for developers to connect and collaborate.
-
Features:
- User Account Management:
- Create an account.
- Signup and login functionality.
- Update user profile.
- Developer Exploration:
- Feed page to explore developer profiles.
- Ability to send connection requests.
- Connections Management:
- View matches (mutual connections).
- List of sent and received requests.
- Update profile information.
- Additional Features:
- More features to be added according to development needs.
- User Account Management:
2. High-Level Design (HLD)
-
Tech Planning:
- Architecture: The app will follow a microservices architecture with separate services for the frontend and backend.
- Tech Stack:
- Frontend: React.js
- Backend: Node.js
- Database: MongoDB
-
Development Team Roles:
- Once the features and tech planning are finalized, the software development team comes into the picture, including SDE1, SDE2, and backend teams.
-
Note:
- Proper planning is essential, as it makes the development process smoother and coding easier.
3. Low-Level Design (LLD)
- Database Design:
- Collections:
- User:
- Fields:
firstname,lastname,email,password,age,gender, etc.
- Fields:
- ConnectionRequest Collection:
- Fields:
fromUserId(sender's user ID),toUserId(receiver's user ID),status(e.g., pending, accepted, rejected, ignored).
- Fields:
- User:
- Collections:
API Design
What are REST APIs?
- REST (Representational State Transfer) is an architectural style for designing networked applications. It relies on a stateless, client-server communication protocol, most commonly HTTP.
- REST APIs are web services that allow for interaction between a client and a server using standard HTTP methods. They enable the creation, retrieval, updating, and deletion of resources through well-defined endpoints.
How REST APIs Work
-
Client Request:
- The client sends a request to the server via HTTP methods such as GET, POST, PUT, PATCH, or DELETE.
- Each HTTP method corresponds to a specific operation:
- GET: Retrieve data from the server.
- POST: Create new data on the server.
- PUT: Update existing data (entirely replace the resource).
- PATCH: Partially update existing data.
- DELETE: Remove data from the server.
-
Server Response:
- The server processes the request and returns a response.
- The response usually includes a status code (e.g., 200 for success, 404 for not found) and, if applicable, data in JSON or XML format.
-
Stateless Communication:
- Each request from the client to the server must contain all the information needed to understand and process the request.
- The server does not store any state about the client session between requests.
Difference Between PUT and PATCH
- PUT: Updates the entire resource with new data. If any fields are missing, they may be reset or removed.
- PATCH: Only updates specific fields of the resource, leaving the other fields unchanged.
REST APIs Needed
-
User Management APIs:
POST /signup: Register a new userPOST /login: Authenticate and login the userPOST /profile: Create a user profileGET /profile: Retrieve user profile detailsPATCH /profile: Update user profileDELETE /profile: Delete user profile
-
Connection Management APIs:
POST /sendRequest: Send a connection request (ignore/interested)POST /reviewRequest: Accept or reject a connection requestGET /request: Retrieve the list of requests (sent and received)GET /connections: Get a list of established connections
Next Steps
- Finalize the database schema and API design.
- Implement the backend services for the listed APIs.
- Develop the frontend to interact with these backend services.
- Test the application for feature completion and bug fixes.