Skip to content

About

Secure AI-powered messaging platform with encryption, Google OAuth 2.0, and Gemini AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SecureChat

Secure AI-Powered Messaging Platform

SecureChat is a modern Flask-based communication platform designed around three core principles:

  • 🔐 Security
  • 🤖 Intelligence
  • 🔎 Transparency

The project combines secure authentication, encrypted messaging, AI assistance, and a visual encryption inspector into a single web application.

Features

🔐 Secure Authentication

  • Google OAuth 2.0 authentication
  • Secure Flask session management
  • Environment-based configuration for sensitive credentials

🔒 Message Encryption

  • Symmetric message encryption using the cryptography library
  • Randomized encryption for each message
  • Encrypted communication designed to protect message contents

🤖 AI Assistant

  • Integrated Google Gemini AI
  • Dedicated AI chat mode
  • Real-time interaction with the AI assistant
  • Error handling for API limitations

🔎 Encryption Inspector

  • Displays plaintext and encrypted ciphertext
  • Provides a visual demonstration of the encryption process
  • Toggleable inspector interface

🎨 Modern User Interface

  • Dark-mode interface
  • Glassmorphism design
  • Animated WebGL background
  • Responsive layout
  • Smooth visual transitions

Tech Stack

Component Technology
Backend Python, Flask
Real-time Communication Flask-SocketIO
Frontend HTML5, CSS3, JavaScript
Encryption Python Cryptography / Fernet
Authentication Authlib, Google OAuth 2.0
AI Google Gemini
Configuration Python-dotenv

Project Structure

SecureChat/
├── app.py
├── auth.py
├── encryption.py
├── ai_handler.py
├── logger.py
├── requirements.txt
├── FINAL_PROJECT_REPORT.md
├── static/
│   ├── style.css
│   └── shader.js
├── templates/
│   ├── index.html
│   └── login.html
└── .gitignore

Security

Sensitive credentials and local configuration files are excluded from version control using .gitignore.

The repository excludes:

  • .env
  • Encryption keys
  • Virtual environments
  • Local logs
  • Python cache files

Never commit API keys, OAuth client secrets, encryption keys, or other sensitive credentials to the repository.

Project Purpose

SecureChat was developed as a security-focused modernization project, transforming a basic Flask-based chat application into a more secure and feature-rich communication platform.

The project demonstrates practical implementation of:

  • Authentication
  • Encryption
  • Secure configuration
  • AI integration
  • Real-time communication
  • Security transparency

Running Locally

1. Clone the Repository

git clone https://github.com/Mannat29/securechat.git
cd securechat

2. Create a Virtual Environment

On Windows:

python -m venv .venv

Activate the virtual environment:

.venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file in the project directory and configure the required application credentials.

Example:

GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GEMINI_API_KEY=your_gemini_api_key
SECRET_KEY=your_secret_key

Do not commit the .env file or any credentials to GitHub.

5. Run the Application

python app.py

The application can then be accessed through the local Flask server.

Security Considerations

This project is intended primarily for educational and demonstration purposes.

For production deployment, additional security controls should be implemented, including:

  • HTTPS/TLS
  • Secure production secret management
  • Production OAuth configuration
  • Secure cookie configuration
  • Rate limiting
  • Input validation
  • Production-grade logging and monitoring
  • Proper access control
  • Secure deployment configuration

Project Report

A detailed project report describing the project overview, implemented features, technical architecture, security mechanisms, and design is available in:

FINAL_PROJECT_REPORT.md

Author

Mannat Tomar

About

Secure AI-powered messaging platform with encryption, Google OAuth 2.0, and Gemini AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages