Skip to content

Cypher is a cutting-edge encrypted chat application designed to prioritize user privacy and security. With end-to-end encryption, your messages remain confidential and secure, ensuring peace of mind in your communications.

License

Notifications You must be signed in to change notification settings

leonfullxr/Cypher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Welcome to Cypher πŸ”

Cypher Logo

Table of Contents

  1. Description
  2. Features
  3. Technology Stack
  4. Registration Process
  5. Architecture Description
  6. Frameworks & APIs
  7. Project Folder Structure
  8. Installation
  9. Demo
  10. MFA Demo
  11. Responsive Design Demo
  12. License
  13. Contact

Description

Cypher is a cutting-edge encrypted chat application designed to prioritize user privacy and security. With end-to-end encryption, your messages remain confidential and secure, ensuring peace of mind in your communications. We don't store any IP addresses, metadata or user-linked data; it is perfectly anonymous.


Features

  • End-to-End Encryption: Messages are encrypted from sender to receiver, safeguarding your data from prying eyes. Every message stored on the database is encrypted and cannot be read even if the database is breached.
  • Real-Time Messaging: Fast and seamless chat experience.
  • Cross-Platform Support: Accessible on multiple devices for convenient communication.
  • NO Metadata Storage: Prioritizes privacy by storing zero user metadata.

Technology Stack

Client-Side

  • React.js: Frontend framework for building the user interface.
  • Redux: State management for handling user authentication and messaging.
  • TailwindCSS: Utility-first CSS framework for styling the application.
  • Axios: HTTP client for API requests.
  • Socket.io-client: For real-time messaging between users.

Server Side

  • Node.js: Backend runtime for handling requests.
  • Express.js: Lightweight framework for handling API routes and middleware.
  • MongoDB: NoSQL database for storing user data and messages.
  • Mongoose: ODM (Object Data Modeling) for interacting with MongoDB.
  • Socket.io: WebSockets for real-time messaging.
  • Bcrypt.js: Password hashing for secure authentication.
  • Jsonwebtoken (JWT): Token-based authentication for user sessions.
  • Cloudinary: Media storage for user profile pictures and message attachments.

Registration Process

Upon user registration, the following occurs:

  1. The client generates a 2048-bit RSA key pair (public and private key).
  2. The client encrypts the private key with the user's master password.
  3. The client sends the registration data (username, public key, and encrypted private key) to the server.
  4. The server stores the information in MongoDB.
  5. The server acknowledges the successful registration and redirects the client to the login page.

Architecture Description

  1. Client Side

    • User Interface (UI): Allows users to send/receive messages and manage contacts.
    • Local Key Management: Generates and stores private keys encrypted with the master password.
    • Encryption Module: Encrypts outgoing messages using the recipient's public key and decrypts incoming messages with the user's private key.
  2. Server Side

    • Authentication Module:
      • Handles user login with the master password.
      • Validates identity and grants access to stored data.
    • Database Connection: Stores users' data securely in MongoDB.
    • Message Queue: Stores encrypted messages so that they are retrieved by the recipient.
    • Key Exchange Service: Sends user's public key for ensuring message encryption.
  3. Database

    • Stores public keys.
    • Stores encrypted messages (encrypted with recipient’s public key).
    • Stores encrypted private keys (encrypted with master passwords).

For more details, refer to the project architecture documentation.


Frameworks & APIs

Database: MongoDB

  • We use MongoDB Atlas as our cloud-hosted database.
  • The backend interacts with MongoDB through the Mongoose library for structured data modeling.

Media Storage: Cloudinary

  • To store images and videos, we use Cloudinary.
  • It provides secure cloud-based storage and delivers media via HTTPS links.

Real-Time Communication: Socket.io

  • We use Socket.io to facilitate real-time communication between the client and server.
  • This enables instant message delivery and live updates.

Project Folder Structure

