How csgroup-oss/sharinghub-server works
Main Components Identification
The system should be represented with these key components:
a) Core Application Layer:
• FastAPI Application Server
• Authentication Service (app/auth)
• STAC API Service (app/stac)
• Store Service (app/store)
• Providers Service (app/providers)
b) External Integration Layer:
• GitLab Integration
• Other potential providers (extensible architecture)
c) Utility Services:
• Caching System
• Configuration Management
• Geo Utils
• HTTP Client
Client Layer
• ▼
API Gateway (FastAPI)
• ┬─────────────────┬────────────────┐
• ▼ ▼ ▼ ▼
Auth Service STAC Service Store Service Providers Service
• ▼
• Provider Clients
• ▼
• (GitLab, etc.)
• ▼ ▼ ▼
Shared Utilities (Cache, Config, Geo, HTTP)
Specific Implementation Details
a) Authentication Flow:
• How auth/api.py and auth/views.py interact
• Dependency injection points (auth/depends.py)
b) STAC Implementation:
• Three main STAC endpoints (build, category, search)
• Connection to store service
c) Provider Integration:
• Demonstrate the abstract base client (_base.py)
• Concrete implementation (gitlab.py)
• Proxy and download capabilities
Additional Elements
Supporting components:
• Configuration management (config.yaml)
• Cache mechanism
• Gunicorn server configuration
• Docker container boundary
Deployment Context
Show:
• Docker container boundary
• Environment configuration flow
• External service connections
Remember to:
• Use clear labels for all components
• Version/git information
• Configuration flow from .env and config.yaml
This system design should provide a clear understanding of how the SharingHub Server components interact while maintaining the appropriate level of detail for a principal software engineer to understand the system architecture.