This document provides context and guidelines for AI agents assisting with the OUDS Android (Orange Unified Design System for Android) project.
OUDS Android is an Android design system library that provides Orange-branded UI components and tokens for building consistent, accessible Android applications across all Orange brands and affiliates. This library is the Android implementation of the Orange Unified Design System.
- Language: Kotlin
- UI Framework: Jetpack Compose
- Minimum SDK: API 23 (Android 6.0)
- Build System: Gradle (Kotlin DSL)
- License: MIT
- Repository: https://github.com/Orange-OpenSource/ouds-android
- Documentation: https://android.unified-design-system.orange.com/
- Distribution: Maven Central
The project is organized into the following modules:
:core- Core library containing reusable UI components (e.g.,OudsTag, buttons, etc.):foundation- Foundation layer containing code used in all modules (extension methods, annotations, etc.):global-raw-tokens- Raw design tokens (colors, typography, spacing, etc.):theme-contract- Theme abstraction layer and token interfaces (e.g.,OudsThemeContract,OudsAlertTokens)
:theme-orange- Orange brand theme implementation:theme-orange-compact- Compact variant of Orange theme:theme-sosh- Sosh brand theme implementation:theme-wireframe- Wireframe theme for development/prototyping
:app- Demo application "Design Toolbox" showcasing components and design tokens:core-test- Shared testing utilities:dokka-plugin- Custom Dokka plugin for documentation generation
:buildSrc- Build configuration and shared Gradle logic- Root project - Overall project configuration
OUDS Android uses a multi-brand theming system:
OudsTheme(
theme = OrangeTheme(
orangeFontFamily = OrangeFontFamily(
latin = OrangeHelveticaNeueLatin.Bundled(...)
)
)
) {
// UI components here
}- Themes are interchangeable (Orange, Sosh, Wireframe, etc.)
- Each theme implements the
theme-contractinterfaces - Tokens drive all visual properties (colors, typography, spacing, etc.)
- Raw Tokens (
global-raw-tokens) - Base design values - Semantic Tokens (
theme-contract) - Semantic token definitions (e.g.,OudsColorActionSemanticTokens) - Component Tokens (
theme-contract) - Component-specific token definitions (e.g.,OudsAlertTokens) - Theme Implementations - Concrete semantic and component token values for each brand, as well as brand-specific raw tokens
The files containing the tokens are generated by an external tool called Tokenator. This tool takes Figma tokens as an input and convert them to Kotlin code.
Components follow a consistent pattern:
- Composable functions in
:core - Token-driven styling via theme
- Preview functions for development
- Accessibility support built-in
- KDoc-based documentation for public methods that includes simple code samples
- Compose Best Practices: Use modern Jetpack Compose patterns
- Coding Conventions: Follow Style guidelines for Jetpack Compose APIs which basically includes:
- Naming:
- Prefix components with
Ouds(e.g.,OudsTag,OudsButton) - Token classes end with
Tokens(e.g.,OudsAlertTokens)
- Prefix components with
- Component files in
:core/src/main/java/com/orange/ouds/core/component/ - Token definitions in
:theme-contract/src/main/java/com/orange/ouds/theme/tokens/ - Demo app code in
:app/src/main/java/com/orange/ouds/app
When adding new components:
- Verify that component tokens generated by Tokenator are defined in
:theme-contractand implemented in theme modules (:theme-orange, etc.) - Create one or more composables in
:coremodule, trying to match the equivalent Material 3 APIs as much as possible - Ensure accessibility semantics are properly implemented
- Add a sample code for each component composable
- Include
@Previewannotations for IDE preview - Add snapshot tests in
:core-testmodule and generate snapshots for each theme - Add instrumented Compose UI tests for user interactions such as clicks
- Add demo screen in
:appmodule - Update
Component.ktin:buildSrcas well as the component KDoc so that it references the design guidelines link and version
Demo screens use state classes (e.g., AlertMessageDemoState, InlineAlertDemoState) to:
- Manage component configuration
- Provide interactive controls in demo app
- Showcase different component variants Customization parameters in demo screens match the parameters of the component APIs
- Drawable resources defined via
OudsDrawableResourcesinterface - Each theme provides concrete drawable implementations
- Use token system for colors, dimensions, and other values
- Snapshot tests for visual regression
- Compose UI tests for component behavior
- Accessibility testing should be considered
- Public APIs must have KDoc comments
- Documentation generated with Dokka
- Published to https://android.unified-design-system.orange.com/
- README examples should be clear and concise
- Create new module (e.g.,
:theme-newbrand) - Implement
OudsThemeinterface from:theme-contract - Use concrete token values generated by Tokenator
- Add to
:appfor testing - Update documentation
- Check token definitions in
:theme-contract - Update component implementation in
:core - Update reference snapshots in all theme modules
- Update demo screens if needed
- Build:
./gradlew build - Run demo app:
./gradlew :app:installProdDebug - Snapshot tests:
./gradlew verifyPaparazziDebug - Instrumented tests:
./gradlew :core:connectedCheck - Distribution: Maven Central via
com.orange.ouds.androidgroup
Always consider that changes affect multiple brands. Test components with:
- Orange theme
- Orange Compact theme
- Sosh theme
- Wireframe theme
- Light and dark modes
- Provide content descriptions
- Ensure proper semantic roles
- Support TalkBack and other accessibility services
- Maintain sufficient color contrast
- Minimum SDK 23 (Android 6.0)
- Be mindful of deprecated APIs
- Maintain stable public API surface
- Compose best practices (remember, derivedStateOf, etc.)
- Avoid unnecessary recompositions
- Optimize preview rendering
- Any hardcoded string must be avoided; use stringResource.
See CONTRIBUTING.md for detailed contribution guidelines.
- Documentation: https://android.unified-design-system.orange.com/
- Repository: https://github.com/Orange-OpenSource/ouds-android
- Demo App: http://oran.ge/designtoolbox
- Issues: https://github.com/Orange-OpenSource/ouds-android/issues
- Orange Unified Design System: https://unified-design-system.orange.com/
- This SDK does not handle personal data
- No device permissions required
- Complies with Orange data privacy standards
For AI Agents: This document is specifically designed to provide context for AI assistants. When making changes, consider the multi-module, multi-brand nature of this design system.