Skip to content

Commit

Permalink
Merge pull request #2 from tberey/development
Browse files Browse the repository at this point in the history
Release/3.0.4
  • Loading branch information
tberey authored Aug 4, 2021
2 parents 26c9c15 + b43ac4f commit 7c15d81
Show file tree
Hide file tree
Showing 13 changed files with 193 additions and 81 deletions.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A Chatroom Application with User Authentication & Accounts. Login & Register to
### Tech Stack
* [Typescript](https://www.typescriptlang.org/)
* [NodeJS](https://nodejs.org/en/)
* [Scoket.io](https://socket.io/)
* [Socket.io](https://socket.io/)
* [Express](https://expressjs.com/)
* [MySQL](https://www.mysql.com/)
* [EJS](https://ejs.co/)
Expand Down Expand Up @@ -127,9 +127,16 @@ For help or guidance in downloading and running the application, see the followi
<!-- USAGE EXAMPLES -->
## Usage

| Endpoint | Action/Desc. | Full URI <i>(hosted locally, for some port; e.g.: 3000)</i> |
|:---|:---|:---|
| <ul><li>"/"</li></ul> | Homepage:<br>The client-side landing page. | <ul><li>"http://localhost:3000/"</li></ul> |
| Endpoint | Action/Desc. | Full URI <i>(hosted locally, on some port; e.g.: 3000)</i> | Request Type |
|:---|:---|:---|:---|
| <ul><li>"/"</li></ul> | Home Page:<br>The client-side landing page. Login or Register. | <ul><li>"http://localhost:3000/"</li></ul> | GET |
| <ul><li>"/chat"</li></ul> | Chatroom:<br>If logged in, this is the url for the chatroom. if not logged in, redirects to home page. | <ul><li>"http://localhost:3000/chat"</li></ul> | GET |
| <ul><li>"/login"</li></ul> | Post request to login a user, with supplied credentials. If successful, redirects to chatroom. | <ul><li>"http://localhost:3000/login"</li></ul> | POST |
| <ul><li>"/register"</li></ul> | Post request to register a user, with supplied credentials. | <ul><li>"http://localhost:3000/register"</li></ul> | POST |
| <ul><li>"/changeUsername"</li></ul> | Post request to update a logged in user's username. | <ul><li>"http://localhost:3000/changeUsername"</li></ul> | POST |
| <ul><li>"/logout"</li></ul> | Post request to log out a user and redirect to home page. | <ul><li>"http://localhost:3000/logout"</li></ul> | POST |
| <ul><li>"/changePassword"</li></ul> | Put request to update a logged in user's password. | <ul><li>"http://localhost:3000/changePassword"</li></ul> | PUT |
| <ul><li>"/delete"</li></ul> | Delete request to delete and hence log out a user, and redirect to home page. Hard delete of account. | <ul><li>"http://localhost:3000/delete"</li></ul> | DELETE |

<br>

Expand All @@ -156,6 +163,9 @@ Below is the refined and confirmed roadmap, that has been planned for completion
| <i>Bug#1</i> | <i>Bug details...</i> | <i>0.0.1</i> | <i>example#1</i> |
| <i>Feature#4</i> | <i>Feature details...</i> | | <i>example#2</i> |
| Automatic Database Startup & Configuration | Auto-build database and table(s), and auto-populate data or test account (seeding). | | |
| Fix ID=0, On Register and Login | User's ID is shown as 0, but only when registering and logging in for first time, (re-log fixes, & no DB issues seen). | | |
| Remove SQL From Server.ts | Remove any sql/db related stuff from Server.ts class and add into Database.ts class. | | |
| Add Promises | Add Promises etc. | | |

<br><hr><br>

Expand All @@ -166,15 +176,15 @@ Below is the refined and confirmed roadmap, that has been planned for completion

|Version | Date | Changes |
|:---|:---|:---|
|Version 0.0.1 | [2020-03-08] | <ul><li>Initial Commit.</li><li>Add inital directory structure and files.</li><li>Build enables users to join, set a name (or not) and chat with each other.</li><li>Add dynamic 'who is typing' live indicator</li><li>Set un-changable unique ID to users, to trace all messages back to users.</li><li>Add logging/informative details about who connects/disconnects.</li><li>Add timestamp and further styling to messages.</li><li>Add Screenshots dir, and image screenshot files.</li><li>Add README.md</li></ul>|
|Version 0.0.1 | [2020-03-08] | <ul><li>Initial Commit.</li><li>Add initial directory structure and files.</li><li>Build enables users to join, set a name (or not) and chat with each other.</li><li>Add dynamic 'who is typing' live indicator</li><li>Set un-changeable unique ID to users, to trace all messages back to users.</li><li>Add logging/informative details about who connects/disconnects.</li><li>Add timestamp and further styling to messages.</li><li>Add Screenshots dir, and image screenshot files.</li><li>Add README.md</li></ul>|
|Version 0.0.2 | [2020-03-09] | <ul><li>Add new set to store chat/conversation history, which is sent to newly connected clients (enables full chat when client joins later/last).</li><li>Remove 'dist' and 'modules' folders. (After adding gitignore.)</li><li>Update README.md</li></ul>|
|Version 0.1.0 | [2020-03-10] | <ul><li>Add connected users list to client-side.</li><li>Add new IUser type for user's details, and create new set to hold these (and ammend IMessage type to accept this new type in place of exisiting props).</li><li>Update front-end DOM and appearance, to be more sensical.</li><li>Update public script to accept newly updated types/interfaces.</li><li>Update README.md</li></ul>|
|Version 0.1.0 | [2020-03-10] | <ul><li>Add connected users list to client-side.</li><li>Add new IUser type for user's details, and create new set to hold these (and amend IMessage type to accept this new type in place of existing props).</li><li>Update front-end DOM and appearance, to be more coherent.</li><li>Update public script to accept newly updated types/interfaces.</li><li>Update README.md</li></ul>|
|Version 0.2.0 | [2020-03-11] | <ul><li>Update connected users list on client-side, plus styling.</li><li>Update chatroom/message-list to have a scroll (overscroll) feature, for large amounts of messages.</li><li>Add feature to always scroll to bottom of chatroom/messages-list.</li><li>Update the user set list to remove contacts on disconnection, and send updated list out to remaining.</li><li>General code sharpening.</li><li>Update 'Screenshots' dir, with new images.</li><li>Update README.md</li></ul>|
|Version 0.2.1 | [2020-03-12] | <ul><li>Add feature to show all users who may be typing concurrently (so more than one at a time).</li><li>Add server messages feature, to alert connected users of updates to other connected users. I.e. connecting/disconnecting.</li><li>Fix bug, where when any user sends a message it would clear all user's input field of text.</li><li>General code sharpening/tidying, and minor client-side DOM adjustments.</li><li>Update README.md</li></ul>|
|Version 0.2.2 | [2020-03-13] | <ul><li>Friday the 13th Update, spoooky.</li><li>Add basic mySQL database infrastructure and connection.</li><li>Update Screenshots.</li><li>Update README.md</li></ul>|
|Version 0.2.3 | [2020-03-17] | <ul><li>Add further mySQL database infrastructure, including add a new entry row comprised of ID(Pri Key), Username and Password(Hashed).</li><li>Add new front-end form, for use to make a post request on register button, to add new user details to db.</li><li>Add new dependacy/module, for parseing request body.</li><li>Update README.md</li></ul>|
|Version 0.3.0 | [2020-03-20] | <ul><li>Big Update - Full SQL Database Integration and Support.</li><li>Add full user authentification to login client page, in order to access chatroom.</li><li>Complete the login client page registration feature, including adding new users as a row to sql db.</li><li>Full chatroom username and unique ID integration with sql db - all details are pulled from db.</li><li>Add my account section to chatroom client page, with an account overview.</li><li>Ability to change password in the my account section of chatroom, reflected into db also.</li><li>Update change username to also update account section and sql database entry.</li><li>Redirections: When not logged in, always redirect too the login client page. When logged in, always redirect to chatroom client page.</li><li>Update README.md</li></ul>|
|Version 0.3.1 | [2020-03-21] | <ul><li>Add full catch and redirection system, built up from previous implementation: Now catches any attempted unresolved urls, or unauthorised access (not logged-in), and redirects appropriately.</li><li>Upgrade Account section, when logged in: A further check on changing password, and also move change username to this section. Also add collapsing menu, for all options currently available.</li><li>Adjusted and refine code all around, as well as check and sure up comments. Adjusted so all data now come from server too.</li><li>Bug Fixes and Testing.</li><li>Update README.md</li></ul>|
|Version 0.2.3 | [2020-03-17] | <ul><li>Add further mySQL database infrastructure, including add a new entry row comprised of ID(Pri Key), Username and Password(Hashed).</li><li>Add new front-end form, for use to make a post request on register button, to add new user details to db.</li><li>Add new dependency/module, for parsing request body.</li><li>Update README.md</li></ul>|
|Version 0.3.0 | [2020-03-20] | <ul><li>Big Update - Full SQL Database Integration and Support.</li><li>Add full user authentication to login client page, in order to access chatroom.</li><li>Complete the login client page registration feature, including adding new users as a row to sql db.</li><li>Full chatroom username and unique ID integration with sql db - all details are pulled from db.</li><li>Add my account section to chatroom client page, with an account overview.</li><li>Ability to change password in the my account section of chatroom, reflected into db also.</li><li>Update change username to also update account section and sql database entry.</li><li>Redirection: When not logged in, always redirect too the login client page. When logged in, always redirect to chatroom client page.</li><li>Update README.md</li></ul>|
|Version 0.3.1 | [2020-03-21] | <ul><li>Add full catch and redirection system, built up from previous implementation: Now catches any attempted unresolved urls, or unauthorized access (not logged-in), and redirects appropriately.</li><li>Upgrade Account section, when logged in: A further check on changing password, and also move change username to this section. Also add collapsing menu, for all options currently available.</li><li>Adjusted and refine code all around, as well as check and sure up comments. Adjusted so all data now come from server too.</li><li>Bug Fixes and Testing.</li><li>Update README.md</li></ul>|
|Version 0.4.0 | [2020-03-23] | <ul><li>Picture Day Update!</li><li>Redesign front-end/client-side: Updated better visuals and slightly altered chatroom layout.</li><li>Adjust css/html for better scaling - Now much more viewable across a range devices/screen sizes.</li><li>Add logout button/feature to account section in ChatRoom which disconnects from chat, logs user out (clears session data), to be returned to login page.</li><li>Adjusted sockets to use session data, rather than exported variables, for login status and username/id.</li><li>Minor routing changes.</li><li>Bug Fixes and Tidy-up.</li><li>Moves sensitive/destructive data to external json file (git-ignored), that is imported and read from.</li><li>Updated all screenshots in Screenshot Directory.</li><li>Update README.md</li></ul>|
|Version 0.4.1 | [2020-03-24] | <ul><li>Minor request type changes (post -> delete/put, etc).</li><li>CSS/HTML minor adjustments and fine-tune.</li><li>Add Delete account check and action (with route and request), to delete account from db, log user out and redirect to login/register page.</li><li>Update README.md</li></ul>|
|Version 0.4.2 | [2020-03-25] | <ul><li>Add check/feature to prevent multiple instances (or log-in) of the same account.</li><li>Add further error handling/catching for requests/socket-connections, preventing db changes or chatroom/account access, if user is no longer logged in.</li><li>Update README.md</li></ul>|
Expand All @@ -183,10 +193,13 @@ Below is the refined and confirmed roadmap, that has been planned for completion
|Version 2.0.0 | [2020-05-18] | <ul><li>TypeScript & Class Update - Whilst already a TypeScript project, it has been further updated to make more and better use of TypeScript features, as well as reconstructed into a more object oriented and class based design. Also sharpened up the code, fixing any mistakes, inconsistencies, or general improvements.</li><li>Update README.md</li></ul>|
|Version 2.1.0 | [2020-05-19] | <ul><li>EJS Update - Whilst already a EJS Templated project, it has been further updated to make more and better use of ejs engine features, as well as compacting the code, fixing any mistakes/bugs, inconsistencies, and general improvements.</li><li>Update README.md</li></ul>|
|Version 2.1.1 | [2020-05-20] | <ul><li>EJS Update - Further and general improvements.</li><li>Client-side Scripting restructure & tidy-up.</li><li>Update README.md</li></ul>|
|Version 2.2.0 | [2020-05-20] | <ul><li>Final EJS Update & Cleanup</li><li>Further client-side Scripting restructure & tidy-up.</li><li>CSS stylesheets consolidation (2=>1).</li><li>Comments rewriting and tidy.</li><li>Final checkovers and tidy up + Testing.</li><li>Update README.md</li></ul>|
|Version 2.2.0 | [2020-05-20] | <ul><li>Final EJS Update & Cleanup</li><li>Further client-side Scripting restructure & tidy-up.</li><li>CSS stylesheets consolidation (2=>1).</li><li>Comments rewriting and tidy.</li><li>Final check over and tidy up + Testing.</li><li>Update README.md</li></ul>|
|Version 2.2.0 | [2020-05-20] | <ul><li>Renaming and descriptions editing.</li><li>Update README.md</li></ul>|
|Version 3.0.0 | [2021-07-29] | <ul><li>Project-wide update, reformat and clean-up, including modules.</li><li>Update README.md</li></ul>|
|Version 3.0.1 | [2021-07-31] | <ul><li>Updates to session management implementation, plus a new interface.</li><li>Updates to database interactivity and infrastructure, creating new seperate class.</li><li>Update README.md</li></ul>|
|Version 3.0.1 | [2021-07-31] | <ul><li>Updates to session management implementation, plus a new interface.</li><li>Updates to database interactivity and infrastructure, creating new separate class.</li><li>Update README.md</li></ul>|
|Version 3.0.2 | [2021-08-01] | <ul><li>Differentiate SocketServer further, into it's own service class, rather than a parent class of the server infrastructure.</li><li>Minor updates to Database class and implementation.</li><li>Update README.md</li></ul>|
|Version 3.0.3 | [2021-08-03] | <ul><li>Fix spelling.</li><li>Update README.md</li></ul>|
|Version 3.0.4 | [2021-08-04] | <ul><li>Update README.md</li></ul>|

<br><hr><br>

Expand Down Expand Up @@ -214,7 +227,7 @@ Contributions are welcomed and, of course, **greatly appreciated**.
* [Issues & Requests][issues-url]
* [My Other Projects](https://github.com/tberey?tab=repositories)
* [Personal Website](https://tberey.github.io/)
* [Linked In](https://uk.linkedin.com/in/thomas-berey-2a1860129)
* [Linked In](https://uk.linkedin.com/in/thomas-berey)

<br>

Expand Down Expand Up @@ -244,5 +257,5 @@ Contributions are welcomed and, of course, **greatly appreciated**.
[issues-shield]: https://img.shields.io/github/issues/tberey/ts-node-chatroom.svg
[issues-url]: https://github.com/tberey/ts-node-chatroom/issues
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin&colorB=555
[linkedin-url]: https://uk.linkedin.com/in/thomas-berey-2a1860129
[linkedin-url]: https://uk.linkedin.com/in/thomas-berey
[project-url]: https://github.com/tberey/ts-node-chatroom/projects
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/express-session": "^1.17.0",
"@types/mocha": "^8.2.2",
"@types/mysql": "^2.15.18",
"@types/node": "^14.0.1",
"@types/node": "^14.17.7",
"@types/socket.io": "^2.1.6",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
Expand Down
Loading

0 comments on commit 7c15d81

Please sign in to comment.