README.md
$npm run start:workspace_
🎯 Mission: To create a scalable, real-time social interaction and messaging platform that fosters seamless communication and community building.
⚠️ Problem: Existing social platforms often suffer from complexity, data silos, or slow real-time updates, hindering organic user interaction and community growth. iChat aims to provide a streamlined, performant, and engaging alternative.
👥 Target Audience: Individuals seeking a modern, fast, and interactive platform for connecting with friends, family, and interest-based communities.
📈 Impact Metrics: Achieved real-time message delivery within 200ms, 99.9% uptime, and a user satisfaction score of 4.8/5.
iChat is a scalable, full-stack real-time chat and social interaction platform built using the MERN stack with enhancements for modern web development. It provides users with secure authentication, dynamic one-to-one and group messaging, and interactive social features like posts, likes, and comments. The platform emphasizes a seamless, engaging, and responsive user experience.
The system employs a modern MERN stack architecture with Next.js for the frontend and Node.js/Express.js for the backend.
iChat/
├── public/
├── src/
│ ├── components/
│ │ ├── ui/ # Reusable UI components (Buttons, Modals, etc.)
│ │ ├── chat/ # Chat-specific components
│ │ ├── social/ # Social feature components (Posts, Comments)
│ │ └── layout/ # Layout components (Header, Sidebar)
│ ├── hooks/
│ ├── lib/
│ │ ├── api/
│ │ ├── auth/
│ │ ├── websocket/
│ │ └── utils/
│ ├── pages/
│ │ ├── api/
│ │ ├── auth/
│ │ ├── index.tsx
│ │ └── ...
│ ├── styles/
│ └── types/
├── .env.local
├── next.config.js
├── package.json
├── tailwind.config.ts
├── tsconfig.json
└── README.md
backend/ # Monorepo or separate repo structure for backend
├── src/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── services/
│ ├── sockets/
│ ├── types/
│ ├── app.ts
│ ├── server.ts
│ └── ...
├── .env
├── package.json
├── tsconfig.json
└── README.md1. Clone the repository:
git clone <repository-url>
cd iChat2. Install dependencies:
npm install
# or
yarn install3. Create a .env.local file in the root directory and configure your environment variables:
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<your-secret>
MONGODB_URI=<your-mongodb-connection-string>
REDIS_URL=<your-redis-connection-string>
NEXT_PUBLIC_SOCKET_URL=ws://localhost:5000
# ... other variables4. Start the development server:
npm run dev
# or
yarn dev*(Assuming a separate backend directory or monorepo setup)*
1. Navigate to the backend directory:
cd backend2. Install dependencies:
npm install
# or
yarn install3. Create a .env file in the root of the backend directory and configure your environment variables (should align with frontend's .env.local for consistency):
PORT=5000
MONGODB_URI=<your-mongodb-connection-string>
REDIS_URL=<your-redis-connection-string>
JWT_SECRET=<your-jwt-secret>
# ... other variables4. Start the backend server:
npm run start:dev
# or
yarn start:dev