How croco-dev/darun works
High-Level Architecture Components
a. Frontend Layer:
• Service Web Application (Next.js)
• Admin Web Application (Next.js)
• Shared UI Components and Utilities
b. Backend Layer:
• GraphQL API (Serverless)
• Domain Services
• Database Layers (PostgreSQL and MongoDB indicated by repositories)
c. Shared Infrastructure:
• Authentication (Firebase)
• Storage Services
• Monitoring (Sentry)
Detailed Component Breakdown
a. Apps Layer (Top Level):
• Service Web | | Admin Web |
• (Next.js) | | (Next.js) |
• ↓ ↓
• ↓
• GraphQL API |
• (Serverless) |
b. Domain Layer (Middle):
• Products | | Companies | | Search |
• Domain | | Domain | | Domain |
• ↓ ↓ ↓
• Data Access Layer |
• (PostgreSQL + MongoDB Repositories) |
c. Shared Infrastructure (Cross-cutting):
• Authentication | | Storage |
• (Firebase) | | Service |
• ↓ ↓
• Shared Utilities |
• (Apollo, Router, UI, etc.) |
Important Details
a. Technology Stack Annotations:
• Next.js for web applications
• GraphQL for API
• PostgreSQL for main database
• MongoDB for search functionality
• Firebase for authentication
• Serverless deployment
b. Key Infrastructure Components:
• Apollo Client/Server
• Domain-driven design structure
• Shared UI component library
• Authentication providers
Additional Elements
Important aspects:
• Environment configurations
• Build/deployment workflows
• Monitoring and logging
• Security boundaries
• Scalability points
• Applications (apps/)
• Business Logic (libs/backend/)
• Frontend Components (libs/frontend/)
• Shared Utilities (libs/shared/)
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this system unique, such as its domain-driven design approach and the separation of concerns between service and admin applications.