Chatbox

"Words that connect, chat that reflects."

The system will consist of the following components:

1 Client The client application will be responsible for sending and receiving messages to and from the server. It will also display the status of messages and the online/offline status of users.

2 Server The server application will be responsible for providing the services to the host and the host will eventually be hosting these services.

3 Host The host application will host the SOAP web services and manage communication between clients. It will also handle user authentication and maintain user status information.

Installation

step 1:
add connection string and create necessary tables
build service

step 2:
add service.dll as a reference in host

step 3:
start host

step 4:
add UsersService and MessagesService as service reference in client

step 5:
run client

Schemas

Users

  CREATE TABLE [dbo].[Users] (
    [username]  VARCHAR (50) NOT NULL,
    [password]  VARCHAR (50) NOT NULL,
    [last_seen] DATETIME     NOT NULL DEFAULT GETDATE(),
    [is_online] BIT          DEFAULT ((0)) NOT NULL,
    PRIMARY KEY CLUSTERED ([username] ASC)
    );

Messages

 CREATE TABLE[dbo].[Messages]
    (
    [sender] VARCHAR (50)  NOT NULL,
    [receiver]        VARCHAR(50)  NOT NULL,
    [message_content] VARCHAR(200) NOT NULL,
    [message_id]      INT IDENTITY(1, 1) NOT NULL,
    PRIMARY KEY CLUSTERED([message_id] ASC),
    FOREIGN KEY([receiver]) REFERENCES[dbo].[Users] ([username]),
    FOREIGN KEY([sender]) REFERENCES[dbo].[Users] ([username])
    );

Screenshots

Screenshot 2024-03-27 164813

Screenshot 2024-03-27 164855 Screenshot 2024-03-27 1665750 Screenshot 2024-03-27 165055 Screenshot 2024-03-27 165158 Screenshot 2024-03-27 165452

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT