How muslly-pharmcy/ympharma-b21a19fb works
MUSLLY AI OS is a healthcare operations platform for Yemen, combining a public pharmacy storefront, authenticated clinical and business workflows, and AI-assisted operations. The evidenced shopper path begins at the storefront and loads catalog data; authenticated routes enforce login, while domain APIs support operational work against Supabase. README capabilities also include the AI SUN runtime, functional planets, Mission Control, and specialized agents. Those broader subsystems are represented from documented capabilities and the repository tree; their internal wiring was not sampled, so uncertain links are omitted.
Main entry points: catalog.functions.ts Catalog service · kernel.server.ts AI SUN kernel · index.tsx Storefront entry · client.server.ts Admin Supabase client
Components 23
User experience
- Storefront entry
src/routes/index.tsx - Storefront
src/pages/Storefront.tsx - Authenticated routes
src/routes/_authenticated/route.tsx - AI chat
src/pages/AIChat.tsx - Mission Control
src/pages/MissionControl.tsx
Health operations
- Catalog service
src/lib/catalog.functions.ts - Clinical engine
src/lib/clinical/engine.server.ts - Clinical providers
src/lib/clinical/registry.server.ts - Interaction checks
src/lib/medical/interaction-engine.ts - Inventory operations
src/lib/inventory.functions.ts - Reorder planning
src/lib/inventory/reorder-engine.server.ts - CRM segments
src/lib/segments/engine.server.ts - Promotion engine
src/lib/promotions/engine.server.ts - Functional planets
src/data/planets.ts
AI intelligence
- AI SUN kernel
src/lib/ai/runtime/kernel.server.ts - Specialist agents
src/super-agent/sun-guardian.agent.ts
Platform services
- Browser Supabase
src/integrations/supabase/client.ts - Supabase database
src/integrations/supabase/types.ts - Session services
src/lib/session.server.ts - Admin Supabase client
src/integrations/supabase/client.server.ts
Other components
- Shopper
- Clinical staff
- AI chat user
Connections 19
- Shopper → Storefront entry: opens
src/routes/index.tsx - Storefront entry → Storefront: renders
src/routes/index.tsx - Storefront entry → Catalog service: loads catalog
src/routes/index.tsx - Clinical staff → Authenticated routes: signs in
src/routes/_authenticated/route.tsx - Authenticated routes → Browser Supabase: checks user
src/routes/_authenticated/route.tsx - Catalog service → Session services: uses session
src/lib/catalog.functions.ts - Catalog service → Supabase database: reads catalog
src/lib/catalog.functions.ts - Catalog service → AI SUN kernel: invokes AI
src/lib/catalog.functions.ts - Clinical engine → Clinical providers: resolves provider
src/lib/clinical/engine.server.ts - Clinical providers → Admin Supabase client: selects provider
src/lib/clinical/registry.server.ts - Interaction checks → Clinical engine: supports checks
- Reorder planning → Admin Supabase client: reads and writes
src/lib/inventory/reorder-engine.server.ts - CRM segments → Admin Supabase client: queries customers
src/lib/segments/engine.server.ts - Promotion engine → CRM segments: uses segment results
- AI chat user → AI chat: asks
- AI chat → AI SUN kernel: routes request
- AI SUN kernel → Specialist agents: dispatches
- Mission Control → AI SUN kernel: monitors
- Functional planets → Mission Control: represented in