How overture-stack/arranger works
Project Type and Purpose
• Arranger is a full-stack microservice comprised of:
• A GraphQL API server (Node.js/TypeScript) that proxies and augments Elasticsearch.
• A React-based admin UI (modules/admin-ui) for managing indices and configurations.
• A reusable React component library (modules/components) for building custom search UIs.
• Container orchestration (docker-compose) to spin up Elasticsearch, the API, and UI.
High-Level Components
A. Data Layer
– Elasticsearch cluster
• docker/elasticsearch (mapping.json, load-es-data scripts, sample docs)
B. API Layer
– Arranger GraphQL Server (modules/server + src/)
• GraphQL schema & resolvers (admin schemas, network resolvers)
• Middleware (query builder, aggregation builder)
• Config loader (configTemplates, utils)
• ES REST adapter (es_rest, mapping utilities)
C. UI Layer
1. Admin UI (modules/admin-ui)
• React app using Apollo Client to query GraphQL API
• Pages for Project, Indices, Version, Config Editor
2. Component Library (modules/components)
• Standalone React components (Arranger, Table, Filters, SQON builder, etc.)
• Storybook stories for manual testing and preview
D. DevOps/CI
– docker-compose.yml orchestrates three services (ES, server, UI)
– Docker build scripts (docker/Dockerfile.*)
– Jenkinsfile & Makefile for CI/CD pipelines
– Integration tests (integration-tests/*)
Interactions and Data Flow
1. Admin UI (React) → GraphQL Server
• Apollo client issues GraphQL queries/mutations (projects, mappings, facets)
2. Component Library (imported by external apps or admin UI) → GraphQL Server
• Uses gql queries defined in src/utils/api.ts or generated code
3. GraphQL Server → Elasticsearch
• Middleware builds DSL from SQON filters, mapping utilities translate mappings
• ES REST calls via fetchMapping and es_rest client
• Aggregations, paging, set resolution handled in server before returning GraphQL response
4. CI/CD → Docker images → Deployment
• Jenkins pulls code, runs tests (unit, integration), builds Docker images for ES, server, UI
• docker-compose brings up services for local dev or staging
Architectural Patterns and Principles
• Layered separation: UI / API / Data
• Microservice/containerized design: each component in its own Docker container
• Modular GraphQL schemas: “admin” vs “network” resolvers, schema stitching
• Reusability: UI library decoupled from admin portal, consumed via package.json
• Configuration‐driven mapping: JSON templates in configTemplates and docker/server
Technologies & Frameworks
• Node.js / TypeScript / GraphQL (Apollo or custom server)
• Elasticsearch (v7+)
• React / TypeScript / Redux (admin-ui)
• Storybook (components)
• Docker & docker-compose
• Jenkins CI, Makefile scripts
• Jest / Mocha for unit & integration tests
Essential Elements
• Notes on tests and CI pipeline feeding into Docker images (Jenkins → docker build → deploy)