How spiritbulb/mcloud works
Menengai Cloud is a multi-app platform for merchants, NGOs and creators. A central workflow is merchant onboarding and organization/store management, followed by storefront configuration and publication; shoppers then browse, order and pay through the storefront. The repository also includes the Nuru learning app and mobile APIs, plus server provisioning. The README establishes the apps’ roles, while sampled files and the source index expose selected implementation links; unsampled paths are represented cautiously, and links without direct evidence are omitted.
Main entry points: app.ts Provisioning API · home/page.tsx Platform hub · [slug]/page.tsx Public storefront · route.ts Notes-aware chat
Components 33
Platform and identity
- Platform hub
apps/web/app/(marketing)/home/page.tsx - Organization onboarding
apps/web/app/(merchant)/org/onboarding/page.tsx - Organization management
apps/web/app/(merchant)/org/[orgSlug]/(org)/page.tsx - Authentication handoff
apps/web/app/api/_handoff/tickets.ts - Mobile API
apps/web/app/api/mobile/_lib.ts
Storefront commerce
- Store management
apps/storefront/app/(merchant)/org/[orgSlug]/[storeSlug]/settings/page.tsx - Store access logic
apps/storefront/lib/merchant/stores.ts - Public storefront
apps/storefront/app/(storefront)/store/[slug]/page.tsx - Theme rendering
packages/liquid/src/engine.ts - Bundled themes
packages/liquid/src/themes-manifest.ts - Service detail theme
packages/themes/src/classic/ServiceDetailsPage.tsx - Rich content renderer
apps/storefront/components/MdxContent.tsx - Store and checkout APIs
apps/storefront/app/api/store/[slug]/checkout/route.ts - Payment providers
Nuru learning
- Nuru study app
apps/nuru/app/files/page.tsx - Study file workflows
apps/nuru/app/api/files/route.ts - Note ingestion
apps/web/app/api/mobile/notes/route.ts - Note embeddings
apps/web/app/api/mobile/notes/_ingest/embed.ts - Notes-aware chat
apps/web/app/api/mobile/chat/route.ts - Chat orchestration
apps/web/app/api/mobile/chat/_chat/loop.ts - Model adapters
apps/web/app/api/mobile/chat/_chat/adapters.ts - Anthropic completion
apps/web/app/api/mobile/chat/_chat/complete.anthropic.ts - Azure completion
apps/web/app/api/mobile/chat/_chat/complete.azure.ts
Shared services
- Supabase data layer
packages/db/src/server.ts - Database schema types
packages/db/src/database.types.ts
Server provisioning
- Provisioning API
tools/reverb-upcloud/src/app.ts - Create validation
tools/reverb-upcloud/src/create.ts - LXD operations
tools/reverb-upcloud/src/lxd.ts - Server state mapping
tools/reverb-upcloud/src/map.ts
Other components
- Merchant
- Shopper
- Mobile user
- LXD service
Connections 28
- Merchant → Platform hub: uses platform
README.md - Platform hub → Organization onboarding: starts setup
README.md - Merchant → Organization management: manages organization
README.md - Platform hub → Authentication handoff: supports sign-in
- Mobile user → Mobile API: calls mobile APIs
README.md - Merchant → Store management: configures store
README.md - Store management → Store access logic: uses access logic
- Shopper → Public storefront: browses store
README.md - Public storefront → Theme rendering: renders themes
- Theme rendering → Bundled themes: reads templates
packages/liquid/src/engine.ts - Public storefront → Service detail theme: renders service page
- Service detail theme → Rich content renderer: renders content
packages/themes/src/classic/ServiceDetailsPage.tsx - Shopper → Store and checkout APIs: places orders
README.md - Store and checkout APIs → Payment providers: initiates payments
README.md - Mobile user → Nuru study app: studies materials
- Nuru study app → Study file workflows: manages files
- Mobile user → Note ingestion: submits notes
apps/web/app/api/mobile/notes/route.ts - Note ingestion → Note embeddings: embeds chunks
apps/web/app/api/mobile/notes/route.ts - Mobile user → Notes-aware chat: chats about notes
apps/web/app/api/mobile/chat/route.ts - Notes-aware chat → Chat orchestration: runs chat
apps/web/app/api/mobile/chat/route.ts - Notes-aware chat → Model adapters: selects adapter
apps/web/app/api/mobile/chat/route.ts - Model adapters → Anthropic completion: dispatches completion
apps/web/app/api/mobile/chat/_chat/adapters.ts - Model adapters → Azure completion: dispatches completion
apps/web/app/api/mobile/chat/_chat/adapters.ts - Supabase data layer → Database schema types: types queries
packages/db/src/server.ts - Provisioning API → Create validation: validates creation
tools/reverb-upcloud/src/app.ts - Provisioning API → LXD operations: manages instances
tools/reverb-upcloud/src/app.ts - Provisioning API → Server state mapping: maps server state
tools/reverb-upcloud/src/app.ts - LXD operations → LXD service: calls hypervisor