Talksy is a seamless, real-time messaging platform designed to connect people instantly. It offers secure user authentication, real-time communication, and an elegant, responsive user interface.
π Live Website: Talksy β
(Deployed on Vercel)
- β¨ Features
- π οΈ Tech Stack
- π§ Prerequisite
- βοΈ Installation & Setup
- π Environmental Variables
- π‘ API Endpoints
- π Folder Structure
- π€ Contributing
- β‘ Real-time Messaging: Instant message delivery and reception powered by Socket.io.
- π Secure Authentication: JWT-based user authentication and bcrypt password hashing.
- π’ Online Status: See which users are currently online in real-time.
- πΌοΈ Profile Customization: Users can upload and update their profile pictures using Cloudinary.
- π± Responsive Design: A beautiful, fully responsive UI built with Tailwind CSS.
- π Message Read Status: Know when your messages have been seen.
- π‘οΈ Protected Routes: Ensure only authenticated users can access the chat and profile settings.
- React.js (v19)
- Vite (Next Generation Frontend Tooling)
- Tailwind CSS (v4)
- React Router DOM (Routing)
- Socket.io-client (Real-time communication)
- Axios (HTTP requests)
- React Hot Toast (Notifications)
- Node.js & Express.js
- MongoDB & Mongoose (Database & ODM)
- Socket.io (WebSocket server)
- JSON Web Tokens (JWT) (Authentication)
- Bcrypt.js (Password hashing)
- Cloudinary (Image hosting)
- Vercel (Frontend)
- Render (Backend)
Before you begin, ensure you have the following installed:
- Node.js (v18.x or higher)
- npm (Node Package Manager)
- A MongoDB account and cluster URL.
- A Cloudinary account for image uploads.
Clone the repository
git clone https://github.com/your-username/talksy.git
cd Talksy- Navigate to the
backenddirectory and install dependencies:
cd backend
npm install- Start the backend server:
npm run server(The server will run on http://localhost:5000)
- Open a new terminal and navigate to the frontend directory and Install dependencies:
cd frontend
npm install- Start the Vite development server:
npm run dev(The frontend will be accessible at http://localhost:5173)
- Create a
.envfile in thebackenddirectory and add the following keys:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret- Create a
.envfile in thefrontenddirectory:
VITE_BACKEND_URL=http://localhost:5000| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/signup |
Register a new user | Public |
POST |
/login |
Authenticate & get token | Public |
PUT |
/update-profile |
Update user profile image | Private |
GET |
/check |
Verify authentication status | Private |
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET |
/users |
Get all users for sidebar | Private |
GET |
/:id |
Get message history with user | Private |
POST |
/send/:id |
Send a message to a user | Private |
PUT |
/mark/:id |
Mark messages as seen | Private |
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET |
/ |
Verify server status | Public |
Talksy - Chat App/
βββ backend/
β βββ controllers/ # Route controller functions
β βββ lib/ # Database and Cloudinary configuration
β βββ middleware/ # Authentication middlewares
β βββ models/ # Mongoose database schemas
β βββ routes/ # Express route definitions
β βββ server.js # Entry point for backend & Socket.io setup
β βββ package.json # Backend dependencies
β
βββ frontend/
β βββ public/ # Static public assets
β βββ context/ # React Context providers for global state
β βββ src/
β β βββ assets/ # Images, icons, and static assets
β β βββ components/ # Reusable UI components (Sidebar, ChatContainer, etc.)
β β βββ lib/ # Utility functions and helpers
β β βββ pages/ # Full page views (HomePage, LoginPage, ProfilePage)
β β βββ App.jsx # Main application component & routing setup
β β βββ index.css # Global styles and Tailwind directives
β β βββ main.jsx # React DOM rendering entry point
β βββ index.html # Main HTML entry point
β βββ vite.config.js # Vite bundler configuration
β βββ package.json # Frontend dependencies and scripts
β
βββ Readme.md # Project Documentation
Contributions are always welcome!
If you find this project useful, please consider giving it a β β it really helps and is greatly appreciated.
Feel free to fork the repository and submit a pull request for any enhancements or bug fixes.