How project-refri/refri_be works
Main Components
a. API Services Layer:
• Spring API Service (api-spring)
• NestJS API Service (api)
• Image Processing Service (image-process)
• Data Processing Service (data-process)
b. Core Domain Services:
• Authentication Service (auth)
• User Management
• Ingredient Management
• Recipe Management
• Notification Service
• Image Processing
c. Infrastructure Components:
• MongoDB (indicated by mongo repositories)
• Redis Cache
• Prisma Database
• GCP (indicated by GCP workflows)
Architecture Patterns to Highlight
a. Microservices Architecture:
• Clear separation between Spring and NestJS services
• GRPC communication for image processing
b. Data Layer:
• Dual database architecture (MongoDB and Prisma)
• Redis caching layer
• Data flow patterns
Client Layer
• External API Consumers
• Mobile/Web Clients
API Gateway Layer
• Spring API Gateway
• NestJS API Gateway
• User Service | | Recipe | | Ingredient |
• Service | | Service |
• Auth | | Notification | | Image |
• Service | | Service | | Processing |
Data Layer
• MongoDB | | Redis | | Prisma |
• (Primary) | | Cache | | Database |
Important Elements
• Blue: API Gateways
• Green: Core Services
• Yellow: Data Stores
• Red: Critical Infrastructure
• REST API calls between services
• gRPC communication with image processing
• Database read/write operations
• Cache interactions
• Symbols for:
• Load balancers
• Security layers (auth)
• Message queues (if present)
• Monitoring points