KorryKatti / Mirage

a chat app which doesn't store messages on the server
MIT License
9 stars 18 forks source link

[ Enhancement ] Refactoring the code, Touching up the file structure. #45

Closed nub-rin closed 3 weeks ago

nub-rin commented 1 month ago

As discussed in issue #42 I have made an example enhancement to show you. Kindly refer to the screenshot below.

Changes

Proposed file structure, not yet worked on refactoring image

Does it still work after file changes? Yes.

image

Basic idea is just to split up code into even smaller files and their designated folder, for example the server in the backend and all the other things related to it etc to make the code more readable and easier to work on.

Let me know if this sounds cool to you so that I can start working on it further.

KorryKatti commented 1 month ago

@nub-rin , copy paste the client.py , userinfo.json and client folder which has encryption data to two other locations , change the username for each of it in the json file and check if messages are going through.

looks good overall

nub-rin commented 1 month ago

@KorryKatti Works Flawlessly! Also found something in server.py. There is no use of user_file and get_username() in server.py.

Here is a screenshot of it working.

Multiple Users

image

Codebase

image

Just have to change the file name of userjson in specific client file but I guess with future implementation of #42 it will not be necessary.

EDIT:

Messages.txt

(Whoever created the room in this case user, it'll update their specific message.txt) image

KorryKatti commented 1 month ago

@KorryKatti Works Flawlessly! Also found something in server.py. There is no use of user_file and get_username() in server.py.

Here is a screenshot of it working.

Multiple Users

image

Codebase

image

Just have to change the file name of userjson in specific client file but I guess with future implementation of #42 it will not be necessary.

EDIT:

Messages.txt

(Whoever created the room in this case user, it'll update their specific message.txt) image

cool , please do make a PR when the refactoring is done and i will review and merge it

KorryKatti commented 4 weeks ago

@nub-rin any updates ?

nub-rin commented 4 weeks ago

@nub-rin any updates ?

Hi sorry, I had to travel. Will finish it up till tomorrow and send a PR for you to check.

KorryKatti commented 4 weeks ago

@nub-rin any updates ?

Hi sorry, I had to travel. Will finish it up till tomorrow and send a PR for you to check.

np , happy journey

nub-rin commented 3 weeks ago

Hi @KorryKatti Sorry it took long, but will be providing with a PR in a few hours from now possibly. Just quickly running a few tests and finalizing last min things. After this I will start trying to work on #42 and see how to approach it efficiently.

KorryKatti commented 3 weeks ago

Hi @KorryKatti Sorry it took long, but will be providing with a PR in a few hours from now possibly. Just quickly running a few tests and finalizing last min things. After this I will start trying to work on #42 and see how to approach it efficiently.

fine , i will be waiting for the PR . I might take some time to check it as a cyclone is coming over at where i am right now but i will try my best

nub-rin commented 3 weeks ago

Hi not a problem at all, I think the concerns for a cyclone are more important! Take care!!

KorryKatti commented 3 weeks ago

solved with #46 , will reopen when more refactoring needed , currently focusing on #42