Service Catalog - pratchaya-maneechot/service-exchange GitHub Wiki
Service Catalog
1. User & Identity Service
Responsibilities:
- User registration and authentication
- Profile management
- Identity verification
- Role-based access control
Core Entities:
- User (Root Aggregate)
- Profile
- Role
- IdentityVerification
Key APIs:
service UserService {
rpc RegisterUser(RegisterUserRequest) returns (RegisterUserResponse);
rpc UserLogin(UserLoginRequest) returns (UserLoginResponse);
rpc LineLogin(LineLoginRequest) returns (LineLoginResponse);
rpc UpdateUserProfile(UpdateUserProfileRequest) returns (google.protobuf.Empty);
rpc SubmitIdentityVerification(SubmitIdentityVerificationRequest) returns (google.protobuf.Empty);
rpc GetUserProfile(GetUserProfileRequest) returns (UserProfileDTO);
rpc GetUserIdentityVerification(GetUserIdentityVerificationRequest) returns (IdentityVerificationDTO);
}
Events Published:
- UserRegistered
- UserVerified
- ProfileUpdated
- UserDeactivated
Database: PostgreSQL
2. Task Management Service
Responsibilities:
- Task creation and lifecycle management
- Task categorization and validation
- Task search and filtering
- Status transitions
Core Entities:
- Task (Root Aggregate)
- TaskCategory
- TaskRequirement
Key APIs:
POST /tasks
- Create new taskGET /tasks/{id}
- Get task detailsPUT /tasks/{id}
- Update taskGET /tasks/search
- Search and filter tasksPUT /tasks/{id}/status
- Update task status
Events Published:
- TaskCreated
- TaskUpdated
- TaskAssigned
- TaskCompleted
- TaskCancelled
Database: PostgreSQL
3. Bidding & Negotiation Service
Responsibilities:
- Bid submission and management
- Pre-hiring communication
- Bid selection process
- Negotiation workflows
Core Entities:
- Bid (Root Aggregate)
- Conversation
- Message
Key APIs:
POST /bids
- Submit bidGET /tasks/{id}/bids
- Get task bidsPOST /bids/{id}/accept
- Accept bidPOST /conversations
- Start conversationGET /conversations/{id}/messages
- Get messages
Events Published:
- BidPlaced
- BidAccepted
- BidRejected
- ConversationStarted
- MessageSent
Database: PostgreSQL
4. Payment Service
Responsibilities:
- Payment processing
- Escrow management
- Fee calculations
- Payouts and withdrawals
- Refund processing
Core Entities:
- Transaction (Root Aggregate)
- EscrowAccount
- Fee
Key APIs:
POST /payments/escrow
- Create escrow transactionPOST /payments/release
- Release escrow fundsGET /payments/history
- Transaction historyPOST /payments/withdraw
- Withdraw fundsPOST /payments/refund
- Process refund
Events Published:
- PaymentProcessed
- EscrowCreated
- FundsReleased
- WithdrawalCompleted
Database: PostgreSQL (ACID compliance critical)
5. Review & Rating Service
Responsibilities:
- Review submission and management
- Rating calculations
- Reputation scoring
- Review authenticity validation
Core Entities:
- Review (Root Aggregate)
- Rating
Key APIs:
POST /reviews
- Submit reviewGET /users/{id}/reviews
- Get user reviewsGET /users/{id}/rating
- Get user rating summaryGET /tasks/{id}/reviews
- Get task reviews
Events Published:
- ReviewSubmitted
- RatingUpdated
Database: MongoDB
6. Notification & Communication Service
Responsibilities:
- Multi-channel notification delivery
- Message management
- Template management
- Delivery tracking
Core Entities:
- Notification (Root Aggregate)
- Message
- Template
Key APIs:
POST /notifications/send
- Send notificationGET /notifications/{userId}
- Get user notificationsPUT /notifications/{id}/read
- Mark as readPOST /messages
- Send message
Channels Supported:
- In-app notifications
- Push notifications (FCM, APNS)
- Email notifications
- SMS notifications
Database: MongoDB
7. Location & Mapping Service
Responsibilities:
- Geospatial data management
- Proximity calculations
- Location-based matching
- Distance calculations
Core Entities:
- Location (Root Aggregate)
- GeoFence
Key APIs:
POST /locations
- Store location dataGET /locations/nearby
- Find nearby locationsGET /locations/distance
- Calculate distancePOST /locations/geocode
- Geocode address
Events Published:
- LocationUpdated
- ProximityMatch
Database: PostGIS
8. Support & Dispute Service
Responsibilities:
- Support ticket management
- Dispute resolution
- FAQ management
- SLA tracking
Core Entities:
- SupportTicket (Root Aggregate)
- Dispute
Key APIs:
POST /support/tickets
- Create support ticketGET /support/tickets/{id}
- Get ticket detailsPOST /disputes
- File disputePUT /disputes/{id}/resolve
- Resolve dispute
Database: MongoDB