Msg is a secure messaging application that allows users to communicate with friends through text and image messages. The application features end-to-end encryption to ensure privacy and security in communications.
-
User authentication (Login/Registration)
-
Secure messaging with end-to-end encryption
-
Image sharing
-
Reply to messages
-
Voice and video calling
-
User-friendly interface
-
Responsive design for mobile and desktop
-
Play youtube videos in ur messages
-
Frontend: React, CSS
-
Backend: Node.js, Express
-
Database: MongoDB
-
Containerization: Docker
-
Encryption: Forge, elliptic curve cryptography
-
WebSocket: Socket.io for real-time messaging
To simplify the setup and management of your application, you can use Docker and Docker Compose. Docker Compose allows you to define and run multi-container Docker applications.
-
Ensure you have Docker and Docker Compose installed on your machine.
-
It is easier to manage containers if you have Docker Desktop installed, as it provides a user-friendly interface for managing your Docker containers and images.
The application is configured using a docker-compose.yml file, which defines the services, networks, and volumes needed to run the application.
Make sure to update the .env file in the root directory of your project (if you haven't already) and define the necessary environment variables for your application. The values u update should include:
# Change DB user and password
MONGODB_USER=dbUser
MONGODB_PASSWORD=dbPassword
# Change session secret
SESSION_SECRET="session secret"
# Fill in your own FCM values, or leave the default and use the application without FCM for android
FCM_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----FCM_PRIVATE_KEY"
FCM_PRIVATE_KEY_ID="FCM_PRIVATE_KEY_ID"
FCM_PROJECT_ID="FCM_PROJECT_ID"
FCM_CLIENT_EMAIL="FCM_CLIENT_EMAIL"
FCM_CLIENT_ID="FCM_CLIENT_ID"
FCM_CLIENT_X509_CERT_URL="FCM_CLIENT_X509_CERT_URL"
Make sure to replace the placeholder values with actual values relevant to your setup.
-
Clone the Repository (if you haven't already):
git clone https://github.com/gijs-d/Msg-A-Secure-Messaging-Application.git cd Msg-A-Secure-Messaging-Application -
Build and Run the Containers:
In the root directory of your project, run:
docker-compose up
This command will build the Docker images and start the containers defined in the
docker-compose.ymlfile. The application will be accessible athttps://localhost. -
Stopping the Application:
To stop the running containers, you can use:ctrl + cTo delete the containers, you can use:
docker-compose down
-
After changing the DB User or Password:
After changing the DB user or password, you might need to delete the database volumes to connect with the new credentials:
docker-compose down --volumes
- Node.js
- npm or yarn
- MongoDB
git clone https://github.com/gijs-d/Msg-A-Secure-Messaging-Application.git
cd Msg-A-Secure-Messaging-ApplicationFor the frontend:
cd frontend/react
npm install cd frontend/server
npm installFor the backend:
cd backend
npm installEdit the backend/.env file in and edit the necessary environment variables:
MONGODB_USER=dbUser
MONGODB_PASSWORD=dbPassword
MONGODB_DATABASE=msg
MONGODB_PORT=7017
MONGODB_HOST=localhost
# If you set the CONNECTION_STRING, the other mongodb values will be ignored.
MONGODB_CONNECTION_STRING=""
# Change session secret
SESSION_SECRET="session secret"
# Fill in your own FCM values, or leave the default and use the application without FCM for android
FCM_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----FCM_PRIVATE_KEY"
FCM_PRIVATE_KEY_ID="FCM_PRIVATE_KEY_ID"
FCM_PROJECT_ID="FCM_PROJECT_ID"
FCM_CLIENT_EMAIL="FCM_CLIENT_EMAIL"
FCM_CLIENT_ID="FCM_CLIENT_ID"
FCM_CLIENT_X509_CERT_URL="FCM_CLIENT_X509_CERT_URL"
Start the backend server:
cd backend
npm startBuild the react dist:
cd frontend/react
npm run buildStart the frontend server:
cd frontend/server
npm startThe application will be accessible at https://localhost.












