Skip to content
Vader-codesPublic

About

A display of chat app called TextMe , Where two users can create or login and start text or image chats

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Text-Me

A full-stack real-time chat application with authentication, image sharing, rate limiting, and transactional email — built with the MERN stack and Socket.io.

Features

  • 💬 Real-time one-on-one messaging via Socket.io (WebSockets)
  • 🔐 User authentication (signup/login) with JWT
  • 🖼️ Image sharing in chat, stored via Cloudinary
  • 🛡️ API rate limiting & bot protection with Arcjet
  • 📧 Transactional emails (e.g. welcome/notification emails) via Resend
  • 🟢 Online/offline user presence
  • 📱 Responsive UI

Tech Stack

Frontend: React, (state management/styling as used in the project) Backend: Node.js, Express Database: MongoDB Atlas Real-time: Socket.io Image storage: Cloudinary Security/rate limiting: Arcjet Email: Resend Deployment: Render

Architecture

Text-Me/
├── Backend/     # Express server, REST API, Socket.io server
└── Frontend/    # React client

The frontend communicates with the backend via REST for auth/data operations and maintains a persistent WebSocket connection (Socket.io) for real-time message delivery and presence updates.

Notable Engineering Challenges

Building and deploying this project surfaced several real production issues, each of which shaped the final architecture:

  • Silent request stalls from Arcjet middleware — a missing next() call in the Arcjet middleware caused requests to hang indefinitely with no error thrown, since Express never proceeded past the middleware. Root-caused by tracing the middleware chain and confirming the request never reached the route handler.
  • Linux case-sensitivity bug — a folder named Hooks broke imports when deployed on a case-sensitive Linux filesystem (it worked locally on Windows/Mac, which are case-insensitive). Fixed via a two-step git mv (renaming through an intermediate name) so git would properly register the case change.
  • CORS errors in production — caused by a misconfigured CLIENT_URL environment variable not matching the deployed frontend origin.
  • express.static path resolution issues — incorrect relative paths caused static assets not to be served correctly after deployment.
  • Resend email delivery blocked — emails failed to send in production due to Resend's test-domain sending restrictions; resolved by verifying a proper sending domain.
  • MongoDB Atlas DNS resolution failure — Node.js couldn't resolve the MongoDB Atlas SRV DNS record on certain networks; fixed by forcing Google's public DNS via dns.setServers() in the connection setup.

Getting Started

Prerequisites

  • Node.js (v18+)
  • MongoDB Atlas account
  • Cloudinary account
  • Arcjet account
  • Resend account

Setup

# Clone the repo
git clone https://github.com/Vader-codes/Text-Me.git
cd Text-Me

# Install backend dependencies
cd Backend
npm install

# Install frontend dependencies
cd ../Frontend
npm install

Environment Variables

Create a .env file in Backend/ with:

MONGODB_URI=your-mongodb-atlas-connection-string
JWT_SECRET=your-jwt-secret
CLOUDINARY_CLOUD_NAME=your-cloudinary-name
CLOUDINARY_API_KEY=your-cloudinary-key
CLOUDINARY_API_SECRET=your-cloudinary-secret
ARCJET_KEY=your-arcjet-key
RESEND_API_KEY=your-resend-key
CLIENT_URL=http://localhost:5173

Run

# Start backend (from Backend/)
npm run dev

# Start frontend (from Frontend/)
npm run dev

Author

Bipin — @Vader-codes

About

A display of chat app called TextMe , Where two users can create or login and start text or image chats

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages