A fast, clean, and responsive real-time chat application built with Next.js (frontend) and Express.js (backend).
Stay connected with friends instantly through real-time messaging, typing indicators, and smooth UI.
- 🔥 Instant Messaging — Send and receive messages in real-time with zero delay.
- ✍️ Typing Indicator — See when your friend is typing (three dots animation).
- 🟢 Online/Offline Status — Know who's available to chat.
- 🧼 Clean UI — Simple, minimal, and modern user experience.
- 🛡️ Secure Communication — Built with best practices (HTTP-only cookies, WebSocket security).
- ⚡ Socket.IO Powered — Real-time communication under the hood.
| Frontend | Backend | Real-time | Database (Optional) |
|---|---|---|---|
| Next.js (App Router) | Express.js (Node.js) | Socket.IO | (Postgres) |
- Clone the repository
git clone https://github.com/giorgi225/chatify.gitcd chatifycd client
npm installCreate a .env.local file inside the client/ folder:
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000npm run devcd server
npm installCreate a .env file inside the server/ folder:
# Application URLs
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:8000
# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/db_name"
# Authentication Settings
ACCESS_SECRET="your_jwt_access_token_secret"
ACCESS_SECRET_EXPIRES_IN="10m"
REFRESH_SECRET="your_jwt_refresh_token_secret"
REFRESH_SECRET_EXPIRES_IN="1d"
# Email Settings
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT="587"
EMAIL_SECURE="false"
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-password"
EMAIL_VERIFICATION_EXPIRES_IN="5m"
EMAIL_VERIFICATION_MAX_ATTEMPTS="1"
EMAIL_VERIFICATION_COOLDOWN="30s"
# OAuth Settings (Google)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GOOGLE_CALLBACK_URL="http://localhost:3000/api/auth/google/callback"npm run devVisit http://localhost:3000 and start chatting!