This project is inspired by Mr.DenzelCode's repository Nest-Auth
It's my attempt to embrace best practices of using MongoDB, and trying to write maintainabe code, based on my experience acquired by building several NestJs projects previously. It might not be that fancy, but I hope you can learn something new from this project too, just like I did 😃
- NestJs backend framework
- MongoDB
- SocketIO realtime app framework
- JWT authentication
- Class-transformer, Class-validator for validation
- Swagger for API documentation
Auth controller
Register, login, logout, refresh token
Code Controller
Issue code to verify your email (for account registration or password recovery)
Request Controller
Manage friend request, group request, group invitation
User Controller
Search users
Update profile
Manage user friends and groups
Group Controller
Search groups
Manage user groups
Message Controller
Manage direct and group messages
Connect Socket.io server (login with token)
logout
message:direct (send direct message)
message:group (send group message)
First, download the source code, then run:
npm install
npm run dev
To test API, visit http:https://localhost:3000/api
To test Gateway, use Postman Desktop and this sample collection
👉 socketio-server-collection
Thank you and happy coding!