Skip to content
pravinsingh1109Public

About

A modern real-time chat application built with React, Node.js, Express, TypeScript, Socket.io, and MongoDB.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GostChat

A modern, real-time chat application built with React, Node.js, and Socket.io.

Version License PRs Welcome

🚀 Overview

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.

✨ Features

  • 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.

📸 Screenshots

(Replace with actual screenshots of your application)

Dashboard Chat Interface Settings
[Dashboard Placeholder] [Chat Placeholder] [Settings Placeholder]

🛠 Tech Stack

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

📖 Architecture & Documentation

Please refer to the docs/ folder for detailed architectural documentation:

(Note: ARCHITECTURE.md in the root serves as the project's rigid constraints manifesto).

⚙️ Installation & Setup

Prerequisites

  • Node.js (v24+)
  • MongoDB Atlas (or local MongoDB)
  • Cloudinary Account
  • Google Cloud Console Account (OAuth Client ID)

Local Development

  1. Clone the repository:

    git clone https://github.com/yourusername/gostchat.git
    cd gostchat
  2. Install dependencies:

    npm install
  3. Configure Environment Variables:

    • Copy .env.example to server/.env and fill in the values.
    • Copy client/.env.example to client/.env and fill in the values.
  4. Build the Shared workspace:

    npm run build -w shared
  5. Start the Development Servers:

    # Run both client and server concurrently
    npm run dev

🐳 Docker Setup

GostChat includes multi-stage Dockerfiles and a docker-compose.yml for easy containerized deployment.

  1. Ensure your .env variables are correctly injected or updated in docker-compose.yml.
  2. Run the application stack:
    docker-compose up --build -d
  3. Access the application at http://localhost:5173.

🚀 Deployment

GostChat is decoupled for deployment on PaaS providers:

  • Frontend: Optimized for Vercel. Connect your repository, set the build command to npm run build and output directory to client/dist. Ensure VITE_API_URL and VITE_GOOGLE_CLIENT_ID are 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.

🤝 Contributing

We welcome contributions! Please see our Pull Request Template and check out our Issue Templates before submitting.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🗺 Future Roadmap

  • Group Chats
  • Voice & Video Calls
  • Message Reactions
  • End-to-End Encryption (E2E)

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

A modern real-time chat application built with React, Node.js, Express, TypeScript, Socket.io, and MongoDB.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages