Skip to content

Welcome to the backend of a real-time chat application! πŸš€ This backend is powered by Node.js, Express, MongoDB, and Socket.IO to provide a seamless, scalable chat experience.

Notifications You must be signed in to change notification settings

Prakhar-code/Chat-App-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Chat-App-Backend πŸ’¬

Welcome to the backend of a real-time chat application! πŸš€ This backend is powered by Node.js, Express, MongoDB, and Socket.IO to provide a seamless, scalable chat experience.

Features ✨

  • Real-time messaging using Socket.IO
  • User authentication & authorization with JWT tokens
  • Persistent chat history stored in MongoDB
  • RESTful API for managing users and messages

Technologies Used πŸ› οΈ

  • Node.js – JavaScript runtime for building the backend
  • Express – Web framework for Node.js
  • MongoDB – NoSQL database for storing users and messages
  • Socket.IO – Real-time bi-directional communication

Installation πŸ§‘β€πŸ’»

  1. Clone the repository:
    git clone https://github.com/Prakhar-code/Chat-App-Backend.git
  2. Navigate to the project directory:
    cd Chat-App-Backend
  3. Install the dependencies:
    npm install

Configuration βš™οΈ

  1. Create a .env file in the root directory.
  2. Add the following environment variables to the .env file:
    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=your_secret_key
    

Running the Application πŸš€

  1. Start the development server:
    npm run dev
  2. The backend will be running on http://localhost:5001.

API Endpoints πŸ“‘

  • POST /api/auth/signup – Register a new user
  • POST /api/auth/login – Log in an existing user
  • GET /api/users – Fetch all users
  • GET /api/messages – Fetch all messages
  • POST /api/messages – Send a new message

Contribution 🀝

Feel free to open issues or create pull requests if you'd like to contribute to the project. Contributions are always welcome!

About

Welcome to the backend of a real-time chat application! πŸš€ This backend is powered by Node.js, Express, MongoDB, and Socket.IO to provide a seamless, scalable chat experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published