Asset Management Strategy
Date: October 11, 2025
Status: β
Implemented
Related: Component Architecture
Overview
Section titled βOverviewβThis document defines where assets (images, icons, fonts) should live in the monorepo and when to use each location.
π Asset Locations
Section titled βπ Asset LocationsβTwo Asset Directories:
Section titled βTwo Asset Directories:β1. packages/assets/ β Monorepo-wide generic assets2. apps/{division}/{brand}/shared/assets/ β Brand-specific assetsπ― Decision Tree
Section titled βπ― Decision TreeβIs this asset used by ALL divisions?βββ YES βββ Is it generic (not brand-specific)?β ββ ββ YES βββ packages/assets/β β Examples: arrow icons, generic UI icons, CloudAlt logoβ ββ ββ NO βββ apps/{division}/{brand}/shared/assets/β Each brand has their own versionβββ NO βββ apps/{division}/{brand}/shared/assets/ Brand-specific contentπ¦ Monorepo-Wide Assets (packages/assets/)
Section titled βπ¦ Monorepo-Wide Assets (packages/assets/)βLocation:
Section titled βLocation:βpackages/assets/βββ icons/β βββ arrows/ # Navigation arrowsβ βββ actions/ # Action icons (plus, trash, edit)β βββ navigation/ # Nav icons (home, menu)β βββ social/ # Social media iconsβββ illustrations/ # Generic illustrationsβββ brand/ βββ logo/ # CloudAlt company logoUse When:
Section titled βUse When:β- β Asset is used across ALL divisions
- β Generic UI elements (not brand-specific)
- β Small file sizes (< 50KB ideally)
- β Company-wide branding (CloudAlt logo)
Examples:
Section titled βExamples:β- Generic arrow icons
- Common action icons (plus, edit, delete)
- Empty state illustrations
- CloudAlt company logo
β οΈ Warning:
Section titled ββ οΈ Warning:βAssets here are bundled with every app. Keep this minimal!
// Webimport ArrowRight from '@cloudalt-frontend/assets/icons/arrows/arrow-right.svg';
// Mobileimport ArrowRight from '@cloudalt-frontend/assets/icons/arrows/arrow-right.svg';import { SvgXml } from 'react-native-svg';π¨ Brand-Specific Assets (apps/.../shared/assets/)
Section titled βπ¨ Brand-Specific Assets (apps/.../shared/assets/)βLocation:
Section titled βLocation:βapps/stay_match/pinkguest/ βββ shared/ βββ assets/ βββ images/ β βββ hero-background.png β βββ hero-background@2x.png β βββ logo.png β βββ feature-*.png βββ fonts/ βββ CustomFont.woff2
apps/stay_match/orangeguest/ βββ shared/ βββ assets/ βββ images/ β βββ hero-background.png # Different from pinkguest! β βββ logo.png βββ fonts/Use When:
Section titled βUse When:β- β Asset is unique to this brand
- β Shared between brandβs web and mobile apps
- β Brand identity assets (logos, hero images)
- β Any size (only bundled with this brand)
Examples:
Section titled βExamples:β- Hero background images
- Brand-specific logos
- Feature screenshots
- Brand photos
- Custom fonts
β Advantages:
Section titled ββ Advantages:β- Only bundled with specific brand
- Independent updates per brand
- Clear ownership
- Better performance
// Webimport heroImage from '../../shared/assets/images/hero-background.png';
// Mobileconst heroImage = require('../../shared/assets/images/hero-background.png');π Asset Types by Location
Section titled βπ Asset Types by Locationβ| Asset Type | Location | Reason |
|---|---|---|
| Generic arrow icon | packages/assets/icons/arrows/ | Used everywhere |
| Generic edit icon | packages/assets/icons/actions/ | Used everywhere |
| CloudAlt company logo | packages/assets/brand/logo/ | Company-wide |
| Empty state illustration | packages/assets/illustrations/ | Used everywhere |
| Pinkguest hero image | apps/stay_match/pinkguest/shared/assets/images/hero/ | Brand-specific |
| Pinkguest logo | apps/stay_match/pinkguest/shared/assets/images/logos/ | Brand-specific |
| Feature screenshot | apps/{division}/{brand}/shared/assets/images/features/ | Brand-specific |
| Onboarding tutorial | apps/{division}/{brand}/shared/assets/images/onboarding/ | Brand-specific |
| Default avatar | apps/{division}/{brand}/shared/assets/images/avatars/ | Brand-specific |
| Custom brand font | apps/{division}/{brand}/shared/assets/fonts/ | Brand-specific |
π― Asset Guidelines
Section titled βπ― Asset GuidelinesβAll brand-specific images are organized into folders by function within apps/{division}/{brand}/shared/assets/images/. This structure makes it easy to find images, manage them by category, and maintain consistency across teams.
Standard Folder Structure
Section titled βStandard Folder Structureβapps/{division}/{brand}/shared/assets/images/βββ hero/ # Hero/banner images for landing pagesβββ logos/ # Brand logos and wordmarksβββ features/ # Feature showcase imagesβββ onboarding/ # Tutorial and onboarding flow imagesβββ avatars/ # Default avatars and placeholdersβββ misc/ # Other brand-specific imagesHero Backgrounds (images/hero/)
Section titled βHero Backgrounds (images/hero/)β- Target size: < 300KB
- Max size: 500KB
- Format: WebP for web, PNG/JPG for mobile
- Naming:
hero-background.png,hero-background@2x.png - Usage: Landing pages, section headers, marketing material
- Responsive: Provide @2x, @3x variants for mobile
Logos (images/logos/)
Section titled βLogos (images/logos/)β- Target size: < 25KB
- Max size: 50KB
- Format: PNG with transparency or SVG (preferred)
- Provide sizes:
logo.png,logo@2x.png,logo@3x.png - Examples:
logo.png,logo-white.png,logo-icon.png
Feature Images (images/features/)
Section titled βFeature Images (images/features/)β- Target size: < 100KB
- Max size: 200KB
- Format: WebP for web, PNG/JPG for mobile
- Optimization: Always compress before adding
- Examples:
feature-search.png,feature-messaging.png - Tip: Consider lazy loading for below-the-fold images
Onboarding Images (images/onboarding/)
Section titled βOnboarding Images (images/onboarding/)β- Target size: < 100KB each
- Format: WebP for web, PNG/JPG for mobile
- Naming: Use sequential numbering for multi-step flows
- Examples:
onboarding-step-1.png,welcome.png
Avatars/Placeholders (images/avatars/)
Section titled βAvatars/Placeholders (images/avatars/)β- Target size: < 50KB each
- Dimensions: Consistent sizes (e.g., 200x200)
- Examples:
default-avatar.png,placeholder-user.png
Miscellaneous (images/misc/)
Section titled βMiscellaneous (images/misc/)β- Images that donβt fit other categories
- Use descriptive names
Icons (SVG)
Section titled βIcons (SVG)β- Viewbox: 24Γ24 or 16Γ16
- Color: Use
currentColorfor fill/stroke - Optimization: Run through SVGO
- Size: < 5KB each
- Naming: kebab-case (
arrow-right.svg)
- Format: WOFF2 for web, TTF for mobile
- Size: < 100KB per weight
- Licensing: Ensure proper licensing
- Recommendation: Use system fonts when possible
π« Anti-Patterns
Section titled βπ« Anti-Patternsββ Donβt: Brand Assets in Monorepo Package
Section titled ββ Donβt: Brand Assets in Monorepo Packageββ packages/assets/images/pinkguest-hero.pngβ packages/assets/images/orangeguest-hero.png
Problem: All brands bundle all images!β Do: Brand Assets in Brand Directory
Section titled ββ Do: Brand Assets in Brand Directoryββ
apps/stay_match/pinkguest/shared/assets/images/hero-background.pngβ
apps/stay_match/orangeguest/shared/assets/images/hero-background.png
Benefit: Each brand only bundles its own imagesβ Donβt: Generic Icons in Brand Directory
Section titled ββ Donβt: Generic Icons in Brand Directoryββ apps/stay_match/pinkguest/shared/assets/icons/arrow-right.svg
Problem: Duplicated across all brands!β Do: Generic Icons in Monorepo Package
Section titled ββ Do: Generic Icons in Monorepo Packageββ
packages/assets/icons/arrows/arrow-right.svg
Benefit: Single source of truth, shared by allπ Directory Structure Reference
Section titled βπ Directory Structure ReferenceβComplete Structure:
Section titled βComplete Structure:βmonorepo/βββ packages/β βββ assets/ # Monorepo-wideβ βββ icons/β β βββ arrows/β β βββ actions/β β βββ navigation/β β βββ social/β βββ illustrations/β βββ brand/β βββ logo/ββββ apps/ βββ {division}/ βββ {brand}/ βββ web/ β βββ src/ # Uses shared assets βββ mobile/ β βββ src/ # Uses shared assets βββ shared/ # Brand-specific βββ assets/ β βββ images/ β βββ fonts/ βββ constants/ β βββ content.ts βββ config/ βββ theme.tsπ Asset Workflow
Section titled βπ Asset WorkflowβAdding Generic Asset:
Section titled βAdding Generic Asset:β- Determine if truly generic (used by ALL divisions)
- Choose appropriate category (icons/illustrations/brand)
- Optimize asset (compress, remove metadata)
- Add to
packages/assets/{category}/ - Update category README with asset details
- Import and use in any app
Adding Brand Asset:
Section titled βAdding Brand Asset:β- Determine brand owner
- Optimize asset (compress, appropriate format)
- Add to
apps/{division}/{brand}/shared/assets/{type}/ - Use relative imports in brandβs web/mobile apps
- Document in brandβs assets README
π Related Documentation
Section titled βπ Related Documentationβ- Component Architecture - Three-tier system
- Design Token System - Using theme
- Monorepo Assets README
Key Principles
Section titled βKey Principlesβ- Assets are brand-specific β each app has its own
shared/assets/folder
Last Updated: October 11, 2025
Maintained By: Engineering Team