# sundhip/omnixperienceandroid architecture

> Architecture diagram of the GitHub repository sundhip/omnixperienceandroid, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sundhip/omnixperienceandroid
- Repository: https://github.com/sundhip/omnixperienceandroid

## Overview

OmniPresence is a personal lifestyle platform: users manage a wardrobe and profile, plan outfits around weather and events, and get financial, transit, and shopping guidance from OP AI. The main documented flow is through the Next.js dashboard and API routes into client-side services and domain engines; localStorage provides user-isolated persistence with an in-memory fallback. The tree also contains a separate FastAPI backend and optional FashionCLIP service. Their relationship to the web app is not shown, so they are represented separately. Some subsystem links rely on README descriptions because their source was not sampled.

Main entry points: [`src/lib/assistantEngine.ts`](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/assistantEngine.ts) (Assistant engine), [`src/app/(dashboard)`](https://github.com/sundhip/omnixperienceandroid/tree/main/src/app/(dashboard)) (Dashboard pages), [`src/app/api/v1/marketplace/search/route.ts`](https://github.com/sundhip/omnixperienceandroid/blob/main/src/app/api/v1/marketplace/search/route.ts) (Marketplace search), [`src/lib/marketplace/MarketplaceRetrievalEngine.ts`](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceRetrievalEngine.ts) (Product retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_dashboard["Dashboard pages"]
  node_wardrobe_ui["Wardrobe UI"]
  node_outfit_ui["Outfit planner UI<br/>[OutfitPlanner.tsx]"]
  node_api_routes["Next API routes"]
end

subgraph group_personal["Personal planning"]
  node_wardrobe_service["Wardrobe service<br/>[wardrobeService.ts]"]
  node_recommendations["Outfit recommendations"]
  node_events["Event understanding"]
  node_readiness["Event readiness<br/>[readinessEngine.ts]"]
  node_transport["Transit planning"]
  node_weather["Weather context<br/>[weatherService.ts]"]
  node_finance["Financial intelligence<br/>[financialEngine.ts]"]
end

subgraph group_assistant["Assistant and shopping"]
  node_assistant_ui["OP AI interface<br/>[OPAIPanel.tsx]"]
  node_assistant_engine["Assistant engine<br/>[assistantEngine.ts]"]
  node_ai_provider["AI provider<br/>[AIProvider.ts]"]
  node_market_search["Marketplace search<br/>[route.ts]"]
  node_query_parser["Shopping intent parser"]
  node_market_retrieval["Product retrieval"]
  node_market_context["Compatibility context"]
  node_market_aggregator["Marketplace providers"]
end

subgraph group_storage["Data and services"]
  node_auth_service["Authentication service<br/>[authService.ts]"]
  node_storage_service[("Client storage<br/>[storage.ts]")]
  node_seed_data["Starter profile data<br/>[seedData.ts]"]
end

subgraph group_backend["Python API"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_backend_routes["Versioned API routes<br/>[api.py]"]
  node_backend_db[("SQLAlchemy database<br/>[database.py]")]
  node_fashionclip["FashionCLIP service<br/>[app.py]"]
end

node_user(("Lifestyle user"))
node_weather_api{{"OpenWeatherMap"}}
node_marketplace_external{{"External marketplaces"}}

node_user -->|"uses"| node_dashboard
node_dashboard -.->|"manages wardrobe"| node_wardrobe_ui
node_dashboard -.->|"plans outfits"| node_outfit_ui
node_dashboard -.->|"opens assistant"| node_assistant_ui
node_dashboard -.->|"uses routes"| node_api_routes
node_wardrobe_ui -.->|"manages items"| node_wardrobe_service
node_wardrobe_service -->|"reads and writes"| node_storage_service
node_outfit_ui -.->|"requests suggestions"| node_recommendations
node_recommendations -.->|"uses conditions"| node_weather
node_assistant_ui -.->|"sends queries"| node_assistant_engine
node_assistant_engine -->|"analyzes intent"| node_ai_provider
node_assistant_engine -->|"analyzes events"| node_events
node_assistant_engine -->|"plans transit"| node_transport
node_assistant_engine -->|"checks readiness"| node_readiness
node_assistant_engine -.->|"handles finance"| node_finance
node_api_routes -.->|"routes search"| node_market_search
node_market_search -->|"parses query"| node_query_parser
node_market_search -->|"searches providers"| node_market_aggregator
node_market_retrieval -->|"parses intent"| node_query_parser
node_market_retrieval -->|"uses context"| node_market_context
node_market_aggregator -.->|"queries providers"| node_marketplace_external
node_auth_service -->|"reads and writes"| node_storage_service
node_auth_service -->|"initializes accounts"| node_seed_data
node_weather -.->|"fetches forecast"| node_weather_api
node_fastapi -->|"mounts routes"| node_backend_routes
node_backend_routes -.->|"uses database"| node_backend_db
node_fashionclip -.->|"visual analysis"| node_market_search

click node_dashboard "https://github.com/sundhip/omnixperienceandroid/tree/main/src/app/(dashboard)"
click node_wardrobe_ui "https://github.com/sundhip/omnixperienceandroid/tree/main/src/components/wardrobe"
click node_outfit_ui "https://github.com/sundhip/omnixperienceandroid/blob/main/src/components/outfits/OutfitPlanner.tsx"
click node_api_routes "https://github.com/sundhip/omnixperienceandroid/tree/main/src/app/api/v1"
click node_wardrobe_service "https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/wardrobeService.ts"
click node_recommendations "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/recommendationEngine.ts"
click node_events "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/eventUnderstandingEngine.ts"
click node_readiness "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/readinessEngine.ts"
click node_transport "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/transportationEngine.ts"
click node_weather "https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/weatherService.ts"
click node_finance "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/financialEngine.ts"
click node_assistant_ui "https://github.com/sundhip/omnixperienceandroid/blob/main/src/components/ai/OPAIPanel.tsx"
click node_assistant_engine "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/assistantEngine.ts"
click node_ai_provider "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/ai/AIProvider.ts"
click node_market_search "https://github.com/sundhip/omnixperienceandroid/blob/main/src/app/api/v1/marketplace/search/route.ts"
click node_query_parser "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/fashionSearchParser.ts"
click node_market_retrieval "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceRetrievalEngine.ts"
click node_market_context "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceContextEngine.ts"
click node_market_aggregator "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceAggregator.ts"
click node_auth_service "https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/authService.ts"
click node_storage_service "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/storage.ts"
click node_seed_data "https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/seedData.ts"
click node_fastapi "https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/main.py"
click node_backend_routes "https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/api/v1/api.py"
click node_backend_db "https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/models/database.py"
click node_fashionclip "https://github.com/sundhip/omnixperienceandroid/blob/main/services/fashion_clip_service/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_wardrobe_ui,node_outfit_ui,node_api_routes,node_user toneBlue
class node_wardrobe_service,node_recommendations,node_events,node_readiness,node_transport,node_weather,node_finance toneAmber
class node_assistant_ui,node_assistant_engine,node_ai_provider,node_market_search,node_query_parser,node_market_retrieval,node_market_context,node_market_aggregator toneMint
class node_auth_service,node_storage_service,node_seed_data toneRose
class node_fastapi,node_backend_routes,node_backend_db,node_fashionclip,node_weather_api,node_marketplace_external toneIndigo
```

## Components

### Web experience

- [Dashboard pages](https://github.com/sundhip/omnixperienceandroid/tree/main/src/app/(dashboard)): `src/app/(dashboard)`
- [Wardrobe UI](https://github.com/sundhip/omnixperienceandroid/tree/main/src/components/wardrobe): `src/components/wardrobe`
- [Outfit planner UI](https://github.com/sundhip/omnixperienceandroid/blob/main/src/components/outfits/OutfitPlanner.tsx): `src/components/outfits/OutfitPlanner.tsx`
- [Next API routes](https://github.com/sundhip/omnixperienceandroid/tree/main/src/app/api/v1): `src/app/api/v1`

### Personal planning

- [Wardrobe service](https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/wardrobeService.ts): `src/services/wardrobeService.ts`
- [Outfit recommendations](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/recommendationEngine.ts): `src/lib/recommendationEngine.ts`
- [Event understanding](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/eventUnderstandingEngine.ts): `src/lib/eventUnderstandingEngine.ts`
- [Event readiness](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/readinessEngine.ts): `src/lib/readinessEngine.ts`
- [Transit planning](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/transportationEngine.ts): `src/lib/transportationEngine.ts`
- [Weather context](https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/weatherService.ts): `src/services/weatherService.ts`
- [Financial intelligence](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/financialEngine.ts): `src/lib/financialEngine.ts`

### Assistant and shopping

- [OP AI interface](https://github.com/sundhip/omnixperienceandroid/blob/main/src/components/ai/OPAIPanel.tsx): `src/components/ai/OPAIPanel.tsx`
- [Assistant engine](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/assistantEngine.ts): `src/lib/assistantEngine.ts`
- [AI provider](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/ai/AIProvider.ts): `src/lib/ai/AIProvider.ts`
- [Marketplace search](https://github.com/sundhip/omnixperienceandroid/blob/main/src/app/api/v1/marketplace/search/route.ts): `src/app/api/v1/marketplace/search/route.ts`
- [Shopping intent parser](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/fashionSearchParser.ts): `src/lib/fashionSearchParser.ts`
- [Product retrieval](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceRetrievalEngine.ts): `src/lib/marketplace/MarketplaceRetrievalEngine.ts`
- [Compatibility context](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceContextEngine.ts): `src/lib/marketplace/MarketplaceContextEngine.ts`
- [Marketplace providers](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/marketplace/MarketplaceAggregator.ts): `src/lib/marketplace/MarketplaceAggregator.ts`

### Data and services

- [Authentication service](https://github.com/sundhip/omnixperienceandroid/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Client storage](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Starter profile data](https://github.com/sundhip/omnixperienceandroid/blob/main/src/lib/seedData.ts): `src/lib/seedData.ts`

### Python API

- [FastAPI application](https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/main.py): `backend/app/main.py`
- [Versioned API routes](https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/api/v1/api.py): `backend/app/api/v1/api.py`
- [SQLAlchemy database](https://github.com/sundhip/omnixperienceandroid/blob/main/backend/app/models/database.py): `backend/app/models/database.py`
- [FashionCLIP service](https://github.com/sundhip/omnixperienceandroid/blob/main/services/fashion_clip_service/app.py): `services/fashion_clip_service/app.py`

### Other components

- **Lifestyle user**
- **OpenWeatherMap**
- **External marketplaces**

## Connections

- Lifestyle user → Dashboard pages: uses
- Dashboard pages → Wardrobe UI: manages wardrobe
- Dashboard pages → Outfit planner UI: plans outfits
- Dashboard pages → OP AI interface: opens assistant
- Dashboard pages → Next API routes: uses routes
- Wardrobe UI → Wardrobe service: manages items
- Wardrobe service → Client storage: reads and writes (evidence: `src/services/wardrobeService.ts`)
- Outfit planner UI → Outfit recommendations: requests suggestions
- Outfit recommendations → Weather context: uses conditions
- OP AI interface → Assistant engine: sends queries
- Assistant engine → AI provider: analyzes intent (evidence: `src/lib/assistantEngine.ts`)
- Assistant engine → Event understanding: analyzes events (evidence: `src/lib/assistantEngine.ts`)
- Assistant engine → Transit planning: plans transit (evidence: `src/lib/assistantEngine.ts`)
- Assistant engine → Event readiness: checks readiness (evidence: `src/lib/assistantEngine.ts`)
- Assistant engine → Financial intelligence: handles finance
- Next API routes → Marketplace search: routes search
- Marketplace search → Shopping intent parser: parses query (evidence: `src/app/api/v1/marketplace/search/route.ts`)
- Marketplace search → Marketplace providers: searches providers (evidence: `src/app/api/v1/marketplace/search/route.ts`)
- Product retrieval → Shopping intent parser: parses intent (evidence: `src/lib/marketplace/MarketplaceRetrievalEngine.ts`)
- Product retrieval → Compatibility context: uses context (evidence: `src/lib/marketplace/MarketplaceRetrievalEngine.ts`)
- Marketplace providers → External marketplaces: queries providers
- Authentication service → Client storage: reads and writes (evidence: `src/services/authService.ts`)
- Authentication service → Starter profile data: initializes accounts (evidence: `src/services/authService.ts`)
- Weather context → OpenWeatherMap: fetches forecast
- FastAPI application → Versioned API routes: mounts routes (evidence: `backend/app/main.py`)
- Versioned API routes → SQLAlchemy database: uses database
- FashionCLIP service → Marketplace search: visual analysis
