A real-time messaging application built with Next.js, Firebase, and Prisma.
- 🔐 Secure authentication with NextAuth
- 💬 Real-time messaging using Firebase Realtime Database
- 👥 Friend request system
- 🎨 Modern UI with Material UI and Tailwind CSS
- 📱 Responsive design
- 🖼️ Profile image upload support
- 🎤 Audio Recording, Gif
- Framework: Next.js 14
- Database: MongoDB (with Prisma ORM)
- Real-time Database: Firebase Realtime Database
- Authentication: NextAuth.js
- Styling: Tailwind CSS, Material UI
- File Storage: Firebase Storage
- Deployment: Vercel
- Analytics: Vercel Analytics
- Node.js (v18 or higher)
- npm or yarn
- MongoDB database
- Firebase project
Create a .env file in the root directory with the following variables:
# Database
DATABASE_URL="your_mongodb_url"
# Firebase
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_DATABASE=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=- Clone the repository:
git clone https://github.com/yourusername/cupid-messenger.git- Install dependencies:
npm install
# or
yarn install- Generate Prisma client:
npm run generate- Run the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
├── app/ # Next.js app directory
│ ├── _components/ # Reusable components
│ ├── _firebase/ # Firebase configuration
│ ├── _helper/ # Helper functions
│ ├── _lib/ # Library functions
│ ├── api/ # API routes
│ └── direct/ # Messaging routes
├── prisma/ # Prisma schema and configuration
├── public/ # Static files
└── auth.js # Authentication configuration
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run generate- Generate Prisma client