A modern fullstack application built with microservices architecture, featuring real-time chat, user authentication, and notifications.
- User authentication and authorization
- Real-time chat functionality
- Notifications
- Profile management
- Microservices architecture
- API Gateway pattern
- Frontend: Next.js
- Backend: Node.js, NestJS
- Database: MongoDB
- Message Broker: RabbitMQ
- Real-time Communication: Socket.IO/WebSocket
- File Upload: UploadThing
Method | Endpoint | Description |
---|---|---|
/api/login |
User login | |
/api/register |
User registration |
Method | Endpoint | Description |
---|---|---|
/api/profile |
Get user profile | |
/api/profile |
Update user profile |
Method | Endpoint | Description |
---|---|---|
/api/notification/get-invitations |
Get pending invitations | |
/api/notification/invite |
Send invitation | |
/api/notification/invitations/respond |
Respond to invitation |
YOUAPP_FULLSTACK_PROJECT (root)
βββ you-app-backend
β βββ api-gateway # API Gateway service
β βββ auth-microservice # Authentication & Authorization
β βββ chat-microservice # Real-time chat functionality
β βββ notification-microservice # Notification handling
β βββ shared # Shared utilities and common code
β βββ user-microservice # User management
βββ you-app-frontend # Next.js frontend application
- Node.js
- MongoDB
- RabbitMQ
- Clone the repository:
git clone https://github.com/Moemen12/YOUAPP_FULLSTACK_PROJECT.git
cd YOUAPP_FULLSTACK_PROJECT
NEXT_PUBLIC_BACKEND_API_URL=http://localhost:3000/api
NEXT_PUBLIC_SOCKET_URL=http://localhost:3000
JWT_SECRET_KEY=
CORS_ORIGIN=http://localhost:5300
MAIN_PORT=3000
HOST=127.0.0.1
JWT_SECRET_KEY=
RABBITMQ_URL=amqp://guest:[email protected]:5672
AUTH_SERVICE_PORT=4001
CHAT_SERVICE_PORT=5001
USER_SERVICE_PORT=6001
HOST=127.0.0.1
MAIN_PORT=4001
MONGODB_URI=mongodb://localhost/nest_backend
JWT_SECRET_KEY=
USER_SERVICE_PORT=6001
HOST=127.0.0.1
MAIN_PORT=5001
MONGODB_URI=mongodb://localhost/nest_backend
JWT_SECRET_KEY=
JWT_SOCKET_TOKEN=
RABBITMQ_URL=amqp://guest:[email protected]:5672
CHAT_SERVICE_PORT=6001
SOCKET_PORT=3001
HOST=127.0.0.1
MONGODB_URI=mongodb://localhost/nest_backend
RABBITMQ_URL=amqp://guest:[email protected]:5672
CHAT_SERVICE_PORT=6001
UPLOADTHING_TOKEN=
HOST=127.0.0.1
MAIN_PORT=6001
MONGODB_URI=mongodb://localhost/nest_backend
cd you-app-frontend
npm install
npm run dev
From the root directory:
cd you-app-backend
npm run install:all # Install dependencies for all services
npm run dev:all # Start all microservices
Note: The
shared
folder contains common utilities and doesn't need to be run separately.
To verify the application is running correctly, visit:
http://localhost:3000/api
You should see the message: "API GATEWAY MICROSERVICE IS RUNNING ..."
Docker implementation is currently in progress. Stay tuned for containerization support!
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
Copyright (c) 2024 MOEMEN_SAADEH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.