Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions MICROSERVICES_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The system follows a microservices architecture pattern with the following key c
- **Business Services**: Multiple Play Framework-based microservices
- **Database**: PostgreSQL for data persistence
- **Caching**: Redis for performance optimization
- **Message Queue**: Message queuing system for asynchronous processing
- **External Services**: Mailtrap for email delivery, Cloudinary for file storage

## 🚀 Core Services
Expand Down Expand Up @@ -119,20 +120,35 @@ The system follows a microservices architecture pattern with the following key c
- **Redis**: In-memory data structure store
- **Use Cases**: Session storage, API response caching, real-time data

### **Message Queue**
- **Purpose**: Asynchronous message processing and service communication
- **Use Cases**: Background job processing, event-driven architecture, service decoupling

### **External Services**
- **Mailtrap**: Email testing and delivery service
- **Cloudinary**: Cloud-based image and video management platform

## 🔄 System Flow

1. **User Access**: Users access the React frontend application
2. **API Gateway**: All requests are routed through Kong Gateway
2. **API Gateway**: All requests are routed through Kong Gateway for load balancing and routing
3. **Authentication**: Keycloak handles user authentication and authorization
4. **Service Communication**: Microservices communicate via REST APIs
5. **Data Persistence**: PostgreSQL stores all application data
6. **Caching**: Redis improves performance with intelligent caching
7. **Real-time Updates**: WebSocket service enables live collaboration
8. **External Integration**: Mailtrap and Cloudinary handle specialized functions
4. **Service Routing**: Kong Gateway routes requests to appropriate microservices:
- Identity Service
- Comment Service
- Notification Service
- Workspace Service
- WebSocket Service
- Task Service
- Mail Service
- Project Service
- Media Service
5. **Service Communication**: Microservices communicate via REST APIs
6. **Data Persistence**: PostgreSQL stores all application data
7. **Caching**: Redis improves performance with intelligent caching
8. **Message Queue**: Handles asynchronous processing and event-driven operations
9. **Real-time Updates**: WebSocket service enables live collaboration
10. **External Integration**: Mailtrap and Cloudinary handle email delivery and media storage

## 📁 Project Structure

Expand All @@ -153,6 +169,7 @@ smart-taskhub/
├── infrastructure/
│ ├── database/ # PostgreSQL Configuration
│ ├── cache/ # Redis Configuration
│ ├── queue/ # Message Queue Configuration
│ └── keycloak/ # Authentication Configuration
└── docs/ # Documentation
```
Expand All @@ -165,21 +182,24 @@ smart-taskhub/
- Java 11+ (for backend services)
- PostgreSQL
- Redis
- Message Queue system

### Quick Start
1. Clone the repository
2. Set up environment variables
3. Start infrastructure services (PostgreSQL, Redis, Keycloak)
4. Deploy microservices
5. Launch the frontend application
6. Configure Kong Gateway routes
3. Start infrastructure services (PostgreSQL, Redis, Message Queue, Keycloak)
4. Configure Kong Gateway routes
5. Deploy microservices (Identity, Comment, Notification, Workspace, WebSocket, Task, Mail, Project, Media)
6. Launch the frontend application

## 🔧 Configuration

Each service requires specific configuration for:
- Database connections
- Redis cache settings
- Message queue connections
- Keycloak authentication
- Kong Gateway routing rules
- External service API keys (Mailtrap, Cloudinary)
- Service discovery and communication

Expand Down
Binary file modified backend/smart_taskhub_microservices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.