A real-time, full-stack chat application built with React, Node.js, Express, and Prisma.
- Real-time Messaging: Instant message delivery using WebSockets (Socket.io).
- User Authentication: Secure user login and registration using Passport.js.
- RESTful API: Robust backend API built with Express.js.
- Database Management: Prisma ORM with structured data models.
- Modern UI: Clean and responsive client application built with Vite and React.
- React (with Vite)
- Socket.io-client for real-time connection
- Axios / Fetch API for HTTP requests
- Node.js & Express.js
- Prisma (ORM)
- Socket.io for real-time bidirectional event-based communication
- Passport.js for Authentication Middleware
Before you begin, ensure you have met the following requirements:
- Node.js (v16.x or later installed)
- Database supported by Prisma (e.g., PostgreSQL, MySQL, SQLite)
-
Clone the repository:
git clone <repository-url> cd Chatly
-
Set up the Server: Open your terminal and navigate to the Server directory.
cd Server npm installNote: Make sure to create a
.envfile in the/Serverfolder containing yourDATABASE_URLand any required secrets (e.g., JWT secret, Session secret).Run Prisma database migrations:
npx prisma migrate dev
Start the Node.js server:
npm run dev # or npm start -
Set up the Client: Open a new terminal window and navigate to the Client directory.
cd Client npm installStart the Vite development frontend server:
npm run dev
/Client: Frontend application containing React components (Chatarea,Chatbox,Users), Contexts (AuthContext), React hooks, and Socket setups./Server: Backend application containing API Routes, Express Middleware, Database queries via Prisma, Controllers, and utility functions (ApiError.js,ApiResponse.js).
Contributions, issues, and feature requests are welcome!