How infra-geo-ouverte/igo2-lib works
Main Components
• Demonstration Application – Under “projects/demo” you have a full Angular demo app that shows how to compose and use the various IGO2 modules.
• IGO2 Library Modules – The repository is organized as a monorepo with multiple packages:
– @igo2/utils: Low-level utilities (e.g., base64, uuid, string and date utilities) with zero external dependencies.
– @igo2/core: Core services and application-wide functions (configuration, language handling, messaging, media, requests, etc.).
– @igo2/auth: Authentication and security components employing different providers (Google, Facebook, Microsoft, etc.).
– @igo2/geo: Mapping and geospatial components that depend on OpenLayers and integrate mapping functionalities (catalogs, layers, drawing, query, etc.).
– @igo2/context: Bridges elements from auth and geo to provide integrated context management features.
– @igo2/integration: A set of tools and components that bring together multiple aspects of the library in an integrated fashion.
• Build and Deployment Scripts – The “scripts” folder along with configuration files (angular.json, tsconfig.*, commitlint, eslint, etc.) manage build, test, and release processes.
Relationships and Interactions
• The “demo” project acts as a client application consuming the various libraries.
• The core library functions form the backbone used by common UI components and services.
• Authentication components in @igo2/auth work independently and also integrate with @igo2/context for a seamless security and context management experience.
• The utilities module (@igo2/utils) underpins almost all modules by supplying common helper functions.
• Integration services aggregate functionalities from distinct modules (geo, auth, context, etc.) so they can be used together within client applications.
Architectural Patterns and Design Principles
• Modular Architecture: Each package is highly decoupled and self-contained to promote reusability and scalability.
• Layered Design: There’s a clear separation between utility functions, core business logic, UI components, and domain-specific modules such as geo and auth.
• Angular Best Practices: The design leverages Angular’s dependency injection, module encapsulation, and component-driven patterns.
• Build & Test Automation: Configuration files and scripts indicate a strong emphasis on automated building, testing, and quality (with tools like ESLint, Karma, and CI/CD workflows).
Technologies, Frameworks, and Libraries
• Angular and Angular Material form the UI framework.
• OpenLayers is used for geospatial mapping.
• TypeScript, with its angular.json and tsconfig files, guides the code structure and compilation.
• Standard build tools (npm, scripts with postbuild/prestart actions) and testing tools (Karma, ESLint) are integrated.