Encrypted-Chat-App/
β”‚
β”œβ”€β”€ client/                     # Frontend (Client-side) code
β”‚   β”œβ”€β”€ public/                 # Static files (e.g., index.html, images, icons, manifest)
β”‚   β”œβ”€β”€ src/                    # React source code
β”‚   β”‚   β”œβ”€β”€ assets/             # UI assets (logos, backgrounds)
β”‚   β”‚   β”œβ”€β”€ components/         # UI Components (e.g., ChatBox, MessageList, SearchUser)
β”‚   β”‚   β”œβ”€β”€ layout/             # Layout-related components
β”‚   β”‚   β”œβ”€β”€ pages/              # Application pages (Home, Register, ForgotPassword)
β”‚   β”‚   β”œβ”€β”€ redux/              # Redux store and user management
β”‚   β”‚   β”œβ”€β”€ routes/             # Route definitions
β”‚   β”‚   β”œβ”€β”€ services/           # API calls and WebSocket handlers
β”‚   β”‚   β”œβ”€β”€ utils/              # Helper functions (e.g., encryption handling, file uploads)
β”‚   β”‚   β”œβ”€β”€ App.js              # Main App entry point
β”‚   β”‚   β”œβ”€β”€ index.js            # React root rendering logic
β”‚   β”‚   β”œβ”€β”€ index.css           # Global styles
β”‚   β”‚   └── tailwind.config.js  # Tailwind CSS configuration
β”‚   β”œβ”€β”€ package.json            # Frontend dependencies and scripts
β”‚   β”œβ”€β”€ package-lock.json       # Package lock file
β”‚   β”œβ”€β”€ .env                    # Environment variables
β”‚   β”œβ”€β”€ .gitignore              # Git ignore rules
β”‚   └── README.md               # Client documentation
β”‚
β”œβ”€β”€ server/                     # Backend (Server-side) code
β”‚   β”œβ”€β”€ config/                 # Configuration files (e.g., DB connection)
β”‚   β”œβ”€β”€ controller/             # API route handlers (auth, search, user management)
β”‚   β”œβ”€β”€ models/                 # Database schemas/models (User, Conversation)
β”‚   β”œβ”€β”€ routes/                 # API route definitions
β”‚   β”œβ”€β”€ services/               # Business logic (e.g., conversation retrieval, token management)
β”‚   β”œβ”€β”€ socket/                 # WebSocket implementation for real-time messaging
β”‚   β”œβ”€β”€ .env                    # Environment variables
β”‚   β”œβ”€β”€ .gitignore              # Git ignore rules
β”‚   β”œβ”€β”€ docker-compose.yml      # Docker setup for backend services
β”‚   β”œβ”€β”€ index.js                # Main Express server setup
β”‚   β”œβ”€β”€ package.json            # Backend dependencies and scripts
β”‚   β”œβ”€β”€ package-lock.json       # Package lock file
β”‚   β”œβ”€β”€ README.md               # Server documentation
β”‚   └── Dockerfile              # Docker container configuration
β”‚
β”œβ”€β”€ install.sh                  # Installation script for automated setup
β”œβ”€β”€ LICENSE                     # License file
β”œβ”€β”€ project_architecture.md      # Documentation of project architecture
β”œβ”€β”€ README.md                   # Main project README with setup instructions
β”œβ”€β”€ .git/                        # Git repository metadata
β”œβ”€β”€ .gitignore                   # Git ignore rules
β”œβ”€β”€ docker-compose.yml           # Multi-service Docker setup (client, server, database)
└── details/                     # Additional documentation or setup files

Installation

  1. Clone the repository:
    git clone https://github.com/leonfullxr/Cypher.git
  2. Navigate to the project directory:
    cd Cypher
  3. Install dependencies and start the server:
    cd server
    npm install
    npm run dev &
  4. Start the client:
    cd ../client
    npm install
    npm start &

Alternatively, you can use the provided install.sh script:

bash install.sh

Demo

Watch the video


MFA Demo

Watch the video


Responsive Design Demo

Watch the video

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contact

For inquiries or support, reach out to us at [email protected].

About

Cypher is a cutting-edge encrypted chat application designed to prioritize user privacy and security. With end-to-end encryption, your messages remain confidential and secure, ensuring peace of mind in your communications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published