Service Dependencies
This document provides a comprehensive overview of service dependencies, event publishing, API consumption, and event subscriptions across the ReptiDex platform’s 6 consolidated services.Architecture: 6 consolidated services with database-per-service isolation
Communication: REST APIs + Event-driven via AWS SNS/SQS
Dependencies: Foundation service (repti-core) supports all domains
Communication: REST APIs + Event-driven via AWS SNS/SQS
Dependencies: Foundation service (repti-core) supports all domains
Consolidated Services
repti-core
Purpose: Foundation service for authentication, configuration, billing, events, and telemetryPort: 8001
Database: repti_core_db External Dependencies:
- Stripe/PayPal (payment processing)
- AWS KMS (key management)
- Email/SMS providers (via integrations)
- AWS SNS/SQS (event infrastructure)
auth.user.created,auth.user.updated,auth.session.*org.created,org.updated,org.member.*config.updated,config.feature.toggledbilling.subscription.*,billing.invoice.*events.published,telemetry.tracked
- All service events (for telemetry and audit)
- System health events (for monitoring)
repti-animal
Purpose: Animal registry, lineage tracking, genetics, and breeding managementPort: 8002
Database: repti_animal_db External Dependencies: None (internal business logic) Publishes Events:
animal.created,animal.updated,animal.transferredlineage.updated,lineage.validated,pedigree.generatedbreeding.paired,breeding.clutch.*,breeding.offspring.*genetics.prediction.*,genetics.trait.*taxonomy.species.*,taxonomy.morph.*
repti-core(authentication, configuration)
auth.user.created(setup initial data)org.member.added(access control updates)media.uploaded(animal photo attachments)
repti-commerce
Purpose: Marketplace, sales transactions, and inventory managementPort: 8003
Database: repti_commerce_db External Dependencies:
- Payment processing (via repti-core)
marketplace.listing.*,marketplace.search.*sales.inquiry.*,sales.transaction.*inventory.reserved,inventory.transferred,inventory.availableorder.created,order.updated,order.completed
repti-core(authentication, billing)repti-animal(product data, ownership validation)
animal.created(auto-create inventory)animal.transferred(update ownership)billing.subscription.updated(access control)payment.completed(order fulfillment)
repti-media
Purpose: File storage, rendering, embeds, and content managementPort: 8004
Database: repti_media_db External Dependencies:
- AWS S3 (file storage)
- CDN services (content delivery)
file.uploaded,file.processed,file.deletedrender.pedigree.*,render.chart.*,render.export.*embed.widget.*,embed.profile.*content.updated,content.published
repti-core(authentication, configuration)
animal.created(auto-generate placeholders)lineage.updated(re-render pedigree charts)profile.updated(refresh embedded widgets)
repti-community
Purpose: Search, notifications, community features, and advertisingPort: 8005
Database: repti_community_db External Dependencies:
- Email/SMS providers (notifications)
- Search indexing services
search.indexed,search.query.*notification.sent,notification.deliveredcommunity.post.*,community.interaction.*advertising.campaign.*,advertising.impression.*
repti-core(authentication, configuration)repti-animal(search content indexing)
animal.created(index for search)marketplace.listing.created(index for discovery)profile.updated(update search data)breeding.clutch.created(community notifications)
repti-ops
Purpose: Administrative tools, audit logging, integrations, and system monitoringPort: 8006
Database: repti_ops_db External Dependencies:
- Grafana (monitoring and alerting)
- Third-party integration APIs
admin.action.*,admin.moderation.*audit.logged,audit.compliance.*integration.sync.*,integration.error.*monitoring.alert.*,monitoring.health.*
repti-core(authentication, events access)
- All service events (for audit logging)
- System events (for monitoring and alerting)
- User actions (for compliance tracking)
Dependency Patterns
Foundation Service Pattern
All services depend on repti-core as the foundation service:- Authentication & Authorization: JWT tokens, user context, RBAC
- Configuration Management: Feature flags, service configuration
- Event Orchestration: Event publishing and coordination
- Billing Integration: Subscription and payment processing
- Telemetry Collection: Monitoring and observability data
Service Interaction Patterns
Synchronous Communication (REST APIs)
Synchronous Communication (REST APIs)
Real-time API Calls:
- User-facing operations requiring immediate response
- Cross-service data validation and retrieval
- Administrative operations and health checks
- Service-to-service authentication validation
repti-animal→repti-core(auth validation, config)repti-commerce→repti-animal(product data, ownership)repti-media→repti-core(auth, file permissions)repti-community→repti-animal(search indexing data)
Asynchronous Communication (Events)
Asynchronous Communication (Events)
Event-Driven Processing:
- Cross-domain data synchronization
- Business process workflows
- Audit and compliance logging
- Search indexing and caching
- Core Events: Authentication, configuration, billing
- Business Events: Animals, lineage, breeding, genetics
- Commerce Events: Marketplace, transactions, inventory
- Media Events: File processing, rendering, embeds
- Community Events: Search, notifications, engagement
- System Events: Admin actions, audit, monitoring
External Integration Patterns
- Payment Processing: Stripe/PayPal integration via repti-core
- File Storage: AWS S3 integration via repti-media
- Notifications: Email/SMS providers via repti-community
- Monitoring: Grafana integration via each service
- Authentication: Optional OAuth IdPs via repti-core
Service Dependency Graph
Event Flow Examples
User Registration Flow
Animal Sale Transaction Flow
Database Dependencies
Database-Per-Service Isolation
Each service owns its database completely:| Service | Database | Purpose |
|---|---|---|
| repti-core | repti_core_db | Auth, config, billing, events, telemetry |
| repti-animal | repti_animal_db | Animals, lineage, genetics, breeding |
| repti-commerce | repti_commerce_db | Marketplace, sales, transactions |
| repti-media | repti_media_db | File metadata, rendering jobs |
| repti-community | repti_community_db | Search indexes, notifications |
| repti-ops | repti_ops_db | Admin tools, audit logs, monitoring |
Cross-Service Data Access Rules
- No Direct Database Access: Services can only access their own database
- API-Only Integration: Cross-service data via REST APIs
- Event-Driven Sync: Data consistency via event publishing
- Service Ownership: Each service owns its domain data completely
This dependency mapping reflects our consolidated 6-service architecture optimized for operational simplicity while maintaining proper service boundaries and data isolation.

