graph LR
User((User)) -->|Login/Register| ChatSystem[Chat System]
User -->|Send Message| ChatSystem
User -->|Manage Profile| ChatSystem
User -->|Friend Request| ChatSystem
ChatSystem -->|Messages| User
ChatSystem -->|Notifications| User
ChatSystem -->|Friend Status| User
graph TD
User((User)) -->|Login/Register| Auth[Authentication]
User -->|Send Message| MessageHandler[Message Handler]
User -->|Update Profile| ProfileManager[Profile Manager]
User -->|Friend Request| FriendManager[Friend Manager]
Auth -->|Validate| Database[(Database)]
MessageHandler -->|Store| Database
ProfileManager -->|Update| Database
FriendManager -->|Manage| Database
Database -->|User Data| Auth
Database -->|Messages| MessageHandler
Database -->|Profile Data| ProfileManager
Database -->|Friend Data| FriendManager
MessageHandler -->|Deliver| User
ProfileManager -->|Confirm| User
FriendManager -->|Notify| User
graph TD
subgraph Authentication
Login[Login] --> Validate[Validate Credentials]
Register[Register] --> CreateUser[Create User]
CreateUser --> StoreUser[Store User Data]
end
subgraph Message Handling
Compose[Compose Message] --> ValidateMessage[Validate Message]
ValidateMessage --> StoreMessage[Store Message]
StoreMessage --> NotifyRecipient[Notify Recipient]
NotifyRecipient --> UpdateStatus[Update Message Status]
end
subgraph Profile Management
EditProfile[Edit Profile] --> ValidateProfile[Validate Profile]
ValidateProfile --> UpdateProfile[Update Profile]
UpdateProfile --> StoreProfile[Store Profile]
end
subgraph Friend Management
SendRequest[Send Friend Request] --> ValidateRequest[Validate Request]
ValidateRequest --> StoreRequest[Store Request]
StoreRequest --> NotifyUser[Notify User]
AcceptRequest[Accept Request] --> UpdateFriendship[Update Friendship]
UpdateFriendship --> StoreFriendship[Store Friendship]
end
subgraph Database
UserDB[(User DB)]
MessageDB[(Message DB)]
ProfileDB[(Profile DB)]
FriendDB[(Friend DB)]
end
StoreUser --> UserDB
StoreMessage --> MessageDB
StoreProfile --> ProfileDB
StoreRequest --> FriendDB
StoreFriendship --> FriendDB
UserDB --> Validate
MessageDB --> NotifyRecipient
ProfileDB --> ValidateProfile
FriendDB --> ValidateRequest
-
Login
- Input: Username/Email and Password
- Process: Validate credentials against database
- Output: Authentication token or error message
-
Register
- Input: User details (username, email, password)
- Process: Create new user account
- Output: Success message or validation errors
-
Compose Message
- Input: Message content and recipient
- Process: Validate and format message
- Output: Prepared message for sending
-
Message Delivery
- Input: Prepared message
- Process: Store and deliver to recipient
- Output: Delivery confirmation
- Edit Profile
- Input: Updated profile information
- Process: Validate and update profile
- Output: Updated profile confirmation
-
Friend Request
- Input: Friend request details
- Process: Validate and store request
- Output: Request notification
-
Accept Request
- Input: Request acceptance
- Process: Update friendship status
- Output: Friendship confirmation
-
User Database
- Stores user credentials and basic information
- Maintains user authentication data
-
Message Database
- Stores all messages and their status
- Maintains message history
-
Profile Database
- Stores user profile information
- Maintains profile updates
-
Friend Database
- Stores friendship relationships
- Maintains friend request status
- User
- Initiates all processes
- Receives notifications and updates
- Manages their profile and connections