A modern, real-time chat application built with React, Node.js, and Socket.io.
GostChat is a fully-featured, production-ready real-time communication platform. It features Google OAuth for seamless authentication, a robust friendship system, direct messaging, media attachments, and extensive customizable settings including dark mode.
- Google OAuth Authentication: Secure and easy login/registration without managing passwords.
- Real-time Messaging: Lightning-fast communication using Socket.io.
- Friendship System: Send, accept, and manage friend requests.
- Media Attachments: Upload images and files using Cloudinary.
- Customizable UI: Dark/Light themes and chat preferences (e.g., auto-download images).
- Online Presence: See who is online in real-time.
- Read Receipts & Typing Indicators: Enhanced communication experience.
- Secure & Production Ready: Rate limiting, HTTP parameter pollution protection, gzip compression, and secure cookies.
(Replace with actual screenshots of your application)
| Dashboard | Chat Interface | Settings |
|---|---|---|
| [Dashboard Placeholder] | [Chat Placeholder] | [Settings Placeholder] |
Frontend (Client)
- React 18 + Vite
- React Router DOM
- Vanilla CSS + CSS Variables
Backend (Server)
- Node.js + Express.js
- Socket.io
- MongoDB + Mongoose
- Cloudinary (Media Storage)
Monorepo Tooling
- NPM Workspaces
- TypeScript
- ESLint + Prettier
Please refer to the docs/ folder for detailed architectural documentation:
- Application Architecture
- Database Schema
- API Documentation
- Socket Events
- Folder Structure
- Deployment Guide
(Note: ARCHITECTURE.md in the root serves as the project's rigid constraints manifesto).
- Node.js (v24+)
- MongoDB Atlas (or local MongoDB)
- Cloudinary Account
- Google Cloud Console Account (OAuth Client ID)
-
Clone the repository:
git clone https://github.com/yourusername/gostchat.git cd gostchat -
Install dependencies:
npm install
-
Configure Environment Variables:
- Copy
.env.exampletoserver/.envand fill in the values. - Copy
client/.env.exampletoclient/.envand fill in the values.
- Copy
-
Build the Shared workspace:
npm run build -w shared
-
Start the Development Servers:
# Run both client and server concurrently npm run dev
GostChat includes multi-stage Dockerfiles and a docker-compose.yml for easy containerized deployment.
- Ensure your
.envvariables are correctly injected or updated indocker-compose.yml. - Run the application stack:
docker-compose up --build -d
- Access the application at
http://localhost:5173.
GostChat is decoupled for deployment on PaaS providers:
- Frontend: Optimized for Vercel. Connect your repository, set the build command to
npm run buildand output directory toclient/dist. EnsureVITE_API_URLandVITE_GOOGLE_CLIENT_IDare set. - Backend: Optimized for Railway. Deploy the
server/folder or use the provided Dockerfile. Set all environment variables securely in the Railway dashboard. - Database & Media: Rely on MongoDB Atlas and Cloudinary respectively.
We welcome contributions! Please see our Pull Request Template and check out our Issue Templates before submitting.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Group Chats
- Voice & Video Calls
- Message Reactions
- End-to-End Encryption (E2E)
Distributed under the MIT License. See LICENSE for more information.