Skip to content
/ MyMess Public

Social Network Web Application with Kotlin Spring Boot, Node.Js with socket.io, Angular and PostgreSQL.

License

Notifications You must be signed in to change notification settings

enaki/MyMess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyMess

MyMess is a social network application where users can make friends and communicate with each other.

A short demo can be found here.

The application is built on 3 servers:

Architecture

Project Diagram

Backend Service

The back-end server is built on multi-layer-architecture:

  • Presentation Layer (responsible for the controllers/user interface)
  • Bussiness Layer (responsible for the logic and functionality)
  • Persistence/Database Layer (responsible for CRUD operations)

Password are encrypted using SHA-256.

Backend Service

Notification Service

The service is using 4 collections (can be scaled and integrated with a MongoDb database):

  • actives - contains uid - last time (unix) seen online (0 if the user is online)
  • allUsers - contains socket id, friendId, and username
  • socketsUidPair - contains socket id - uid
  • unseenFrom - contains uid - list of unseen messages from user

Note: actives is initialized with mock Data.

Events handled:

  • establish-connection - the user connects and gets back a list with unseen messages
  • notify-is-typing - the user's friend (if it is online) is notified that current user is typing
  • notify-stop-typing - the user's friend (if it is online) is notified that current user has stopped typing
  • friend-ids - the user request the list of friends ids and their last time seen online
  • send-chat-message - the user send a message to a friend and the message is redirected to backend service. If the user is online the message is sent to him to be updated live
  • send-message-notifications - the user send a message notification to a friend
  • message-notification-clear - the user notifies socket server to clear its message notification
  • logout - update socket server's collections

Events emited:

  • message-notifications - on establish connection user receives notifications from received messages
  • receive-is-typing - on notify-is-typing friend receives typing notification from his friend
  • receive-stop-typing - on notify-stop-typing friend receives stop typing notification from his friend
  • take-friends-status - on friend-ids user receives his friends' status
  • receive-chat-message - on send-chat-message friend receives the incoming message
  • notify-inbox - on send-chat-message friend receives the incoming message notification for the inbox
  • message-notifications - on send-message-notifications friend receives the incoming message notification for a specific user in the inbox

FrontEnd Service

Login Page

Login Page

Register Page

Register Page

Home Page

Home Page

Update Profile Page

Update Profile Page

Friends Page

Friends Page

Discover Page

Discover Page

Inbox Page

Inbox Page

Inbox Page

How to run the project

  1. Configure PostgreSQL

    • Make a database
    • Change the backend configuration with the created database's configuration
    • Change python script for creating the database's tables with the created database's configuration
  2. Run python script for creating the tables and for inserting the initial data (users passwords can be found in users.json)

  3. Run the backend service

  4. Run the notification service

    • npm install
    • node App.js
  5. Run the frontend service

    • npm install
    • ng serve

Note: Reconnecting to socket on refreshing the frontend page from the browser when logged in was not implemented.

About

Social Network Web Application with Kotlin Spring Boot, Node.Js with socket.io, Angular and PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages