A real-time chat application built with React, Node.js, and Socket.io. This app supports real-time messaging, user registration/login, and online/offline status tracking. The UI is styled using Tailwind CSS, and API documentation is available through Swagger.
- Real-time messaging between users.
- User registration and login system.
- Online/Offline user status indicators.
- Notification for unread messages.
- UI built with Tailwind CSS.
- API documentation using Swagger.
- Ready for database integration (MongoDB/SQL).
- React + TypeScript
- React Query (for state management)
- Socket.io-client (for real-time communication)
- Tailwind CSS (for styling)
- Node.js + Express.js
- Socket.io (WebSocket support)
- Swagger (API documentation)
- Yarn (package manager)
- ESLint & Prettier (code quality)
- Node.js (v14 or higher)
- Yarn installed globally
- A code editor (e.g., VS Code)
- Clone the repository:
git clone https://github.com/niloo-maleki/Socket_Talk
- For the frontend:
- cd client
- yarn install
- yarn start
- For the backend:
- cd server
- yarn install
- yarn dev
- Swagger API Documentation 📜: http://localhost:3002/api-docs
- Integration with MongoDB for data persistence.
- Support for group chats.
- Enhanced error handling and user management.
- Deployment on a cloud service.
SOCKET_TALK/
├── client/ # Frontend (React)
│ ├── public/ # Static files
│ ├── src/
│ │ ├── api/ # API call functions
│ │ ├── assets/ # Images, fonts, etc.
│ │ ├── components/ # Shared UI components
│ │ ├── features/ # Page-specific components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── router/ # Routing components
│ │ ├── schema/ # Form validation schemas
│ │ ├── services/ # API services
│ │ ├── socket/ # Socket.IO management
│ │ ├── types/ # TypeScript types/interfaces
│ │ ├── App.tsx # Main app component
│ │ └── main.tsx # Application entry point
│ ├── tailwind.config.js # Tailwind CSS configuration
│ ├── tsconfig.json # TypeScript configuration
│ └── package.json # Frontend dependencies
│
├── server/ # Backend (Node.js + Express)
│ ├── data/ # Static JSON files
│ ├── src/
│ │ ├── config/ # Configuration files
│ │ ├── controllers/ # API controllers
│ │ ├── docs/ # Swagger and API documentation
│ │ ├── events/ # Socket.IO event handlers
│ │ ├── routes/ # API routes
│ │ ├── swagger/ # Swagger configuration files
│ │ ├── types/ # TypeScript types/interfaces
│ │ ├── utils/ # Utility/helper functions
│ │ ├── app.ts # Application setup
│ │ ├── server.ts # Main server file
│ │ └── swagger.ts # Swagger configuration entry
│ ├── nodemon.json # Nodemon configuration
│ ├── tsconfig.json # TypeScript configuration
│ └── package.json # Backend dependencies
│
└── shared/ # Shared files between client and server
├── constants/ # Shared constants
└── types/ # Shared TypeScript types/interfaces