Skip to content

MuhammadAnas4774/NexTalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NexTalk - Real-Time Chat Platform

NexTalk is a modern, real-time chat application built with PHP and JavaScript, featuring a sleek "glassmorphism" UI and powerful communication features. It delivers instant messaging capabilities, AI-powered assistance, and community management tools.

✨ Key Features

  • Real-Time Communication: Seamless live chat experience using Server-Sent Events (SSE) for instant message delivery without manual refreshing.
  • AI-Powered Assistance (Google Gemini):
    • Smart Replies: Context-aware, one-click smart reply suggestions to incoming messages.
    • Instant Translation: On-the-fly message translation across multiple languages.
  • Communities & Group Chats: Create public or private rooms, manage participants, and organize conversations.
  • Role-Based Access Control (RBAC): Flexible user roles (User, Moderator, Admin) to manage permissions, moderate messages, and oversee communities.
  • Interactive Polls: Create and vote on polls directly within chat rooms.
  • Modern User Interface: Premium, responsive glassmorphism aesthetic with engaging micro-animations and intuitive navigation.
  • Secure Authentication: Robust user registration and login system.

🛠️ Technology Stack

  • Frontend: HTML5, Vanilla CSS (Custom Design System), Vanilla JavaScript
  • Backend: PHP 8+ (PDO for secure database interactions)
  • Database: MySQL
  • Real-Time Engine: Server-Sent Events (SSE) & Fetch API
  • AI Integration: Google Gemini API

📂 Project Structure

NexTalk/
├── api/                  # Backend API endpoints (PHP)
│   ├── chat/             # Chat-specific endpoints (messages, polls, SSE, AI)
│   ├── check_auth.php    # Session validation
│   ├── db.php            # Database connection configuration
│   ├── login.php         # Authentication handling
│   ├── register.php      # User registration
│   ├── roles.php         # Role & permission definitions
│   └── setup.php         # Initial setup scripts
├── database/             # SQL schema definitions
│   └── nextalk_full.sql  # Complete database structure
├── html_pages/           # Frontend views and assets
│   ├── auth.html         # Login/Registration UI
│   ├── dashboard.html    # Main chat interface
│   ├── index.html        # Landing page
│   ├── dashboard.js      # Frontend logic & API integration
│   └── style.css         # Styling and design system
├── uploads/              # User-uploaded media
└── .env                  # Environment variables (API keys)

🚀 Setup Instructions

Follow these steps to run NexTalk locally on your machine.

1. Prerequisites

  • A local web server stack like XAMPP, WAMP, or MAMP.
  • PHP 8.0 or higher.
  • MySQL / MariaDB.
  • A Google Gemini API Key to enable AI features.

2. Installation

  1. Clone the repository into your local web server's document root (e.g., C:\xampp\htdocs\ for XAMPP):

    git clone https://github.com/MuhammadAnas4774/NexTalk.git
    cd NexTalk
  2. Database Setup:

    • Open phpMyAdmin or your preferred MySQL client.
    • Create a new database named nextalk.
    • Import the database/nextalk_full.sql file into the newly created database to set up the tables.
  3. Configure Database Connection:

    • Open api/db.php.
    • Ensure the database credentials match your local setup (default XAMPP credentials usually work: User root, empty password).
  4. Environment Variables (.env):

    • Create a file named .env in the root directory of the project.
    • Add your Gemini API key:
      GEMINI_API_KEY="your_api_key_here"
      GEMINI_MODEL="gemini-1.5-flash"

3. Usage

  • Start your Apache and MySQL services.
  • Navigate to http://localhost/NexTalk/html_pages/index.html in your web browser.
  • Create an account, log in, and start chatting!

About

NexTalk is a modern, real-time web chat application featuring a sleek glassmorphism design. It leverages Server-Sent Events for instant messaging and Google Gemini for AI smart replies and translations. It includes robust tools like role-based access control, private rooms, and interactive polls.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors