A real-time chat application built with modern web technologies, featuring user authentication, email verification, and rate limiting for a secure and smooth chatting experience.
- Real-time messaging - Instant communication using Socket.IO
- User authentication - Secure signup and login system
- Email verification - Account verification via Resend email service
- Image sharing - Upload and share images with Cloudinary integration
- Rate limiting - Protection against spam and abuse using Arcjet
- Responsive design - Beautiful UI with Tailwind CSS and DaisyUI
- Modern interface - Clean and intuitive user experience
- HTML - Structure and markup
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Component library for Tailwind CSS
- Node.js - JavaScript runtime
- Express.js - Web application framework
- Socket.IO - Real-time bidirectional event-based communication
- MongoDB - NoSQL database for data storage
- Mongoose - MongoDB object modeling for Node.js
- Resend - Email delivery service for signup verification
- Arcjet - Rate limiting and security protection
- Cloudinary - Cloud-based image and video management service
Before running this application, make sure you have the following installed:
-
Clone the repository
https://github.com/jeevanvishnu/Chat-App.git cd Chat-App -
Install dependencies
npm install
-
Environment Setup
Create a
.envfile in the root directory and add the following variables:# Database MONGODB_URI=mongodb://localhost:27017/chaty # or for MongoDB Atlas: # MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/chaty # Server Configuration PORT=3000 NODE_ENV=development # Email Service (Resend) RESEND_API_KEY=your_resend_api_key_here # Rate Limiting (Arcjet) ARCJET_KEY=your_arcjet_key_here # Cloudinary Configuration CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret # JWT Secret (generate a secure random string) JWT_SECRET=your_jwt_secret_here # App Configuration CLIENT_URL=http://localhost:3000
-
Start MongoDB
Make sure MongoDB is running on your system:
# For local MongoDB installation mongoose # Or if using MongoDB Atlas, ensure your connection string is correct in .env
-
Start the development server
npm start
or for development with auto-restart:
npm run dev
-
Access the application
Open your browser and navigate to
http://localhost:3000 -
Create an account
- Sign up with your email address
- Check your email for verification link
- Verify your account and start chatting!
chaty/
├── public/ # Static files
│ ├── css/ # Stylesheets
│ ├── js/ # Client-side JavaScript
│ └── index.html # Main HTML file
├── src/ # Source code
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ └── utils/ # Utility functions
├── config/ # Configuration files
├── .env.example # Environment variables example
├── package.json # Dependencies and scripts
└── server.js # Main server file
- Sign up at Resend
- Create an API key
- Add the API key to your
.envfile - Configure your domain for email sending
- Sign up at Arcjet
- Create a new project
- Get your API key
- Add the key to your
.envfile
- Sign up at Cloudinary
- Go to your dashboard to find your credentials:
- Cloud Name
- API Key
- API Secret
- Add these credentials to your
.envfile - Configure upload presets if needed for additional security
- Local MongoDB: Ensure MongoDB is installed and running
- MongoDB Atlas: Create a cluster and get your connection string
- Mongoose: Used for elegant MongoDB object modeling and schema validation
# Start the application
npm start
# Development mode with auto-restart
npm run dev
# Run tests (if implemented)
npm test
# Lint code (if configured)
npm run lint- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Socket.IO for real-time communication
- Tailwind CSS for styling
- DaisyUI for beautiful components
- Mongoose for MongoDB object modeling
- Resend for email services
- Cloudinary for image and media management
- Arcjet for security and rate limiting
⭐ If you found this project helpful, please give it a star on GitHub!