A modern real-time chat application built with Next.js 14+.
- Framework: Next.js 14+ (App Router)
- Authentication: Clerk
- Database: PostgreSQL
- ORM: Prisma
- Styling: Tailwind CSS
- Deployment: Vercel
- File Storage: AWS S3
- Clone the repository
- Copy
.env.exampleto.envand fill in the environment variables - Install dependencies:
npm install
- Initialize the database:
npm run prisma:generate npm run prisma:push
- Run the development server:
npm run dev
- Authentication
- Real-time messaging
- Channel/DM organization
- File sharing & search
- User presence & status
- Thread support
- Emoji reactions
This project uses a multi-service architecture, with the main app at the root directory
/, a websocket service hosted on Railway at in socket-service/, and a RAG chatbot
API also on Railway in rag-api.
chatgenius/
├── src/
│ ├── app/
│ │ ├── api/
│ │ ├── _auth/
│ │ ├── _main/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── globals.css
│ ├── components/
│ ├── lib/
│ └── types/
├── prisma/
│ └── schema.prisma
├── public/
├── config/
├── .gitignore
├── .env
├── README.md
├── next.config.js
├── package.json
├── tsconfig.json
└── tailwind.config.ts
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- To deploy the socket server, navigate to
socket-serviceand runrailway up(you may need to log in and link) - To deploy the rag-api, I am not sure