A secure, end-to-end encrypted chat application that allows users to communicate privately with one-on-one messaging.
- 🔒 End-to-End Encryption using Signal Protocol
- 👤 User Authentication
- 👥 One-on-One Chat
- 📝 Profile Management
- 💬 Real-time Messaging
- 🔐 Secure Key Exchange
- JavaFX
- FXML for UI
- CSS for styling
- Signal Protocol Library for Java
- Spring Boot
- Spring Security
- Spring WebSocket
- MongoDB
- JWT Authentication
- Java 17 or higher
- MongoDB (4.4 or higher)
- Maven 3.6+
- A modern web browser (for WebSocket support)
-
Clone the repository
git clone https://github.com/yourusername/e2ee-chat.git cd e2ee-chat -
Make sure MongoDB is running
# Check status sudo systemctl status mongodb # If not running, start MongoDB sudo systemctl start mongodb -
Build and run the backend
cd backend ./mvnw clean package java -jar target/e2ee-chat-0.0.1-SNAPSHOT.jar -
Build and run the frontend (in a separate terminal)
cd frontend ./build.sh
Alternatively, you can use the provided startup script:
chmod +x start.sh
./start.sh
The default configuration is stored in backend/src/main/resources/application.properties. You can override settings by:
- Creating an
application-dev.propertiesfile in the same directory - Running the app with:
java -jar target/e2ee-chat-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev
- Maven
- MongoDB
- JavaFX SDK
-
Clone the repository
-
Install dependencies:
# Install backend dependencies cd backend mvn install # Install frontend dependencies cd ../frontend mvn install
-
Set up environment variables:
- Create
application.propertiesin the backend directory - Configure the necessary properties (see application.properties.example)
- Create
-
Start the development servers:
# Start backend server cd backend mvn spring-boot:run # Start frontend application cd ../frontend mvn javafx:run
- End-to-End Encryption using Signal Protocol
- Secure key exchange
- Message authentication
- Perfect forward secrecy
- Double ratchet algorithm
MIT
Choice of Dependency management tool: Maven Why?
- Doesn't require much setup
- Convention over configuration
- Easier to read
For now, we're using MongoDB. Why?
- Great for prototyping
Later we can modify the code to accommodate PostgreSQL Why?
- PostgreSQL is more scalable
Building the backend API