This project is a chat web application developed in NestJS and NextJS frameworks. Motive is to learn web sockets using socket.io library. User interface is not optimized for larger screens such as laptops and pc(s). Best viewed on mobile devices.
Client: NextJS, Redux Toolkit, TailwindCSS, MUI, Tanstack Query, Axios, DayJS, socket.io-client
Server: NestJS with ExpressAdapter, SQLite, PrismaORM, swagger, socket.io
- Contact Book
- Realtime Messaging
- Realtime User Search
- User Registration/Login
- Double Layer Authentication (REST + WS) with secure http cookies.
- JWT rotation with refresh token.
First clone the repo or download the zip file. Open the projects root directory in a terminal.
cd backend
Install packages
pnpm install
Run migrations and generate types
npx prisma migrate dev <name_for_migration>
Run the development server
pnpm start:dev
Or you can build and run the production server for better response
pnpm build && pnpm start
Now open a new terminal in the root of the project download and navigate to client directory.
cd client
Install packages and dependencies
pnpm install
Run the development server
pnpm dev
Or you can build and run the production server for better response
pnpm run build && pnpm run start
That's it now you can open this url in new brower window/tab. http://localhost:3000/.
For the overview of apis you can visit http://localhost:4000/docs/. (Make sure the backend server is running)